Tutorials · Chapter C (3/4) · ~9 min
Vector databases explained
Try it → see it → read → next
A vector DB stores embeddings and finds nearest neighbors fast — the memory shelf behind RAG.
Try yourself
Playground
Vector database shelf
Store embeddings, then query by meaning — not just exact keywords.
FAQ: refundsVector: [billing policy annual]
Store hoursVector: [open close weekend]
Cookie recipeVector: [bake oven minutes]
Guest Wi‑FiVector: [password lobby network]
Recap
What you just did
You stored doc vectors and queried by meaning — refund question matched billing FAQ, not store hours.
Teach
How it works
Pipeline:
- Chunk documents
- Embed each chunk → vector
- Insert vector + text + metadata into the DB
- Query: embed the question → nearest-neighbor search → top-k chunks
Popular options include pgvector, Pinecone, Chroma, Weaviate, and others. Demos can use in-memory lists; production needs indexing and filters.
Use it
When you'd use this
- Team doc bots, support search, semantic wikis
- Any RAG app beyond a handful of files
Watch out
Watch out
Vector search alone may miss exact SKUs or error codes — consider hybrid search (keywords + vectors).
Try next
Try this next
Compare glossary entries vector database and similarity search.