HNHacker News
TopNewBestAskShowJobs

pamelafox

2,084 karma · joined March 2, 2010

Principal Cloud Advocate @ Microsoft, focusing on Python! Formerly @ UC Berkeley CS, Khan Academy, Coursera, Google. More about me at www.pamelafox.org
submissionscomments
pamelafox··on A visual exploration of vector embeddings
I forgot that I also put together this little website, if you want to compare vectors for word2vec versus text-embedding-ada-002: https://pamelafox.github.io/vectors-comparison/

(I never added text-embedding-3 to it)

pamelafox··on A visual exploration of vector embeddings
Thanks for sharing that too!

I do have a notebook that does a PCA reduction to plot a similarity space: https://github.com/pamelafox/vector-embeddings-demos/blob/ma...

But as I noted in another comment, I think it loses so much information as to be deceiving.

I also find this 3d visualization to be fun: https://projector.tensorflow.org/

But once again, huge loss in information.

I personally learn more by actually seeing the relative similarity ranking and scores within a dataset, versus trying to visualize all of the nodes on the same graph with a massive dimension simplification.

That 3d visualization is what originally intrigued me though, to see how else I could visualize. :)

pamelafox··on A visual exploration of vector embeddings
I thought I'd make this blog post be language-agnostic, but agreed that a Python-specific version would be helpful.

Here's where I calculate cosine without numpy: https://github.com/pamelafox/vector-embeddings-demos/blob/ma...

And in the distance notebook, I calculate with numpy: https://github.com/pamelafox/vector-embeddings-demos/blob/ma... I didn't use the @ operator! TIL.

I forget where I originally got the Disney movie titles, but it is notably just the titles. A better ranking would be based off a movie synopsis as well. Here's where I calculated their embeddings using OpenAI: https://github.com/pamelafox/vector-embeddings-demos/blob/ma...

Maybe I can submit a poster to Pytorch that would include the Python code as well.

pamelafox··on A visual exploration of vector embeddings
I actually explicitly left the PCA graphs out of the blog post version, as I think they lose so much information as to be deceiving. That's what I told folks in person at the poster session as well.

I think the other graphs I included aren't deceiving, they're just not quite as fun as an attempt to visualize the similarity space.

pamelafox··on Postgres IDE in VS Code
I think this extension is going to focus on PostgreSQL only. For SQLite, try the SQLTools extension.
pamelafox··on Postgres IDE in VS Code
Thanks, I need to move that website to GitHub Pages soon, the current host isn't handling the naked domain well. Changed to www.pamelafox.org for now.
pamelafox··on Postgres IDE in VS Code
The schema visualization is a feature of the extension, not the primary mode of navigation. Lots of people love visualization, but not everyone does - totally cool to not use it. I think it's a fun way to browse a database that's new to me, to see roughly how things are connected.
pamelafox··on Postgres IDE in VS Code
Please file that bug in the issue tracker: https://github.com/microsoft/vscode-pgsql/issues

The team is very receptive to feedback, in my experience.

pamelafox··on Postgres IDE in VS Code
Congrats to the team on launching this! I was actually the first to demo it, as part of our sponsored session at Microsoft last week.

Here's the talk where I used it: https://www.youtube.com/watch?v=k6Vm2hakkV4

I also did a theater session at our MSFT booth, but the recording isn't up yet. You can follow the steps in this repo to check out all the features that I demo'd, however: https://github.com/Azure-Samples/postgresql-extension-playgr...

Let the team know about any issues here: https://github.com/microsoft/vscode-pgsql/issues

pamelafox··on Postgres IDE in VS Code
I'm a developer advocate at Microsoft, and from my perspective, both teams have been putting in a bunch of effort improving their extensions. I participated in usability studies with both the teams behind the SQL Server extension and new PostgreSQL extension, and then once they were ready, I participated in bug bashes.

Both teams seem to very much want developers to enjoy their tools, so please do send them feedback on what you need out of the tools.

Follow Carlos Robles if you want SQL server extension news: https://www.linkedin.com/in/croblesm/

Follow Joshua Johnson for PostgreSQL server extension news: https://www.linkedin.com/in/johnsonjoshuae/

pamelafox··on Ty: A fast Python type checker and language server
I am literally checking HackerNews while I wait for mypy to finish running, so I am excited to hear a faster type checker is on the way! Hope the error messages are also helpful.
pamelafox··on Meaning Machine – Visualize how LLMs break down and simulate meaning
This looks like a fun visualization of various NLP techniques to parse sentences, but as far as I understand, only the tokenization is relevant to LLMs. Perhaps it's just mis-titled?

I actually worked on a similar tree viewer as part of an NLP project back in 2005, in college, but that was for rule-based machine translation systems. Chapter 4 in the final report: https://www.researchgate.net/profile/Declan-Groves/publicati...

pamelafox··on Show HN: FastOpenAPI – automated docs for many Python frameworks
And would it document a streaming API? (With transfer-encoding: chunked) The support for that in OpenAPI is still in progress, I believe.
pamelafox··on Show HN: FastOpenAPI – automated docs for many Python frameworks
Does the flask extra also support quart?
pamelafox··on 'Passive house' survives fire in California
For folks in the east bay area, the Berkeley fire department gave a great talk on fire risk reduction: https://www.youtube.com/watch?v=0MUh16czYGk&t=239

In the past year, I’ve added gutter guards, removed trees in zone zero (especially fire-prone cypress), and hardscaped zone zero. I need to look into whether we can do more sealing like this passive house- bit tricky with 1950s construction.

pamelafox··on Don't use cosine similarity carelessly
I should clarify that I experienced these issues with text-embedding-ada-002 and the Azure AI vision model (based on Florence). I have not tested many other embedding models to see if they'd have the same issue.
pamelafox··on Don't use cosine similarity carelessly
Another tip: do NOT store vector embeddings of nothingness, mostly whitespace, a solid image, etc. We've had a few situations with RAG data stores which accidentally ingested mostly-empty content (either text or image), and those dang vectors matched EVERYTHING. WAs I like to think of it, there's a bit of nothing in everything.. so make sure that if you are storing a vector embedding, there is some amount of signal in that embedding.
pamelafox··on Don't use cosine similarity carelessly
If you're using cosine similarity when retrieving for a RAG application, a good approach is to then use a "semantic re-ranker" or "L2 re-ranking model" to re-rank the results to better match the user query.

There's an example in the pgvector-python that uses a cross-encoder model for re-ranking: https://github.com/pgvector/pgvector-python/blob/master/exam...

You can even use a language model for re-ranking, though it may not be as good as a model trained specifically for re-ranking purposes.

In our Azure RAG approaches, we use the AI Search semantic ranker, which uses the same model that Bing uses for re-ranking search results.

pamelafox··on Automated accessibility testing at Slack
If you are writing tests with pytest, I wrote these blog posts about combining pytest, playwright, and axe-core: http://blog.pamelafox.org/2023/07/automated-accessibility-au... http://blog.pamelafox.org/2023/08/accessibility-snapshot-tes...

Great to see Slack using a similar combo!

pamelafox··on Structured Outputs with Ollama
Do you happen to know if got-4o would be negatively affected by the addition of “return x in json”? I’m debating whether I could use the same prompt across all models, hosted and ollama.
pamelafox··on Tokyo is set to introduce a four-day workweek for government employees
I'm curious if you have tried taking care of a young child 24/7, it is exhausting work. Some mothers are able to do it, but I find it really helps to be able to alternate between childcare and work, to give me a break.

I do think that remote work is great for mothers though, as it makes pumping/nursing more doable, whether we are working or not.

Perhaps the government can provide more subsidies for quality childcare.

pamelafox··on Tokyo government gives workers 4-day workweek to boost fertility, family time
Indeed! My nanny does have kids of her own. So I would either pay her overtime or I would find additional childcare for the 5th day.

I'm just pointing this out because I hear "4 day workweek" talked about a lot, but it's never clear to me if folks mean that everyone is getting those 4 days, including childcare providers or teachers, and if that's actually what folks want. People in this thread talk about getting chores done, but I'm not getting any chores done if I'm taking care of my lil kids, I'm just getting an even messier house. :D

pamelafox··on Tokyo government gives workers 4-day workweek to boost fertility, family time
" It separately announced another policy that will allow parents with children in grades one to three in elementary schools to trade off a bit of their salary for the option to clock out early."

This is really nice, this was the option that I wanted for my first kid. I would want this from the day they were born though, not just grades 1-3. It helps with breastfeeding scheduling.

pamelafox··on Tokyo government gives workers 4-day workweek to boost fertility, family time
Would schools and childcare providers also have 4-day workweeks? I really appreciate that I have 5 days of childcare now, as I find it exhausting to be 24/7 parenting two lil kids for two days straight (the weekends). If the norm was 4-day workweeks, I would pay my nanny overtime for Fridays. And then yes, maybe I'd get chores done on Friday! Currently, chores just don't get done ever. :D
pamelafox··on Ask HN: Local RAG with private knowledge base
I’ve got this RAG repo working entirely locally (Ollama/Postgres) but it doesnt RAG on documents like you want.

https://github.com/Azure-Samples/rag-postgres-openai-python

I’d like to make that version when I have the time, probably just using Llamaindex for the ingestion.

My tips for getting SLMs working well for RAG: http://blog.pamelafox.org/2024/08/making-ollama-compatible-r...

pamelafox··on A new semantic chunking approach for RAG
How does your chunker actually work? The gist only shows an API call. Or is that secret?
pamelafox··on Show HN: Token price calculator for 400+ LLMs
I grappled with that issue for https://github.com/pamelafox/openai-messages-token-helper as I wanted to be able to use it for a quick token check with SLMs as well, so I ended up adding a parameter "fallback_to_default" for developers to indicate they're okay with assuming gpt-35 BPE encoding.
pamelafox··on Show HN: Token price calculator for 400+ LLMs
I have a package here that includes calculation for images for OpenAI: https://github.com/pamelafox/openai-messages-token-helper
pamelafox··on Show HN: Token price calculator for 400+ LLMs
I have a package here that includes calculation for images for OpenAI: https://github.com/pamelafox/openai-messages-token-helper
pamelafox··on Show HN: Token price calculator for 400+ LLMs
Are you also accounting for costs of sending images and function calls? I didn't see that when I looked through the code. I developed this package so that I could count those sorts of calls as well: https://github.com/pamelafox/openai-messages-token-helper
← PreviousPage 3 of 12Next →