CourseRetrieval-Augmented Generation: The Complete Course · Module 4: Embeddings · part 33 of 95
Part 33 · Module 4: Embeddings

Lab: Hollin's embedding decision, measured and switchable

35 min read·13 Oct 2026
Module 4 · Lab · About 70 minutes · Needs: lessons 1 to 4 of this module

What you are building

THE EMBEDDING DECISION, END TO END hollin/data.py 40 docs Embedder pinned model 5 collections one per version scores 32 questions gate interval above zero? decision file keep bge-small@384 hollin-docs -> bge-small@384 a cache under it all: version plus text
The lab's piece: pinned models (blue, the system) fill one collection per version, a gate (amber, uncertain) weighs the scores, and the decision and alias (green) record the outcome.

Grace wants one page she can sign: which embedding model Hollin Answers uses, how well it finds Hollin's documents, and how to change it later without an outage. Here the lessons' pieces become three files and a command. hollin/embeddings.py holds three pinned local models, a version on every vector, a cache, versioned collections and the hollin-docs alias. evals/retrieval.py scores any ranking on the 32 answerable questions. evals/embedding_decision.py measures four candidates against the live model, applies Lesson 4's gate and writes the decision to evals/results/embedding-decision.json. No language model is called; Ellie's question, "what does E7 mean on my X200" (q19), is the running example.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.