Retrieval and Knowledge Systems
Build retrieval your agents can trust over a case's documents and a company's reference library, and measure that it finds what it should.
2 modules · 8 lessons~24 hoursUpdated 2026-10-30
- Lessons8
- Quizzes8
- Sources48
- Of study~24h
About this course
About this course
How to get the right passages in front of an agent: choosing and compressing embeddings, chunking contracts and records along their structure, ANN indexes and vector databases with per-tenant isolation and fresh indexes, and the retrieval evals that keep every later decision honest. The second module adds hybrid BM25 search, rank fusion and rerankers, agentic retrieval with grep and file tools, knowledge graphs and GraphRAG, and the cost and accuracy evidence on long context versus RAG. The running example is answering questions across one case's documents and across a library of reference documents. Code is Python; exercises run on your Claude subscription.
About the running example
The examples follow a fictional property-law (conveyancing) firm in England and Wales: answering questions across one property transaction (title register, lease, searches, replies to enquiries) and across the firm's precedent library. It's a case study, chosen because its documents are long, structured and high-stakes. You don't need a legal background, and the same patterns apply to contracts, insurance claims, invoices, support tickets or patient records. In the lessons, a matter is one client's case and a solicitor is the lawyer who signs work off.
What you'll learn.
- 1Choose an embedding model, dimension and precision on evidence from your own documents, and compute the index's storage and embedding cost
- 2Chunk long documents along their section and clause structure, and add document context with contextual retrieval or late chunking
- 3Configure ANN indexes and a vector database for the recall and latency you need, with metadata filters, tenant isolation and an index that stays fresh
- 4Build a labelled query set from real user questions and measure recall@k, MRR, nDCG and answer groundedness
- 5Combine BM25 and dense retrieval with reciprocal rank fusion and a reranker, and give an agent search, grep and read tools for multi-hop questions
- 6Decide between RAG, long context, agentic search and GraphRAG for a given workload using cost and accuracy evidence
2 modules, 8 lessons.
9h 30m of lessons
Module 1 · 4 lessons · 4h 50m
Building the index
From parsed documents to a measured search index: embeddings in practice, structure-aware and contextual chunking, ANN indexes and vector databases with filtering, tenancy and freshness, and the evals that tell you whether retrieval works.
Module 2 · 4 lessons · 4h 40m
Retrieval that reasons
Beyond one vector search: hybrid keyword and dense search with fusion and reranking, agents that search for themselves, knowledge graphs for questions that span documents, and when to skip retrieval and use long context instead.
A measured retrieval service for cases and reference documents
Build a retrieval service over a synthetic set of case files and a reference library, with structure-aware chunking, a filtered and isolated index, hybrid search with reranking, agentic and long-context paths, and a labelled eval that justifies every choice in a recommendation memo.