AnthropicClaude Certified Architect – Foundations2026-104.2 Apply few-shot prompting to improve output consistency and quality
Build a Structured Data Extraction Pipeline
Completed by opening the official lab
Why it matters
Section 4.2 is about choosing examples that resolve hard cases. This exercise puts few-shot examples inside a full extraction pipeline, so you can measure what they fix that the schema and the retry loop can’t.
What to practise
Build an extraction tool and process documents that differ in layout, such as inline citations against a bibliography, or a narrative against a table. Add a handful of examples covering those layouts and compare the results with and without them. Around that, the pipeline needs a schema that can say “absent”, a retry loop driven by validation errors, a 100-document batch, and field-level confidence that routes uncertain records to people.
How it fits
The examples are 4.2.4’s layout and omission cases. In 4.3, the tool contract is 4.3.1 and the schema should let a missing value be null and an unlisted category be other with a detail string (4.3.4). In 4.4, separate errors a retry can fix from evidence the source lacks (4.4.2, 4.4.3). In 4.5, join failures by custom_id before resubmitting (4.5.4) and check the timing against your deadline (4.5.3). In 5.5, calibrate the confidence scores (5.5.2) and break accuracy down by document type and field (5.5.1).