Week 06: Exercises & Checklist
Graded exercises
- Easy: Re-run
01-prompt-suite-bol-extraction.ipynbwith a different model (setOPENAI_MODELorOPENROUTER_MODEL) and report the version-3 score delta. - Standard: Add a 4th prompt version with chain-of-thought ("think step by step about the cargo block first"). Compare its accuracy and token cost against version 3.
- Stretch: In
02-context-engineering.ipynb, add a tiered eviction policy: label each budget claimant as pinned / compressible / disposable, then re-run the worksheet with a 3× longer document and show what gets cut first. - Portfolio: Save the prompt suite as
projects/bol_extractor.pywith a JSON eval log (version → score → note) and a gate that fails below 90% per-field accuracy.
Hints
- Easy: Set
OPENAI_MODEL(orOPENROUTER_MODEL) before running; re-run only version 3 and diff itsOVERALLrow against the default model's score. - Standard: Add a
version == 4branch tomake_promptthat prepends a "reason about the cargo block first" line; compare its accuracy and its token cost (the CoT text is extra input tokens). - Stretch: Give each worksheet claimant a tier label (
pinned/compressible/disposable) and, when the document triples, evict in that order before re-measuring the total against the ceiling. - Portfolio: Wrap the three
make_promptversions and the grader in a function, dump{version: score}to JSON, andsys.exit(1)when the best score < 0.90.
Checklist (mirrors manifest.json + Excel tracker)
- [ ] Mon: Study prompt engineering and context engineering (knowledge-base 04).
- [ ] Tue: Build the BoL extraction prompt suite; run it against 20 synthetic documents.
- [ ] Wed: Add structured outputs and few-shot examples; improve per-field accuracy.
- [ ] Thu: Context engineering: budgets, compaction, caching, measure tokens and latency.
- [ ] Fri: Use case: reach 90%+ field accuracy on the eval set; document the failure cases.
- [ ] Sat: Take the Week 6 quiz (quiz.md), pass with 8/10; record the score in Notes.
- [ ] Milestone: Update the Excel tracker; commit the prompt suite and eval results.