RAG for Everyone

← Back to quiz

Chapter 4 Exercises45 min hands-on

Exercises: Build a Pipeline Trace

Use starter.py to model offline and online RAG pipeline stages, then produce a trace that explains what happened.

1 Define offline stages

Represent parse, clean, chunk, metadata enrichment, indexing, validation, and publish.

2 Define online stages

Represent routing, permission filtering, retrieval, reranking, context assembly, answer policy, and tracing.

3 Add gates

Flag weak retrieval, missing required source family, denied access, stale index, and high-risk escalation.

4 Produce a production trace

The trace should include route, filters, source ids, answer status, first failed gate, and recommended next action.

← Back to QuizPractice Bank →