Brain labTry it → read → next · ~9 min

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.

On paths: Builder · Student

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:

  1. Chunk documents
  2. Embed each chunk → vector
  3. Insert vector + text + metadata into the DB
  4. 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).