SSheLeads AI

Week 9 · Phase 2 Engineering & Tools

The Vector Search Playground

Yesterday's RAG pipeline asked “which chunks are closest?” — this is the machinery that answers it. Embeddings become points; search becomes geometry.

Similarity searchCosine vs EuclideanChromaDB · Pinecone · pgvector
W9 · 1

Click a document, find its neighbours

24 support tickets, embedded and projected to 2D. Click any point — the index returns its top-5 nearest neighbours, exactly like your Week 9 semantic-search build over 100+ documents.

Top-5 results
Click a point on the map ←

Cosine cares about direction (topic), Euclidean about absolute position — with normalised embeddings they mostly agree, but watch the borderline results reshuffle when you switch.

W9 · 2

Choosing your vector database

Same maths, very different operational trade-offs.

Embedded · open source

ChromaDB

  • Runs in-process with your Python — zero infra
  • Perfect for prototypes & the sandbox
  • Persist to disk with one line
Best for: learning, local RAG, <1M vectors — your Week 8–9 builds.
Managed · serverless

Pinecone

  • Fully managed, scales past billions of vectors
  • Metadata filtering + hybrid search built in
  • Pay-per-use; no servers to run
Best for: production scale without an ops team.
Extension · SQL-native

pgvector

  • Vectors inside PostgreSQL you already run
  • Join embeddings with business data in SQL
  • One database to secure, back up, govern
Best for: enterprises already on Postgres — often the pragmatic pick.
W9 · 3

What “tuning retrieval” actually means

top-k

How many chunks you fetch. More = better recall, noisier prompts. Start at 3–5.

Score threshold

Drop results below a floor (e.g. 0.7) so irrelevant chunks never reach the model.

Embedding model

Matters as much as the LLM. Benchmark two on your own corpus, not on leaderboards.

Hybrid search

Combine keyword (BM25) + semantic scores — rescues exact terms like error codes. Week 14 territory.

Week 9 outcome: a semantic search demo with precision metrics — which is precisely where Week 10 picks up.