CCAR-F scenarios › Structured Data Extraction · Question 54 of 60

Scenario 6 · Structured Data Extraction

You run a system that uses Claude to turn unstructured documents into structured records, validates every result against JSON schemas, and passes the output to downstream systems. Accuracy has to stay high across messy and unusual documents, and edge cases must be handled cleanly rather than with plausible-looking guesses.

Prompt Engineering & Structured Output

Your contract schema has a nullable effective_date. Spot checks show it comes back null for about 30% of contracts where the date actually appears, either in the signature block or in phrasing like "made this 3rd day of March, 2025." Contracts with a labelled "Effective Date:" line extract correctly. What is the most effective change?

Show answer and explanation

Answer: B — Add few-shot examples showing correct effective_date extraction from contracts with varied structures, including signature-block and prose-style dates.

Few-shot examples showing correct extraction from documents with varied formats are what section 6 names for null extraction of fields that really are present. (a) would make the model fabricate dates on contracts that truly have none. (c) is a vague instruction that doesn't show the model the unfamiliar layouts. (d) would often pick up the wrong date, such as a reference to an earlier agreement or a printed form date.