Back to Topics

Vector Search

Search from first principles — TF-IDF, boosting, embeddings — and the small-technology versions the AISL workshops actually deploy: SQLite, Turso, Cloudflare Vectorize.

Retrieval quality is the ceiling on every RAG system. The AISL material teaches the layer underneath the embeddings API twice: once from first principles, once by shipping vector search with embarrassingly small technology.

First principles

Build Your Own Search Engine builds search over the Zoomcamp FAQ without a search library:

  • TF-IDF with cosine similarity: documents and queries as vectors, closeness as relevance.
  • Field boosting and filtering — the question field matches user queries better than the answer text.
  • SVD/LSA dense embeddings, which ignore word order entirely.
  • BERT embeddings, which read the sentence in context and fix the exact-word mismatch: a query about "enrolling" finds the document that says "register".

For the tool version of the same ideas, SQLiteSearch: Lightweight Text and Vector Search in Python is the case study: persistent text and vector search in a single SQLite file, born from minsearch's in-memory limits, published to PyPI.

Vector search in production-scale-small

Three deployment workshops swap the search layer of the same FAQ agent:

Where this fits

Search feeds retrieval, retrieval feeds RAG, and the deployment workshops put both somewhere users can reach: Agent Deployment.

Where to go next

  • Use the search inside an agent: RAG
  • The workshops that deploy these indexes: Agent Deployment

Keep building with a membership

Every topic guide is free to read. Members get structured courses, live workshops, and feedback on real projects.