Series
pgvector for TypeScript
Eight posts that take one TypeScript project, a multimodal docs assistant searching text and screenshots, from a first similarity query to vector search you can tune, measure, and run in production. No second database.
Parts
- 01Vector search in Postgres isn't magic
- 02Search text and screenshots with one pgvector column
- 03Every result scores 0.81. Your search is broken.
- 04HNSW or IVFFlat? Choosing and building your pgvector index
- 05Stop tuning everything. pgvector has three knobs that matter.
- 06Your RAG is confidently wrong without hybrid search
- 07Stop shipping retrieval changes on vibes
- 08Embeddings rot too. Running pgvector in production.
About this series
You've done the hello-world. You have pgvector installed, you ran a similarity
query with <=>, and it sort of works. Now you're in the messy middle: results
that aren't quite right, queries slowing down as the table grows, and no clear
path to something you'd trust in front of users.
This series is the rest. It follows one continuous project, a docs assistant that searches Postgres documentation and screenshots in the same column, and works through the problems in the order they show up: get search working, make it relevant, make it fast, prove it's good with a number, then keep it good while the model upgrades and the corpus grows.
Every example is TypeScript. Everything runs on a Postgres you self-host. There is no second database anywhere in here. Most parts carry interactive demos: drag a query point around an embedding space, watch an index build, compare recall against latency.
This started life as a paid course. It's free now, and it lives here.