Friday, August 21, 2026

    Design efficient batch processing strategies

    Domain 4 — Prompt Engineering & Structured Output · 20% of the exam

    Task statement 4.5

    Design efficient batch processing strategies

    What you should be able to do
    • Match the API to the latency requirement — synchronous for blocking checks, batch for tolerant work.
    • State the batch trade: substantially cheaper, a long processing window, no latency guarantee.
    • Know that a batch request cannot run a CLIENT tool loop mid-request, while server tools run inside it.
    • Correlate responses by custom id, and resubmit only what failed.
    • Refine the prompt on a sample before committing a large volume.
    Exam traps (5)

    Move the pre-merge check to the batch API for the cost saving.

    There is no latency guarantee and the window runs to many hours, so the gate that had to answer before a merge now blocks it indefinitely.

    Batch suits work nobody is waiting on. A blocking check is not that.

    Plan the schedule against the typical turnaround you observed.

    Typical is not a commitment; the schedule has to hold when a batch takes the full window, which is the case that breaks the SLA.

    Size submission frequency against the worst-case window, not the average.

    Run the agentic extraction loop through batch to cut its cost.

    Each batch request is self-contained, so your code can never return a client tool_result mid-request and the loop has nowhere to run. Server tools are the exception — web search and code execution run inside the request.

    Batch is for self-contained requests. A client-tool loop stays synchronous; server tools batch fine.

    Resubmit the whole batch when some documents fail.

    It re-pays for everything that already succeeded and takes another full window to return the same results.

    Identify the failures by their custom id and resubmit only those, modified for whatever caused the failure.

    Submit the full volume and iterate on whatever comes back.

    A prompt flaw is discovered at full scale after a full window, and every iteration costs both again.

    Refine against a sample first; batch what you have already seen work.

    Primary sources
    Know cold
    • Message Batches API
    • custom_id
    • Rate limit
    • Correlation id

    9 practice questions in the bank are tagged to this task statement.

    Practise this task in context: open it inside the interactive study guide, which carries the concept cards, the mock quiz and the practice simulation.

    Blueprint-aligned independent practice. Koko's scenarios and company facts are fictional and synthetic. This aid does not reproduce official exam questions or Anthropic's undisclosed scoring model, and is not affiliated with or endorsed by Anthropic.