All classes

Week 4 · Thu, Oct 8, 2026 · Retrieval (RAG), hybrid search, and memory

Make your AI answer from your own data

We built a search engine over a horror movie shelf so an AI clerk could answer from real data instead of guessing. We compared chunk sizes, combined meaning-based and keyword search, re-ranked the results, and fixed the follow-up questions that break search.

What we covered

  • Retrieval is a spectrum

    Naive, advanced, modular, graph, and agentic setups. Pick one with the Three C's, not by hype.

  • Meaning plus exact words

    Embeddings catch the vibe; keyword search (BM25) catches names and exact terms. Hybrid search runs both and merges them with Reciprocal Rank Fusion.

  • Search wide, then rank narrow

    A re-ranker reads the top results closely and puts the best ones first before the model ever sees them.

  • Chunk size changes the answer

    Chunks that are too small can cut an answer away from the title it belongs to.

  • Rewrite the question before you search

    Follow-ups like "anything like that, but on a train?" mean nothing alone. Turn them into a standalone question first.

Try the homework

15–20 minutes required, optional levels after. A free GitHub account and a browser. Nothing to install. Only Level 4 needs an AI API key.

  1. On the repo, click Use this template to make your own public copy, then enable Actions.
  2. New data for homework: Dog-Ear Books, a late-night Brooklyn bookstore building a clerk bot for its October table.
  3. Level 1 (required): fix the orphan-chunk bug in chunker.py until Actions turns green, then answer decision.md.
  4. Level 2 (challenge): write Reciprocal Rank Fusion yourself in fusion.py.
  5. Level 3 (challenge): build parent-child retrieval in parent_child.py. Search small chunks, hand the AI the whole book card.
  6. Level 4 (bonus): rewrite a follow-up question with an AI model before searching, in ask.py.

Fellows turn in homework through Google Classroom. The Classroom link is on the last slide.

Want the full fellowship?

Classes are open to everyone. Fellows also get homework feedback in Google Classroom, a cohort Discord role, office hours, and priority seats at the hackathon.