Module 11 — RAG and Knowledge Systems¶
Level: Intermediate to Advanced · Time: ~5 hours including the lab · Exam relevance: CCAR-P D3 (primary), D4
Retrieval-augmented generation (RAG) is how you give Claude knowledge it was never trained on: your policies, your product docs, your tickets, your contracts. This module takes you from "what is RAG" to designing, evaluating and choosing between RAG, long context and agentic search for production systems.
Learning objectives¶
By the end of this module you can:
- Explain the two halves of a RAG pipeline (offline indexing and online retrieval plus generation) and where each one fails.
- Choose a chunking strategy (fixed, recursive, semantic, structure-aware) and set overlap and metadata to suit the documents.
- Select an embeddings provider and a vector store, and plan for index refresh, versioning and re-embedding. You can state what Anthropic's documentation says about embeddings, since Anthropic does not ship its own embeddings model.
- Match a retrieval strategy (BM25, dense, hybrid, reranking, contextual retrieval, metadata filters, structured/SQL retrieval) to the shape of the data and the pattern of the queries.
- Ground answers in sources using the Claude API citations feature and
search_resultcontent blocks, and know their limits. - Measure a RAG system with separate retrieval metrics and generation metrics, and diagnose which half is failing.
- Decide between RAG, putting everything in a long context window, and agentic search, and justify the choice to stakeholders.
Page order¶
| # | Page | What you learn |
|---|---|---|
| 1 | RAG fundamentals | The pipeline, its vocabulary and its failure points |
| 2 | Chunking strategies | How to split documents so retrieval can find the right piece |
| 3 | Embeddings and indexing | Embedding models, vector stores, refresh and versioning |
| 4 | Retrieval strategies | Lexical, dense, hybrid, reranking, contextual retrieval, filters, SQL |
| 5 | Grounding and citations | Making answers traceable with the citations feature |
| 6 | RAG evaluation | Retrieval metrics, generation metrics and an evaluation loop |
| 7 | RAG vs long context vs agentic search | Choosing the right knowledge architecture |
Prerequisites¶
- Module 04 — Context engineering, especially managing long context and prompt caching.
- Module 06 — Claude API, especially vision, documents and citations.
- Module 07 — Tool use, because agentic search treats retrieval as a tool.
- Comfortable reading Python 3.10+.
Exam relevance¶
This module underpins the following Claude Certified Architect – Professional (CCAR-P) objectives. Objective IDs and
wording come from registry.yaml.
| Objective | Summary | Pages |
|---|---|---|
| CCAR-P-3.5 | Design RAG pipelines with suitable chunking and indexing | 01, 02, 03 |
| CCAR-P-3.6 | Match retrieval strategy to data shape and query pattern | 04, 07 |
| CCAR-P-3.3 (secondary) | Evaluate accuracy–latency trade-offs and justify configuration | 04, 07 |
| CCAR-P-3.8 (secondary) | Evaluate progressive discovery versus monolithic context | 07 |
| CCAR-P-4.1 (secondary) | Define evaluation metrics | 06 |
The CCAR-P study guide for Domain 3 links back here.
Practise it¶
- Lab: lab-11 — RAG pipeline builds chunking, hybrid retrieval and cited answers that run offline in mock mode.
- Lab: lab-04 — Document-grounded Q&A is the beginner warm-up for citations.
- Project: Knowledge-base Q&A assistant is the end-to-end version with tests.
- When something goes wrong: RAG troubleshooting.
Next module¶
Continue to Module 12 — AI security. Retrieved documents are untrusted input, and indirect prompt injection is the main security risk that RAG introduces.