Domain 6 · 15% of the exam
Prompt and Context Engineering
Keeping long sessions on track with compaction, tool-output pruning, subagents or a fresh start; revising prompts to close gaps that evaluations expose; strict structured output with validation and defensive parsing; and grounding answers in supplied documents with citations and a "not found" path.
- 6.1Keeping Long Sessions on TrackRecognize context bloat and drift in long sessions and agents, and restore behavior with the right technique (pruning stale tool output, compaction with guidance on what to keep, subagents for bulky side work, persistent notes for decisions) or by starting fresh with a short summary when the task changes.
- 6.2Revising a Prompt That Evaluations FlagRevise a prompt to close a gap that regression evaluations exposed, using precise instructions with the reason behind them, the right system-versus-user placement, varied examples, measurable output constraints and delimited untrusted input, then keep the gap closed by adding the failing cases to the regression set.
- 6.3Structured Output and Defensive ParsingProtect downstream code from malformed or unexpected model output with structured outputs and strict tool schemas, schemas that mirror the data (arrays, enums, nullable fields), business-rule validation after parsing, stop-reason and refusal checks before reading fields, and defensive parsing for any free-text fallback.
- 6.4Grounding Answers and Citing SourcesBuild requests that answer only from supplied documents, cite the passages they used and say "not found" when the documents are silent, and decide from corpus size, cost and freshness whether to put the whole document set in context or retrieve only the relevant passages.