A trade-off table that changes with the weights
The scores are example judgements. In practice take precision and completeness from the golden set and cost from the estimator.
How to argue a choice instead of reciting a preference: chunk size, k, hybrid or not, re-rank or not, which store, RAG or long context. Each is a table of costs and a measurement.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 5 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Option A scores precision 5, cost 2. Option B scores precision 3, cost 5. With weights precision 2 and cost 1, print the weighted total of each and the pick.
A team sends 5 passages of 300 tokens per question and considers 3. For 20,000 questions a day at an input price of 0.50 dollars per million tokens, print the dollars saved per day.
Explain it without notes
Give the four-part structure of a trade-off answer.
How would you choose a chunk size and defend it?
How do you decide between hybrid search and vectors only?
When is long context a better answer than RAG?
Expected output
accuracy first (precision x2, completeness x2, cost x1)
medium (300 tokens) 19
small (100 tokens) 18
large (800 tokens) 15
pick: medium (300 tokens)
budget first (precision x1, completeness x1, cost x3)
small (100 tokens) 19
medium (300 tokens) 17
large (800 tokens) 10
pick: small (100 tokens)