Brain labPlay → read → next · ~7 min

Tutorials · Chapter C (3/4) · ~7 min

Vectors & similarity search

Play → read → next

Similar meanings have vectors near each other — that’s how AI finds related text.

Playground

Vectors & similarity

Compare two phrases, then pick the best matching document.

Similarity 77

Rank docs for: How do I reset my password?

Recap

What you just did

You ranked documents by similarity to a query — not by exact keyword match. The closest meaning wins.

Teach

How it works

  1. Embed the question
  2. Embed (or look up) each candidate chunk
  3. Score closeness (often cosine similarity: do the arrows point the same way?)
  4. Return the top matches

That’s “search by meaning.” Keywords can still help, but meaning covers synonyms and paraphrases.

Use it

When you'd use this

  • FAQ bots that find the right article even wording differs
  • “People also asked” style related content
  • Building blocks of RAG (next lessons)

Watch out

Watch out

Highest similarity can still be the wrong doc if your collection is noisy. Retrieval quality beats model cleverness.

Try next

Try this next

Write a question using different words than the answer article. Good similarity search should still find it.