Lv.1 0 XP

D4 + D5: System-Level Efficiency Design

Core 7 min +35 XP
💡
THE ANALOGY

Designing a factory for both quality and throughput simultaneously. Quality tools (D4 structured schemas, validation) catch defects early. Throughput tools (D5 context management, batching) reduce waste. Together they produce a system that's both correct and efficient.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Optimizing D4 (output quality) and D5 (context efficiency) separately. The exam tests holistic design — choices in D4 (like schema design) directly impact D5 (context consumption), and D5 choices (like trimming) affect what's available for D4 validation.

KEY POINTS
1 Schema design affects context size: compact schemas with nullable fields use less context than padded schemas.
2 Validation placement: validate early (after D4 extraction) to prevent bad data flowing into D5 pipeline.
3 Batch API for high-volume extraction (D4) reduces D5 context pressure — results arrive structured, not accumulated.
4 Confidence thresholds calibrated together (D4 schema + D5 routing): schema generates confidence, routing uses it.
5 End-to-end efficiency metric: total tokens per successful extraction — combines D4 quality and D5 efficiency.