CCDV-F practice question 2 of 10

You are building a Claude application that needs to deliver model output to end users as it is generated, instead of waiting for the full response to complete. The Claude API mechanism you would use is...

Full set: 95 questions
Answer options
A: Structured JSON output, which delivers responses only after the model has finalized the JSON shape across the entire response.
B: Streaming responses, which deliver tokens incrementally as the model generates them so users see output progressively. Correct answer
C: The Batch API, which delivers full responses after a delay suitable for non-interactive workloads.
D: Prompt caching, which speeds up the cost profile of future requests and does not affect the delivery timing of the first response.
Correct Answer:
B. Streaming responses, which deliver tokens incrementally as the model generates them so users see output progressively.
Explanation

Streaming responses allow the Claude API to return generated tokens incrementally using Server-Sent Events (SSE). This mechanism is essential for interactive applications because it significantly reduces perceived latency (Time to First Token). By streaming, end users can read the model's output progressively as it is generated, rather than waiting for the entire generation process to complete before seeing any text.

Why Incorrect

A. Standard structured output waits for the entire generation process to complete before returning the final payload.
C. The Batch API is designed for asynchronous, high-volume processing with up to a 24-hour turnaround, not real-time delivery.
D. Prompt caching reduces latency and cost for repetitive context but does not inherently stream the output tokens to the user.

References

1. Anthropic Claude API Reference, "Streaming Messages" section.

2. Anthropic Developer Docs, "Reducing Latency" guidelines.

Scroll to Top