Search Before Vectors
Keyword search by hand: terms, the inverted index, TF-IDF and BM25, phrases and fields, real engines, and the baseline every later RAG idea must beat.
Before embeddings, search engines found documents by words. That older idea is still the baseline every modern RAG system is measured against, and it still wins on some questions: exact error codes, product names, rare terms. This phase builds it from nothing, in Python, Java and JavaScript, so that nothing about it stays magic.
You will turn text into terms, build an inverted index (the structure behind every search engine), score passages with TF-IDF and then BM25, and recompute every number by hand. The BM25 you write uses the same formula and constants as the keyword ranker in the search labs, so you can reproduce a lab's scores on paper. You will also see exactly where keyword search fails, which is the reason Phases 2 and 3 exist.
The phase ends by adding keyword search to AskDocs, the product this course builds. It replaces Phase 0's word counting behind the same retrieve interface, and a small test harness measures how much better it is. Then a playbook gives you an analyser, an index and a ranker to copy into any project.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.