CCAR-F scenarios › Structured Data Extraction · Question 55 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

A nightly job submits 10,000 scanned-and-OCR'd claim documents through the Message Batches API. This morning's results show 312 failed requests, and most of the failures are documents that exceeded the context limit. How should you handle the failures?

Show answer and explanation

Answer: D — Identify the failed requests by custom_id and resubmit only those, splitting oversized documents into chunks that fit within the context limit.

custom_id links each batch request to its response, so you can resubmit only the failed documents, with a fix such as chunking the ones that exceeded the context limit. (a) pays again for 9,688 documents that already succeeded and doesn't fix the size problem. (b) gives up the batch discount on a job that tolerates latency. (c) drops content from every long document, including fields near the end.