Scenario 6 of 6
Structured Data Extraction
Your team uses Claude to turn unstructured documents into data that downstream systems can consume. The pipeline validates the extracted output against JSON schemas. It must maintain high extraction accuracy and handle edge cases reliably as part of the downstream workflow.
Primary domains: Prompt Engineering & Structured Output · Context Management & Reliability
What this scenario tests
The most mechanical scenario and the one with the clearest right answers. Schema design through tool use, tool_choice, nullable fields, validation-retry loops and batch processing all appear directly. The reliability half is about knowing how good the output actually is — confidence calibration and sampling rather than a general sense that it looks fine.
Traps it is built to catch
- Asking for JSON in the prompt instead of enforcing a schema through tool use. The first works until it does not, silently.
- Making every field required. A field the model must fill invites a plausible invention when the document genuinely lacks the value — nullable is the honest option.
- Reporting one accuracy number. Accuracy varies by field and by document type; a single average hides exactly the segment that is failing.
The most useful hour of preparation
Extract from a hundred real documents, validate against a schema, and measure per-field accuracy against a labelled subset. The gap between your expectation and the measurement is the lesson.
Lessons that cover this scenario
5 of the 30 task statements, across 2 domains.
- 4.2Few-Shot PromptingApply few-shot prompting to improve output consistency and quality
- 4.3Structured Output with Tool UseEnforce structured output using tool use and JSON schemas
- 4.4Validation, Retry, and Feedback LoopsImplement validation, retry, and feedback loops for extraction quality
- 4.5Batch Processing StrategiesDesign efficient batch processing strategies
- 5.5Human Review & Confidence CalibrationDesign human review workflows and confidence calibration