{
  "module": "3 — Context Management",
  "course": "Master Course — Harness Engineering",
  "version": "1.0.0",
  "duration_minutes": 40,
  "total_questions": 18,
  "bloom_distribution": { "target": "20% recall / 40% application / 40% analysis", "actual": { "recall": 4, "application": 7, "analysis": 7 } },
  "passing_score_percent": 70,
  "questions": [
    { "id": "Q01", "bloom": "recall", "type": "multiple_choice", "prompt": "State the Lost-in-the-Middle finding (source + number).", "options": ["Liu et al. 2023; 30%+ drop when info is mid-context", "Anthropic 2024; 10% drop", "OpenAI 2023; 50% drop at end", "No measurable effect"], "answer_index": 0, "rationale": "Liu et al. 2023, arXiv:2307.03172. 30%+ performance drop for mid-context info, even in million-token models. Persists across sizes." },
    { "id": "Q02", "bloom": "recall", "type": "multiple_choice", "prompt": "What is the 256k degradation cliff?", "options": ["The max context size", "Hard quality degradation around 256k tokens regardless of stated limit", "A pricing tier", "A model version number"], "answer_index": 1, "rationale": "Effective context < nominal context. A '1M token' model performs measurably worse above 256k. Manage proactively." },
    { "id": "Q03", "bloom": "recall", "type": "multiple_choice", "prompt": "State the ACON compaction result.", "options": ["10% reduction, 99% accuracy", "26-54% reduction, 95%+ accuracy", "90% reduction, 50% accuracy", "No reduction possible"], "answer_index": 1, "rationale": "Compaction done well: 26-54% token reduction, 95%+ accuracy. Does not meaningfully degrade performance." },
    { "id": "Q04", "bloom": "recall", "type": "multiple_choice", "prompt": "State the 3-tier JIT memory design.", "options": ["Short/medium/long term", "T1 index (always) · T2 topic files (on demand) · T3 raw logs (search only)", "RAM/disk/tape", "Cache/DB/archive"], "answer_index": 1, "rationale": "Claude Code benchmark. T1 always present (low cost); T2 on demand (medium); T3 search-only (high, never bulk-loaded). Like a database index." },
    { "id": "Q05", "bloom": "application", "type": "multiple_choice", "prompt": "A 50-turn session has history piling into mid-context. Name the intervention and target.", "options": ["Increase context window", "Compaction (preserve task/decisions/recent; compress verbose outputs). Target: keep effective context below the 256k cliff.", "Use a stronger model", "Reduce tool count"], "answer_index": 1, "rationale": "History is the unbounded rot source. Compaction is the targeted cure. Goal: stay below the degradation cliff." },
    { "id": "Q06", "bloom": "application", "type": "multiple_choice", "prompt": "The model needs detail it lost during compaction. How does it get it back?", "options": ["It can't — compaction is irreversible", "JIT retrieval: T2 topic files on demand; T3 raw logs searchable. The T1 index tells the model what exists.", "Re-read all files", "Ask the user"], "answer_index": 1, "rationale": "The 3-tier design exists for exactly this. Compaction loses detail from context, but JIT retrieval brings it back on demand." },
    { "id": "Q07", "bloom": "application", "type": "multiple_choice", "prompt": "You're placing the original task in context. Where does it survive best?", "options": ["Turn-1 user message (history)", "The system prompt (first position, highest attention)", "A tool output", "Mid-context"], "answer_index": 1, "rationale": "Priority stack + Lost in the Middle. System prompt is first = highest attention. Turn-1 history is mid-context = weak attention. Same info, different survival." },
    { "id": "Q08", "bloom": "application", "type": "multiple_choice", "prompt": "A team's harness fills 800k of a 1M context window. Per the cliff, what's the problem?", "options": ["None — under the limit", "It's past the 256k quality cliff. Effective context is being exceeded; performance degrades.", "800k is too small", "The model needs more training"], "answer_index": 1, "rationale": "Effective < nominal. 800k is past the ~256k cliff. The harness must manage to keep EFFECTIVE context below the cliff, not just fit the nominal limit." },
    { "id": "Q09", "bloom": "application", "type": "multiple_choice", "prompt": "Synchronous vs async compaction. Which do most production harnesses use?", "options": ["Async (background)", "Synchronous (in-loop, at ~50% threshold). Simple, immediate, no race conditions.", "Neither", "Both simultaneously"], "answer_index": 1, "rationale": "Sync is the production default. Triggered at ~50% of context window. Async has race conditions; sync is simpler and immediate." },
    { "id": "Q10", "bloom": "application", "type": "multiple_choice", "prompt": "Your system prompt changes every turn. Does cache_control help?", "options": ["Yes — caching always helps", "No. Dynamic prompts invalidate the cache. cache_control rewards stability (fixed prompt across turns).", "Only if the prompt is small", "Only with Anthropic models"], "answer_index": 1, "rationale": "Caching requires a stable prefix. Dynamic prompt assembly invalidates the cache each turn, losing the benefit." },
    { "id": "Q11", "bloom": "application", "type": "multiple_choice", "prompt": "Anti-pattern: a team drops the oldest messages when context fills (sliding window). What's the catastrophic failure?", "options": ["No failure — it's standard", "Loses the ORIGINAL TASK — the model forgets why it's working. Cure: compaction (preserve task, compress middle).", "Token cost increases", "The model slows down"], "answer_index": 1, "rationale": "The sliding window anti-pattern. Blind eviction loses the highest-priority content (the task). Compaction is selective; sliding window is not." },
    { "id": "Q12", "bloom": "analysis", "type": "multiple_choice", "prompt": "Why does the model attend strongly to the system prompt and latest user message but weakly to history?", "options": ["History is less important", "The U-shape attention curve (Lost in the Middle). Start + end get strong attention; middle is weak. Position determines attention as much as content.", "History uses fewer tokens", "The model is trained that way"], "answer_index": 1, "rationale": "Position effect. The system prompt (first) and user msg (last) are in the strong-attention zones. History (middle) is in the desert. This is why compaction targets history and why the task survives better in the system prompt." },
    { "id": "Q13", "bloom": "analysis", "type": "multiple_choice", "prompt": "Why is history 'the rot source' when it's only 18% of context (vs tool outputs at 67.6%)?", "options": ["18% is still large", "History is the only layer that GROWS UNBOUNDEDLY with turns. Tool outputs (67.6%) are large but compressible per-turn. History accumulates and piles into the weak-attention middle.", "History is lower quality", "History isn't structured"], "answer_index": 1, "rationale": "The key insight: bounded-but-large (tool outputs, compressible) vs unbounded-growing (history, the rot source). Compaction targets the unbounded layer." },
    { "id": "Q14", "bloom": "analysis", "type": "multiple_choice", "prompt": "Why is the 3-tier design compared to a database index?", "options": ["Both use vectors", "You don't load the whole table; you load the index (T1, always, cheap), fetch rows on demand (T2), avoid full scans (T3). Same principle: minimal always-present, detail on demand.", "Both are fast", "Both store text"], "answer_index": 1, "rationale": "The index/row/scan analogy. T1 is the index (always present). T2 is the row fetch (on demand). T3 is the full scan (avoided). The model never pays T3 cost unless it explicitly searches." },
    { "id": "Q15", "bloom": "analysis", "type": "multiple_choice", "prompt": "Tool outputs are 67.6% of context but 'compressible.' Name the two mechanisms.", "options": ["Bigger context window + stronger model", "(1) Module 2 truncation (cap results, visible flag). (2) Module 3 observation masking (replace raw with summary after acted on). Both reduce the 67.6% share.", "Caching + compaction", "Vector retrieval + file read"], "answer_index": 1, "rationale": "Two levers on the dominant share. Truncation caps at intake (Module 2); masking compresses after action (Module 3). Together they keep tool outputs from dominating." },
    { "id": "Q16", "bloom": "analysis", "type": "multiple_choice", "prompt": "Why provide keyword, vector, AND file-read retrieval — not just one?", "options": ["Redundancy", "Different use cases: keyword for exact code, vector for semantic, file-read for known paths. One method is unreliable for the other two. Tool surface (Module 2) determines retrieval capability.", "Cost savings", "Simplicity"], "answer_index": 1, "rationale": "Each method has a distinct best case. Keyword fails on semantics; vector fails on exact match; file-read requires knowing the path. Providing all three gives the model the right tool per query." },
    { "id": "Q17", "bloom": "analysis", "type": "multiple_choice", "prompt": "Observation masking: keep the Thought, hide the Observation. What's the tradeoff?", "options": ["No tradeoff — always beneficial", "Model sees decisions without noise (gain), but raw data is GONE unless retained in a side store for JIT retrieval (cost). If needed later and not retained, it's irrecoverable.", "Saves tokens but loses all accuracy", "Only works with large models"], "answer_index": 1, "rationale": "The cost of masking: irrecoverability unless paired with JIT retention. Claude Code retains masked outputs in T3 (raw logs) so they're searchable if needed later. Without that side store, masking is lossy." },
    { "id": "Q18", "bloom": "analysis", "type": "multiple_choice", "prompt": "Premature compaction (threshold too low). What's the cost?", "options": ["No cost — more compaction is safer", "Wastes tokens on compaction calls AND loses detail the model needs. ACON's 26-54% is the target efficiency, not 90%. Over-compacting degrades accuracy.", "Saves tokens", "Improves speed"], "answer_index": 1, "rationale": "Compaction has a cost (the summarization LLM call) and an accuracy risk. The threshold tunes the tradeoff. Too low = wasted calls + lost detail. Target the ACON range, not maximal compression." }
  ]
}
