Vector Databases
Store embeddings so they survive restarts, take updates, answer filtered queries and fit in memory: pgvector, other stores, sizing and a VectorStore.
Phase 3 built vector search in memory: fast to write, gone when the program stops. A real product needs more. Vectors must be saved, changed and deleted while people search, filtered by who is asking, and sized so the machine does not run out of memory. This phase is about the systems that do that, called vector stores or vector databases.
You will build a small VectorStore by hand (upsert, delete with tombstones, search with a metadata filter, compaction), so every feature of a real store has a mechanism you can point at. Then you will meet the real thing with PostgreSQL and pgvector, checked against its official documentation, and the other kinds of store, named by category and with no rankings.
The phase ends with AskDocs getting a VectorStore interface: an in-memory version that runs here, and the SQL it maps to in pgvector. Swapping stores later then touches one file.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.