# CCDV-P Practice: Cost and latency optimization at scale

> 7 free CCDV-P practice questions on cost and latency optimization at scale (8% of the exam), with study notes and explanations.

Source: https://youraidept.com/network/ccdv-p-practice-questions/cost-and-latency-optimization-at-scale

## What to know about Cost and latency optimization at scale

- Cost architecture: cost modeling and forecasting, model routing and cascades across the Claude model family, caching strategy and cache diagnostics, batch against realtime economics, and per-tenant budget enforcement.
- Latency engineering: separate time to first token from total latency, then apply streaming, parallel tool execution, cache checkpointing and effort-level tuning against a stated target.

## Cost and latency optimization at scale questions

All domains (7) Cost and latency optimization at scale (7)

Cost and latency optimization at scale

To cut spend, a team routes every support request to the smallest model. Per-request cost falls, but retries and escalations to people rise, and cost per resolved ticket ends up higher than before. How should the routing decision be made?

- By per-token price alone, keeping the smallest model for everything and adding two more automatic retries before any escalation
- By prompt length alone, sending short requests to the smallest model and long requests to the largest model in the family
- By cost per completed task: route by task class, escalate on a checkable failure signal, and test larger models at lower effort
- By moving every request back to the largest model, on the view that quality problems always cost more than the tokens saved

Check answer

### Show answer

Answer: By cost per completed task: route by task class, escalate on a checkable failure signal, and test larger models at lower effort. Per-token price does not predict the cost of getting the job done: a cheap request that needs retries or a human costs more than a more expensive one that finishes. Routing should be judged on cost per completed task from evals and production data, with escalation triggered by a signal that can be checked, and a larger model at lower effort is a candidate worth measuring. Prompt length is a weak proxy for difficulty.

Cost and latency optimization at scale

A chat product must show the first visible text within two seconds. Median total response time is fourteen seconds, every request re-sends an uncached 25,000-token system prompt, the response is delivered only when complete, and the model reasons before answering even on routine turns. Which changes address the target?

- Stream the response, cache the stable prefix to cut time to first token, and lower effort on routine turns
- Run the turn's tool calls in parallel, so that time spent between model calls no longer delays the reply
- Halve max_tokens on every request, so that the model finishes sooner and the complete response arrives earlier
- Move the requests to the Message Batches API, where higher throughput shortens the wait for each response

Check answer

### Show answer

Answer: Stream the response, cache the stable prefix to cut time to first token, and lower effort on routine turns. The target is about the first visible output, not total time. Streaming shows text as it is produced, caching removes the cost of re-reading a long prefix before generation starts, and lower effort shortens the reasoning that precedes the first visible token. max_tokens is a cap the model does not see, batches trade latency for cost, and no tool calls are described in this turn.

Cost and latency optimization at scale

A nightly job generates summaries for 50,000 documents. Each request shares the same 30,000-token instruction block, and the job currently runs synchronously during business hours at full price. Nobody reads the output before morning. Which design lowers cost most?

- Keep the job synchronous but stream each response, so that the workers can release their connections sooner
- Move the job to batch processing and cache the shared block with the longer cache lifetime, since the discounts combine
- Keep the job synchronous but send a zero-output warm-up request before each document to prime the cache
- Move the job to batch processing but leave caching off, since batch requests cannot make use of the prompt cache

Check answer

### Show answer

Answer: Move the job to batch processing and cache the shared block with the longer cache lifetime, since the discounts combine. Work that nobody waits for belongs in batch processing, which is discounted, and the batch discount applies on top of cache pricing. Because batch requests may be processed more than five minutes apart, the one-hour cache lifetime gives better hit rates, though hits inside a batch are best effort. Streaming does not change price, and a warm-up before every document adds a request per document for a prefix that steady traffic already keeps warm.

Cost and latency optimization at scale

In one agent turn the model requests five independent read-only lookups. The harness runs them one after another at about 800 milliseconds each and returns each result in its own user message. Later turns show the model requesting one tool at a time. What should the harness do?

- Cache every lookup result for twenty-four hours, so that repeated lookups in later turns return without delay
- Raise the reasoning effort, so that the model plans its lookups better and needs fewer of them in each turn
- Run independent read-only calls concurrently, and return all of their results together in a single user message
- Disable parallel tool use in the request, so that the model's behavior matches how the harness executes the calls

Check answer

### Show answer

Answer: Run independent read-only calls concurrently, and return all of their results together in a single user message. When the model asks for several independent calls at once, running them concurrently turns five waits into one. The results belong in one user message: splitting them across messages teaches the model to stop requesting calls in parallel, which is the drift this team observes. Disabling parallel calls locks in the slow path, and caching helps only when the same lookup repeats.

Cost and latency optimization at scale

A B2B platform sells plans with monthly usage allowances. One tenant's automation consumes eight times its allowance in a week. The only control in place is an organization-level spend limit, which would stop every tenant if it were reached. What should the platform build?

- A smaller max_tokens for every tenant's requests, so that no single request can produce a large amount of output
- A separate API key for each tenant, with usage per key reviewed against plan allowances at the end of the month
- A lower organization-level spend limit, so that total spend is capped well before any one tenant can run it up
- Per-tenant metering from response usage in its own gateway, with alerts and soft and hard limits that throttle

Check answer

### Show answer

Answer: Per-tenant metering from response usage in its own gateway, with alerts and soft and hard limits that throttle. Budget enforcement per tenant has to live where the tenant is known: the platform's own request path. Metering from the usage fields of each response gives near-real-time totals, thresholds trigger alerts, and soft and hard limits decide whether to throttle, switch to a cheaper route, or refuse with a clear message. An organization limit is a blunt backstop that punishes everyone, and month-end review notices the overrun after the money is spent.

Cost and latency optimization at scale

A forecast for an agent product multiplied the average tokens per model call by the expected number of calls. Actual spend on long tasks is four times the forecast. What did the model get wrong, and how should it be rebuilt?

- Retries were left out: add a fixed percentage uplift to the forecast to cover the requests that are sent twice
- Traffic grew faster than planned: scale the forecast by the ratio of actual task volume to expected task volume
- Each turn re-sends the growing history, so cost outpaces turn count: model per-task distributions, cache reads, and the tail
- Output tokens were priced at the input rate: reprice the output tokens and keep the same average-based structure

Check answer

### Show answer

Answer: Each turn re-sends the growing history, so cost outpaces turn count: model per-task distributions, cache reads, and the tail. In an agent loop every call carries the whole conversation so far, so input tokens per task grow roughly with the square of the number of turns, and caching reprices that input rather than removing it. A sound model works from distributions per task: turns, cumulative input split into cached and uncached, output, and above all the long tail, where a small share of tasks carries a large share of spend. Flat uplifts and volume scaling keep the linear assumption that failed.

Cost and latency optimization at scale

A classification route runs at the model's default reasoning effort. Its p95 latency misses the target, and traces show that reasoning accounts for most of the output tokens on what are mostly easy inputs. Which change should be tried first?

- A second replica of the service in another region, so that requests are served from closer to users
- A sweep of lower effort levels on the route's eval, adopting the lowest level that holds accuracy
- A retry with a shorter timeout, so that slow requests are abandoned and sent again more quickly
- A tight max_tokens on the route, so that responses are cut off before the reasoning can run long

Check answer

### Show answer

Answer: A sweep of lower effort levels on the route's eval, adopting the lowest level that holds accuracy. When reasoning dominates output on easy inputs, effort is the direct control: lower levels spend fewer tokens and return sooner, and an eval shows how far the route can step down before accuracy moves. max_tokens is a cap the model cannot see and produces truncated responses rather than shorter reasoning. Network distance is not where the time goes, and abandoning slow requests to resend them adds cost and load.

## Next

- [Timed CCDV-P practice exam](https://youraidept.com/network/ccdv-p-practice-exam): 70 questions in 120 minutes, scored against the 720 pass mark.
- [All CCDV-P practice questions](https://youraidept.com/network/ccdv-p-practice-questions) with a domain filter.
- [The CCDV-P exam page](https://youraidept.com/network/ccdv-p): format, weights, registration, study path.

### Other CCDV-P domains

- [Production integration, reliability, and knowledge grounding (20 questions)](https://youraidept.com/network/ccdv-p-practice-questions/production-integration-reliability-and-knowledge-grounding)
- [Advanced agent architecture and orchestration (14 questions)](https://youraidept.com/network/ccdv-p-practice-questions/advanced-agent-architecture-and-orchestration)
- [Observability and production monitoring (10 questions)](https://youraidept.com/network/ccdv-p-practice-questions/observability-and-production-monitoring)
- [Evaluation engineering and quality assurance (12 questions)](https://youraidept.com/network/ccdv-p-practice-questions/evaluation-engineering-and-quality-assurance)
- [Runtime guardrails and production security (10 questions)](https://youraidept.com/network/ccdv-p-practice-questions/runtime-guardrails-and-production-security)
- [Advanced debugging and incident response (9 questions)](https://youraidept.com/network/ccdv-p-practice-questions/advanced-debugging-and-incident-response)
- [Agent fleet operations for software delivery (10 questions)](https://youraidept.com/network/ccdv-p-practice-questions/agent-fleet-operations-for-software-delivery)

## FAQ

### How much of the CCDV-P exam is cost and latency optimization at scale? +

8% of the marks, per the official CCDV-P exam guide. The full domain list with weights is on the CCDV-P exam page.

### Are these real CCDV-P exam questions? +

No. They are 7 original scenario questions written from the blueprint for this domain. Reproducing exam content would violate the candidate agreement.

### How should I study cost and latency optimization at scale for CCDV-P? +

Read the domain notes on this page, answer the questions with explanations hidden, then take the timed CCDV-P practice exam and check the per-domain breakdown for this domain.

## Who wrote this

### [Matei Olaru](https://youraidept.com/about/matei-olaru)

CEO, Your AI Department

Former public-company CEO, corporate attorney, and World Bank consultant. Runs the YAID Network and the partner relationship with Anthropic.

### [Michael Greenberg](https://youraidept.com/about/michael-greenberg)

AI Product Lead, Your AI Department

AI at Google, Meta, and Samsung. Six patents. Leads member support and the certification prep guidance.

Your AI Department is a registered Claude Partner Network company. Our members sit these exams under our partner standing. Facts on this page were last checked on November 25, 2026.

## Ready to sit CCDV-P for real?

Registration needs a Claude Partner Network organization. [YAID Network](https://youraidept.com/network) members register under our partner standing. $149 per quarter, exam fee separate.

[Apply to join YAID ↗](https://youraidept.com/network/apply?ref=drill)[How registration works →](https://youraidept.com/network/register-for-claude-certification)