RAG for Everyone

← Back to quiz

Chapter 16 Exercises60 min hands-on

Exercises: Select Top-K Policy

Use starter.py to recommend top-k, rewrite, and multi-query behavior from query type and risk.

1 Classify query type

Simple FAQ, policy exception, troubleshooting, comparison, or broad research.

2 Choose top-k

Balance recall, noise, latency, and token budget.

3 Decide retrieval extras

Recommend filters, rewrite, multi-query, dedupe, or reranking.

4 Produce trace note

Explain why this strategy was chosen.

← Back to QuizPractice Bank →