Contents
  1. Useful completion and representative demand
  2. Task, attempt, and shared-cost attribution
  3. Unit economics of accepted outcomes
  4. Latency budgets and dependency paths
  5. Tail latency and deadline boundaries
  6. Cache validity and reuse boundaries
  7. Cache lifecycle and net savings
  8. Routing and cumulative cascade costs
  9. Recovery within shared resource limits
  10. Sustainable capacity and useful throughput
  11. Provisioning, warm capacity, and admission policy
  12. Interventions with end-to-end impact
  13. Comparable optimization experiments
  14. Feasible operating points and reassessment
  15. Check understanding
  16. Open questions
  17. Selected talks
  18. References
  19. Talk library
← All topics

AI Cost and Performance Engineering

AI cost and performance engineering minimizes the expense of useful completed work while preserving quality, latency, and coverage requirements. The relevant unit is the complete task—including dependent services, unsuccessful attempts, waiting, and required review. A cheaper model call helps only when the resulting system still delivers the intended outcome within its operating constraints.

Useful completion and representative demand

A record-update service retrieves evidence and the current record, proposes a change, validates it, obtains review when required, and confirms the write. An acknowledgement means the request arrived. A proposal means a candidate change exists. Accepted completion requires the intended, authorized update and its required checks. These are different events with different clocks.

An acceptance criterion states an observable requirement: correct fields, supporting evidence, required approval, and confirmed persistence. Parseable output alone is insufficient. Evals: Evidence for a Bounded Claim develops these criteria; here they establish which outcomes an optimization must preserve.

A proposal is not a completed update

Example

Review and write confirmation remain inside the task boundary.

The service reads, proposes, and validates. Review is conditional. Only a confirmed authorized write reaches accepted completion; rejection and uncertain effects have distinct exits.
Read the diagram as text
  • Read evidence and current record.
  • Propose update.
  • Validate proposal.
  • Required review.
  • Authorize and commit.
  • Accepted completion.
  • Rejected.
  • Effect unresolved.
  • Read evidence and current recordPropose update: Data: evidence and record.
  • Propose updateValidate proposal: Data: proposed change.
  • Validate proposalRequired review: Control: valid; review required.
  • Validate proposalAuthorize and commit: Control: valid; no review required.
  • Validate proposalRejected: Control: invalid.
  • Required reviewAuthorize and commit: Control: approved.
  • Required reviewRejected: Control: declined.
  • Authorize and commitAccepted completion: Control: write confirmed.
  • Authorize and commitRejected: Control: denied or confirmed failure.
  • Authorize and commitEffect unresolved: Control: effect unknown.

A service-level indicator, or SLI, measures a defined service property. A service-level objective, or SLO, sets its target over a stated population and period. Specify response and completion targets separately, plus quality, coverage, and spending limits. A target without its measurement boundary, eligible tasks, and operating conditions is incomplete.

A token is a model vocabulary unit; text length and token count are not interchangeable. Tokenization explains the representation. Extend the serving workload distribution to whole tasks: retain which input lengths, output lengths, and execution paths occurred together instead of combining unrelated averages.

Demand dimensionRecord together
ArrivalsTask class, arrival time, bursts, and interactive or deferred service
Internal workModel calls, retrievals, tool operations, retries, and generated lengths per task
Human involvementReview requirement, waiting interval, and eventual decision
ReuseCompatible repeated context, reusable results, and gaps between requests

Work amplification is the internal work generated by one incoming task. A difficult case might require additional retrieval, correction, and review, but those relationships must be observed rather than assumed. Preserve complete task records so a change in traffic mix cannot masquerade as an efficiency improvement.

Task, attempt, and shared-cost attribution

A task represents user intent; an attempt is an execution toward that intent; a service call is one operation within an attempt. Preserve their relationship across failures and escalation. Identity across services and execution attempts supplies the tracing convention. For accounting, record usage per call before aggregating by task.

Ledger fieldsPurpose
Task, attempt, operation, provider request IDConnect each expense to its originating work
Usage quantity and unit; model/configuration; timestamp; effective priceMake estimated charges reproducible
Observed, estimated, reconciled, or unknownDistinguish evidence status from the amount
Shared pool, allocation rule, allocated amountAssign shared expense once

Include material model, retrieval, tool, environment, storage, transfer, evaluation, and required review expenses. Direct costs belong to identifiable work. Shared expenses need a documented allocation rule, such as reserved capacity or measured consumption. Do not add both a shared pool's full charge and its allocated portions to the same total.

Provider usage and billing are separate evidence streams. Anthropic's documented reports, for example, have different coverage for token categories, tools, and service tiers; reports can arrive later and require pagination. Reconcile estimates against covered billing totals while retaining unmatched charges. Provider aggregates cannot reconstruct missing task-to-attempt relationships or external review expense.

Failed, abandoned, and speculative work remains attributable even when no answer is selected. Telemetry also consumes resources: collection, processing, and storage belong in operating costs. Task metrics and usage accounting defines the reporting boundary. Raw prompts are usually unnecessary for a cost ledger and introduce additional storage and exposure.

Unit economics of accepted outcomes

Unit economics relates expense to a delivered unit. For a defined task cohort, Caccept=CcohortNaccept.C_{\mathrm{accept}}=\frac{C_{\mathrm{cohort}}}{N_{\mathrm{accept}}}. Here CcohortC_{\mathrm{cohort}} includes all attributable expense, including unsuccessful work, and NacceptN_{\mathrm{accept}} counts accepted completions. The ratio is undefined when Naccept=0N_{\mathrm{accept}}=0.

Assume two routes each process the same 100 tasks under identical acceptance rules, with all outcomes resolved. These example charges include one initial model call per task, subsequent attempts, required review, and allocated capacity. The ledger makes the cheaper initial call's downstream consequences visible.

Cohort quantityRoute ARoute B
Initial calls100 × $0.20 = $20100 × $0.50 = $50
Additional attempts$30$10
Required reviews30 × $2 = $6010 × $2 = $20
Shared allocation$10$10
Total expense$120$90
Accepted / failed / unresolved80 / 20 / 090 / 10 / 0
Accepted and timely7085
Cost per accepted completion$120 / 80 = $1.50$90 / 90 = $1.00

Report acceptance rate, timely acceptance, review burden, and task-cost spread alongside the ratio. A lower average can conceal expensive exceptions. Marginal cost is the extra expense of another task; average allocated cost includes its share of fixed expense. Total cost of ownership also includes acquisition, operations, maintenance, and labor. Paid idle capacity does not disappear because it produced no calls.

If 20 tasks remain unresolved at the reporting cutoff, report them separately and mark both outcomes and incomplete charges as provisional. Compare cohorts after the same follow-up horizon. An unresolved eventual outcome is not success; missing a specified completion deadline can already be a definite failure. Delayed outcomes explains this distinction.

Feedback from only the easiest or most satisfied users does not establish the whole cohort's acceptance rate. Preserve known successes, known failures, and unresolved cases. Better observation coverage can change the measured ratio without changing system behavior.

Latency budgets and dependency paths

A latency budget allocates an end-to-end allowance across required work and waiting. The critical path is the longest dependency chain under the represented constraints. Independent operations can overlap, but a dependent operation must wait for every prerequisite. Accelerating a shorter parallel branch leaves completion unchanged while another unchanged branch still determines the join.

Represent queueing and resource constraints explicitly. Taking the latest predecessor finish already accounts for prerequisite waiting; adding that same wait again double-counts it. Shared equipment can serialize otherwise independent work. Shortening an apparently noncritical operation may therefore help by releasing a resource, even when a fixed dependency-only analysis predicts no change.

The slower read controls the join

Example timings

Shortening the record read alone leaves completion unchanged.

Task01,200 msDuration 1,200 ms
Admission wait0100 msDuration 100 msWithin Task
Evidence read100400 msDuration 300 msWithin Task
Record read100250 msDuration 150 msWithin Task
Proposal generation400800 msDuration 400 msWithin Task
Validation800900 msDuration 100 msWithin Task
Commit and confirmation9001,200 msDuration 300 msWithin Task
No-review path. Reads start after admission; proposal waits for both, then validation and commit follow. Acknowledgement occurs at 100 ms, useful proposal at 800 ms, and verified completion at 1,200 ms. Children belong to the task. Overlapping spans must not be summed as elapsed time.
Read the diagram as text
  • Task. 0 to 1,200 ms; duration 1,200 ms.
  • Admission wait. 0 to 100 ms; duration 100 ms. Parent: Task.
  • Evidence read. 100 to 400 ms; duration 300 ms. Parent: Task.
  • Record read. 100 to 250 ms; duration 150 ms. Parent: Task.
  • Proposal generation. 400 to 800 ms; duration 400 ms. Parent: Task.
  • Validation. 800 to 900 ms; duration 100 ms. Parent: Task.
  • Commit and confirmation. 900 to 1,200 ms; duration 300 ms. Parent: Task.

Span parentage identifies execution structure; temporal overlap identifies concurrency. Neither alone proves the complete dependency graph. Reuse spans and completion boundaries, and include network, admission, tool, validation, delivery, and review waits wherever the task contract requires them. Historical waits explain a trace but need not remain constant after an optimization.

Time to first token, or TTFT, needs an explicit observation boundary. AIPerf measures request start to the first nonempty content response. That fragment need not be useful or complete. Streaming can improve first useful output without advancing verified completion; the user may still be waiting for validation or a confirmed write.

Prefill processes the supplied prompt; decode generates its continuation iteratively. Their resource demands differ, as LLM Inference explains. Separate these engine intervals from client-observed latency. Faster inference cannot remove an unchanged tool wait or network round trip.

Tail latency and deadline boundaries

Tail latency describes the slow end of a latency distribution. P50 is the median; P95 and P99 locate the 95th and 99th percentiles. P95 is not the maximum. State the population and percentile convention, and retain separate targets for typical and slow experiences.

Component percentiles do not generally add. Assume 100 tasks each execute A then B, using nearest-rank percentiles. The paired durations below place the slow A and slow B operations on different tasks.

TasksABTask total
901 ms1 ms2 ms
5100 ms1 ms101 ms
51 ms100 ms101 ms

Each component's P95 is 1 ms, but task P95 is 101 ms. For parallel dependencies, the task instead waits for the required maximum. More dependencies create more opportunities for a slow operation to determine completion. Measure the combined workflow rather than constructing its percentile from component summaries.

Investigate the tail by execution path: admission waits, cold starts, cache misses, long generation, tool delays, and recovery. Keep timeout and unfinished counts beside completed-task latency. Excluding slow unfinished work can improve the reported median while deadline attainment deteriorates.

A deadline states when the caller stops waiting; a timeout is an allowed duration. Propagate the remaining allowance rather than granting each downstream call a fresh full timeout. Reserve time for validation and delivery. gRPC deadlines distinguish cancellation of the call from the application's responsibility to stop spawned work. Neither proves immediate billing termination.

Cache validity and reuse boundaries

A cache hit means finding an entry eligible for reuse under the current request's conditions. A cache key identifies candidate reusable work; a matching key is insufficient if authorization, freshness, or other validity requirements no longer hold. The cached object determines which work can be skipped.

CacheStored objectWork avoided
Application answerA previously generated responseAnswer generation; earlier retrieval may still run
Retrieval or read-resultDocuments or read-only service resultsEligible source reads, subject to current access and revision
Compatible prefixAttention keys and values derived from processed inputRepeated prefill for that prefix; new output still requires generation

For a cached record answer, identity can include request parameters, verified tenant and permission scope, personalization, source revision, and relevant model and instruction versions. Tenant identity must come from trusted authentication state, not model-proposed fields. Recheck access at reuse; a previously valid result can become forbidden after permissions change. Authorization boundaries owns those controls.

Semantic caching retrieves answers through approximate meaning similarity. A similar sentence can still differ in negation, entity, date, or conversation context. MeanCache, for example, checks conversation context as well as query similarity. Evaluate false reuse on decisive differences; similarity does not establish freshness, permission, or suitability for a particular user.

Prefix caching reuses numerical representations derived from a compatible shared token prefix, not a stored answer. Semantic resemblance is insufficient, and a valid prefix hit does not refresh external facts. Compatible prefix reuse explains the mechanics. Its prefill savings may matter little when most elapsed time is spent generating a long continuation.

A cached confirmation cannot perform a newly requested update. Read reuse and action execution have different contracts. If a previous update's effect is uncertain, reconcile that operation's identity and state before repeating it; this is safe retry handling, not ordinary answer caching.

Cache lifecycle and net savings

Over the same task cohort, Scache=CuncachedCcache enabled.S_{\mathrm{cache}}=C_{\mathrm{uncached}}-C_{\mathrm{cache\ enabled}}. The cache-enabled total includes remaining computation plus lookup, fill, storage, transfer, refresh, and invalidation expense. Positive savings matter only while accepted outcomes remain equivalent.

Request hit rate is hits divided by eligible lookups. It does not weight avoided expense. Assume two caches each hit on 50 of 100 requests: avoiding $0.01 per hit saves $0.50 before overhead; avoiding $1 per hit saves $50. Equal hit rates can therefore have very different economic value.

Identity survives loss of validity

Example

An identifiable entry can become unusable.

1 / 5 · Missing

Current: absent.

E1 always identifies key K at source revision 7. Each step adds a state; earlier states remain history. Revision 8 invalidates E1 rather than changing its identity.
Read the diagram as text
  • E1: K, revision 7. Logical entry identity; payload availability changes.
  • Absent.
  • Filling.
  • Reusable.
  • Invalidated.
  • Retired.
  • E1: K, revision 7Absent: Lifecycle begins.
  • AbsentFilling: Eligible miss starts fill.
  • FillingReusable: Valid fill completes.
  • ReusableInvalidated: Source advances to revision 8.
  • InvalidatedRetired: Payload removed.
  1. Missing. Current: absent. Active: E1: K, revision 7, Absent. New: E1: K, revision 7, Absent.
  2. Computing. Current: filling; no reusable result yet. Active: E1: K, revision 7, Absent, Filling. New: Filling.
  3. Available. Current: reusable under revision 7. Active: E1: K, revision 7, Absent, Filling, Reusable. New: Reusable.
  4. Source changed. Current: invalidated; previous validity is historical. Active: E1: K, revision 7, Absent, Filling, Reusable, Invalidated. New: Invalidated.
  5. Removed. Current: retired; revision 8 needs another entry. Active: E1: K, revision 7, Absent, Filling, Reusable, Invalidated, Retired. New: Retired.

Time to live, or TTL, limits an entry's retention or freshness interval. Longer retention can bridge request gaps but occupies capacity longer. Eviction removes entries under capacity policy; invalidation removes reuse eligibility after a relevant change. Deployment warm-up starts with missing entries. None of these states makes cache lifetime equivalent to source age.

Forecast reuse gaps, not just request frequency. Human review can interrupt otherwise rapid request sequences. Also measure refill work and retrieval time: retained context is useful only if it reaches execution quickly enough. A larger cache can hold more reusable state without delivering the expected latency improvement.

A cache stampede occurs when many callers independently refill the same missing entry. Request coalescing shares one eligible in-flight fill. Matching authority and validity conditions remain necessary. A failed fill must leave waiters with an explicit failure or bounded recovery; it must not create a reusable success entry.

Coalescing trades duplicate computation for waiting. If the result cannot satisfy every waiting request, additional forwarding may be needed and some callers wait longer. Capacity tests should therefore include invalidation bursts and incompatible requests, not only steady traffic against a warm cache.

Routing and cumulative cascade costs

Routing chooses an execution path using information available at that decision. Explicit task rules can select deterministic code, a specialist model, or a general model. A fixed chain prescribes operations; a router chooses a branch. Neither requires an open-ended agent loop.

Pre-generation routing sees the query but not its future answer. RouteLLM illustrates this boundary by predicting model preference before generation. A cascade instead generates an answer, checks it, and escalates selected cases. Its additional decision evidence has already incurred expense and elapsed time.

Decisions acquire information by doing work

Example

Only the later checker can inspect a generated answer.

Initial routing uses request information. The first model then produces an answer for checking. Escalation retains the first stage's expense and delay. An unaccepted final result exits without a completion claim.
Read the diagram as text
  • Request.
  • Initial router. No generated answer yet.
  • First model and answer.
  • Check answer.
  • Next model and validation.
  • Accepted.
  • Stop or permitted deferral.
  • RequestInitial router: Data: request features.
  • Initial routerFirst model and answer: Control: first model suitable.
  • Initial routerNext model and validation: Control: higher capability required.
  • First model and answerCheck answer: Data: generated answer.
  • Check answerAccepted: Control: acceptance criteria met.
  • Check answerNext model and validation: Control: rejected; escalation allowed.
  • Check answerStop or permitted deferral: Control: rejected; no allowance.
  • Next model and validationAccepted: Control: acceptance criteria met.
  • Next model and validationStop or permitted deferral: Control: criteria not met.
For a two-stage cascade where every task incurs routing, the first attempt, and its check, with fixed per-stage costs, E[C]=Cr+C1+Cv+peC2.\mathbb{E}[C]=C_r+C_1+C_v+p_eC_2. Here CrC_r is routing cost, C1C_1 the first attempt, CvC_v its check, and C2C_2 the next attempt. The escalation fraction pep_e uses this entire cohort. The diagram's direct-routing branch is excluded. Earlier expense remains. For variable next-attempt costs, use the escalated cases' conditional mean; add review and other operations separately.

Models have uneven subtask strengths. Evaluate each route on the cases it actually receives, including accepted quality, rejection, escalation, elapsed time, and total task expense. Fallback cases may be disproportionately difficult. A smaller model's lower token price can be overwhelmed by additional tool calls and repeated unsuccessful attempts.

Selective prediction accepts some outputs and abstains on others. Coverage is the accepted fraction; selective risk is error among accepted cases. Report both, together with the expense and outcome of rejected cases. A low-risk accepted subset can still leave an unaffordable review queue.

Calibration asks whether assigned correctness probabilities match observed frequencies. A preference score, a useful ranking, and a verbal confidence statement are different quantities. Validate the event and routed population before interpreting a threshold as assurance; probability calibration and selective automation explains the distinction.

Recovery within shared resource limits

Recovery should consume one task-wide allowance for attempts, spending, and elapsed time. A retry budget limits repeated attempts; it does not bound money when operations have different prices. A fallback changes execution path. Independently resetting allowances at every layer can turn a small failure into substantial extra work.

Observed failureBudget consequence and suitable response
Transient service failureRetry only within remaining allowance; delay retries rather than immediately adding overload
Invalid outputBound correction attempts; repeated equivalent errors call for stopping or changing strategy
Insufficient capabilityEvaluate escalation; include the unsuccessful earlier work in its expense
Uncertain external effectReconcile the prior action before deciding whether repetition is safe

Assume three layers each permit four total attempts: one incoming operation can cause 4 × 4 × 4 = 64 deepest-layer attempts. Backoff progressively delays retries; jitter randomizes the delay to reduce synchronized arrivals. Combine per-task limits with a service-wide retry budget, and do not retry permanent failures. Shared dependencies can make apparently different fallback providers fail together.

Hedging launches a delayed duplicate and accepts the first suitable response. It may reduce read latency while adding work; cancellation can race with execution. Do not transfer this pattern blindly to generated answers or side-effecting tools, where the first response may be unsuitable or duplicate execution harmful.

Before concurrent work starts, reserve allowance for outstanding operations rather than comparing each against the same unspent balance. Include possible late charges. Without bounded operation costs and enforceable termination, an estimated remaining balance is not a precise monetary ceiling. Harness Engineering owns runtime enforcement; safe retries owns uncertain effects.

Stopping can produce an explicit failure, unresolved outcome, or permitted deferral. A degraded mode must identify reduced completeness and preserve authorization; it cannot silently lower the normal acceptance criterion and count the result as ordinary success.

Sustainable capacity and useful throughput

Capacity is the work rate sustainable under a stated workload and service constraints. A bottleneck is the resource limiting that rate; headroom is capacity retained for variation or failures. High arrival counts, long tasks, and bursts compete for finite resources, so a configuration that succeeds at light load can miss its latency targets under sustained demand.

Utilization needs a named resource, denominator, and interval. NVML GPU utilization measures the fraction of a sampling interval during which at least one kernel executes. It is not a fraction of peak arithmetic performance or successful tasks. Its memory-utilization field measures read/write activity time, not allocated memory capacity.

Busy hardware can perform ineffective or duplicated work. Krea's training discussion uses tensor-core activity as an additional compute proxy, while treating workload changes as relevant to interpretation. Such diagnostics help locate constraints; they still require end-to-end throughput and quality measurements.

Serving goodput counts completions meeting declared latency criteria per benchmark second. It does not establish answer correctness. Track raw completions, latency-qualified completions, and accepted timely tasks separately, alongside offered, rejected, and unfinished work. Token throughput cannot substitute for task throughput when tasks generate different amounts of internal work.

Within a stable boundary, Little's law gives L=λW.L=\lambda W. Here LL is mean tasks present, λ\lambda is the long-run task rate, and WW is mean residence time. At 4 tasks/s and 3 s mean residence, the mean population is 12 tasks. If residence includes queues and service, population must include both. This relationship predicts neither P95 nor finite delay under unstable overload.
Resource boundaryRelevant demand and limit
Accelerator memoryWeights, transient buffers, and request state compete for capacity; fitting weights alone is insufficient
Memory movement and computeBytes moved and arithmetic required can limit service independently of memory capacity
Provider and tool servicesRequest/token quotas and per-operation resource limits constrain admitted work
Execution environmentsStartup and reset waiting can leave expensive workers unable to proceed
Required reviewReview arrival rate and time per case determine demand on reviewer capacity

Suppose each admitted task generates two model calls and three tool reads, while one quarter require review. At an arrival rate of λ\lambda, those stages receive 2λ2\lambda, 3λ3\lambda, and 0.25λ0.25\lambda operations per unit time before retries. Increasing model capacity cannot eliminate an overloaded review stage. Memory and batching mechanics remain separate from this workflow accounting.

Provisioning, warm capacity, and admission policy

Usage-priced service charges track consumption; provisioned capacity incurs expense while available, including idle periods. Compare them at equivalent quality, demand, latency, and resilience. Allocate hardware cost over its useful life with an explicit residual value and workload share; do not count both purchase price and depreciation in the same period. Include operations, energy, and remaining service fees.

Autoscaling adjusts capacity as demand changes, but requested workers are not immediately ready workers. Model loading and initialization can delay service. Warm workers retain prepared capacity at an idle-cost premium. Maximum-worker settings limit expansion; they do not independently establish billing limits or acceptable behavior for queued work.

Requested capacity is not ready capacity

Example

Initialization separates expansion from usable service.

The policy uses deadline and capacity information to choose ready execution, bounded waiting, permitted deferral, or rejection. A capacity request contributes usable workers only after initialization. Queue expiry remains an explicit outcome.
Read the diagram as text
  • Admission decision. Uses deadline and ready capacity.
  • Ready execution.
  • Bounded wait.
  • Explicit deferral.
  • Rejected or expired. Record the distinct reason.
  • Request more capacity.
  • Initialize workers.
  • Admission decisionReady execution: Control: ready slot; deadline feasible.
  • Admission decisionBounded wait: Control: bounded wait permitted.
  • Admission decisionExplicit deferral: Control: deferred contract permitted.
  • Admission decisionRejected or expired: Control: no eligible service path.
  • Bounded waitReady execution: Control: slot ready before expiry.
  • Bounded waitRejected or expired: Control: waiting allowance expires.
  • Request more capacityInitialize workers: Control: capacity granted.
  • Initialize workersReady execution: Capacity: ready workers.
SensitivityConsequence to test
Lower demandFixed expense is spread over fewer accepted tasks
More intermittent demandWarm-pool cost competes with repeated startup and scale-down
Less cache reuseMore prompt processing or source work can change the required capacity
Reduced resource headroomTransient failures or previously feasible execution strategies can change

Admission control limits accepted work to what can responsibly be served. Backpressure communicates limited capacity upstream so callers slow or defer submission. Bound waiting and expose rejection, deferral, expiry, and completion separately. A growing queue can postpone overload symptoms without creating capacity.

Separating interactive and deferred work changes which waits are acceptable. Batching executes multiple requests together and may improve resource use, but must respect deadlines and memory limits. Batching independent requests explains execution; the policy decision is which workload may wait and which capacity it may consume.

On-device execution removes remote inference calls for that work but transfers computation and energy to user hardware. Device capability and sustained performance still constrain usefulness. Local and On-Device AI covers deployment details; eliminating a provider charge is not eliminating the underlying resource cost.

Interventions with end-to-end impact

Amdahl's law expresses the limit imposed by unchanged work. In the fixed trace below, halving proposal generation saves 200 ms, not half the task duration. Even eliminating it leaves 800 ms. The inference holds only while the workload, remaining durations, and resource interactions stay unchanged.

Candidate changeReason it might helpCondition to preserve
Remove an unnecessary model callAvoid its execution and waitingRequired checks and task outcomes still hold
Parallelize independent operationsReplace serial waiting with a joinNo hidden data dependency or conflicting resource requirement
Reduce network round tripsShorten communication outside engine timePlacement still meets user proximity and residency requirements
Use a suitable smaller modelReduce work per invocationActual tool correctness and end-to-end acceptance remain adequate
Reduce context or outputProcess or generate less materialRequired evidence and complete results remain available

Component speedup leaves required work

Example timings

Halving proposal time saves only 200 ms overall.

Baseline01,200 msDuration 1,200 ms
Admission and reads0400 msDuration 400 msWithin Baseline
Proposal400800 msDuration 400 msWithin Baseline
Validation and confirmation8001,200 msDuration 400 msWithin Baseline
Faster proposal01,000 msDuration 1,000 ms
Admission and reads0400 msDuration 400 msWithin Faster proposal
Proposal: shortened400600 msDuration 200 msWithin Faster proposal
Validation and confirmation6001,000 msDuration 400 msWithin Faster proposal
Same workload and dependencies; proposal generation alone changes. Completion falls from 1,200 to 1,000 ms. Even zero proposal time leaves 800 ms. Each root has its own children; aligned roots are comparison cases, not concurrent tasks. Do not sum overlapping spans as elapsed time.
Read the diagram as text
  • Baseline. 0 to 1,200 ms; duration 1,200 ms.
  • Admission and reads. 0 to 400 ms; duration 400 ms. Parent: Baseline.
  • Proposal. 400 to 800 ms; duration 400 ms. Parent: Baseline.
  • Validation and confirmation. 800 to 1,200 ms; duration 400 ms. Parent: Baseline.
  • Faster proposal. 0 to 1,000 ms; duration 1,000 ms.
  • Admission and reads. 0 to 400 ms; duration 400 ms. Parent: Faster proposal.
  • Proposal: shortened. 400 to 600 ms; duration 200 ms. Parent: Faster proposal.
  • Validation and confirmation. 600 to 1,000 ms; duration 400 ms. Parent: Faster proposal.

Quantization uses lower-precision numerical representations and can change serving cost and latency. Its quality effects require evaluation. Quantization owns the method; context selection owns choosing necessary input. Combined changes need joint testing: retrieval can add useful evidence and delay while a serving optimization changes a different resource constraint.

Implementation expense also needs recovery. Assume a change costs $600 to build and saves $0.02 per accepted task after recurring maintenance and service costs. It requires 30,000 accepted tasks to recover that expense. Lower volume, changed acceptance, or added maintenance moves the break-even point.

Comparable optimization experiments

Specify the hypothesis, baseline, candidate, acceptance gates, workload, and decision thresholds before comparison. Use matched tasks, not necessarily identical trajectories, and apply uncertainty analysis to repeated measurements. Bind each result to versions, resource guarantees and hard limits, dependency state, price assumptions, and measurement boundaries.

ComparisonHold explicitObserve
Warm versus cold or invalidated cacheTask mix, validity rules, and ready capacityFill work, waiting, acceptance, cost, and deadlines
Steady versus burst arrivalsTask population and configured service limitsOffered, admitted, rejected, unfinished, and timely completed tasks
Baseline versus changed model/promptAcceptance rules and matched starting casesRoute-specific failures, full expense, and completion latency
Isolated versus combined changesCache, routing, and capacity settings for each armWhether gains persist or a different bottleneck appears

A closed-loop test issues replacement work after replies; an open-loop test schedules arrivals independently. Slower replies therefore reduce the closed-loop client's offered rate. Use the serving experiment contract appropriate to the demand claim. Report actual arrivals and unfinished work so self-throttling does not look like stable capacity.

Controlled fixtures and live workflows answer different questions. MLPerf's end-to-end retrieval benchmark fixes intermediate inputs and hop counts for repeatable performance runs, evaluates accuracy separately, and initially measures offline throughput. That controls variation but does not measure unrestricted live trajectories or interactive tail latency. Pair repeatable comparisons with tests of actual dependency behavior.

A test harness can itself limit confidence. Web-data infrastructure work reported difficulty generating realistic traffic beyond its tested range; an apparent ceiling did not identify whether the generator, service, or both were limiting. Record unavailable coverage rather than extrapolating capacity from the last successful load.

Preserve targeted failures alongside aggregate scores. In a prompt-optimization demonstration, the selected relation-extraction error persisted after the optimized instructions were actually connected to the application. Better aggregate validation did not establish repair of that case. Verify both the deployed configuration and the behavior the change is meant to improve.

Feasible operating points and reassessment

Feasible configurations satisfy every hard requirement. Among them, one dominates another when no objective is worse and at least one improves. The Pareto frontier contains the nondominated evaluated choices.

Choose an operating point for the application's required quality and latency, then compare expense and operating burden. Do not hide hard requirements inside an unexplained weighted score. Small measured differences may remain unresolved under uncertainty; a benchmark frontier describes evaluated configurations, not every possible design.

Eligibility before preference

Example

A dominates B; C trades speed for cost.

Comparable candidates

A, B, and C meet the cost and latency limits. A dominates B; C offers lower latency at higher cost. D exceeds the latency limit, and E exceeds the cost limit.

Scroll sideways if the figure extends beyond the screen.

00.751.52.25301.252.53.755Cost per accepted task (USD/task)Completion P95 (s)Feasible regionCost limitLatency limitABCDEAB: dominatedCD: lateE: over budget
  • 1. Feasible region
  • 2. Cost limit
  • 3. Latency limit
  • 4. A
  • 5. B
  • 6. C
  • 7. D
  • 8. E
Read coordinates and regions as data

X: 03 USD/task; Y: 05 s, increasing up. Axes scaled independently; screen angles and distances are not comparable.

Feasible region (polygon)

(0, 0); (2, 0); (2, 3); (0, 3)

Cost limit (polyline)

(2, 0); (2, 5)

Latency limit (polyline)

(0, 3); (3, 3)

A (points)

(1, 2)

B (points)

(1.4, 2.8)

C (points)

(1.6, 1.2)

D (points)

(0.8, 4.5)

E (points)

(2.4, 0.8)

A: (0.94, 1.75)

B: dominated: (1.36, 2.55)

C: (1.54, 0.95)

D: late: (0.9, 4.5)

E: over budget: (2.42, 1.1)

All candidates pass quality and coverage gates under matched conditions. Limits exclude D and E. A and C remain nondominated.

A canary is a partial, time-limited deployment evaluated against a control. Bound exposure, distinguish candidate and control records, and connect results to expansion, pause, or rollback. Check task quality, deadline attainment, coverage, and total cost—not transport errors alone. A small canary can miss rare failures. Release decisions supplies the evidence gate.

  • Preserve the decision recordKeep workload, versions, boundaries, allocations, results, unresolved evidence, and the conditions supporting the choice.
  • Test sensitivityVary demand, reuse, prices, and review assumptions. Identify which changes would make the selected configuration violate a requirement.
  • Reopen the choiceA regression is a deterioration against the declared baseline or requirement. Reassess after changes in task mix, model behavior, capacity, or dependencies, using the same task indicators.

Use task indicators to distinguish real deterioration from changing observation coverage. A recent release has had less time to accumulate downstream corrections or approvals. Compare equal follow-up horizons and keep unresolved work visible before concluding that its economics improved.

Open questions

  1. Routing thresholds under changing task populations remain difficult to maintain. A score that ranked familiar cases well can become overconfident after a domain shift. Progress requires held-out shifted-task evidence showing acceptable route-specific risk and coverage without transferring an unsustainable burden to escalation.

  2. Semantic-cache validity remains harder than semantic matching. Similarity can miss a decisive entity, date, or contextual change, while stricter checks consume some of the avoided work. Progress would demonstrate lower total expense with bounded false reuse on deliberately contrasting, authorized requests.

  3. Joint cache, routing, and capacity control can change the workload it is trying to optimize. Routing changes request lengths; cache misses change prompt-processing demand; queues change deadlines. Progress requires controlled interaction tests that remain feasible after a traffic shift, rather than separate wins under fixed conditions.

  4. Exact task-level spending limits remain difficult when remote work and charges outlive local waiting. Delayed reports and incomplete provider coverage obstruct immediate settlement. Progress would provide enforceable operation bounds and reconciled accounting for outstanding work, clearly separating estimated limits from guaranteed ceilings.

Follow the curated reading path through the speakers and demonstrations behind this entry.

Explore more talks

The rest of the library, beyond the curated path. Cited talks support this entry; reviewed transcripts were processed in full. Metadata candidates have not been reviewed as sources or verified as topic members.

19 matching talks

TalkSpeakerEventYear
Rachel Lee Nabors (RL Nabors)AI Engineer World's Fair 20262026
Juan PeredoAI Engineer Summit 20252025
Vivek MuppallaAI Engineer World's Fair 20262026
Ben FlastAI Engineer World's Fair 20242024
Allen PikeAI Engineer World's Fair 20262026
Sandipan BhaumikAI Engineer Europe 20262026
Harrison ChaseAI Engineer Summit 20232023
Adrian BertagnoliAI Engineer Europe 20262026
Nishant GuptaAI Engineer World's Fair 20262026
Rhythm Garg, Linden LiAI Engineer Code 20252025
Francesco Bonacci, Dillon DuPont, Robert WendtAI Engineer World's Fair 20262026
Keegan McCallumAI Engineer World's Fair 20252025
Filip MakraduliAI Engineer World's Fair 20252025
Audry HsuAI Engineer Europe 20262026
Anna Marie BenzonAI Engineer World's Fair 20262026
Patricija ŽemaitytėAI Engineer World's Fair 20262026
Kyle KranenAI Engineer World's Fair 20252025
Samuel ColvinAI Engineer Europe 20262026
Philipp KrennAI Engineer World's Fair 20252025

References

Coverage and source review
Processed transcripts
24 processed in full · 5 in the curated path
Automated source review
Passed
Metadata candidates
0 unreviewed; not verified topic membership
Corpus version
1bd8e407b26a07b33815594e1b2db5f41827119a2b3cb6fbf240f9fc571fc767

Automated review checks source support; it is not publication approval.

A synthesis of selected conference talks and technical references. Citations link to the source material; they do not imply that every talk on this subject is included.

  1. Boyd and Vandenberghe: Convex Optimization Slides

    Slides 4.57–4.63, multicriterion optimization, Pareto optimality, and scalarization.

  2. Google SRE Workbook: Implementing SLOs

    Getting Started, Types of Components, and the worked mobile-game example.

  3. Frontier results, on device - RL Nabors, Arize

    Evaluate parseability, reference validity, factual consistency, length compliance, and latency separately instead of relying on one accuracy score.

  4. Google SRE: Service Level Objectives

    Indicators, Objectives, and Indicators in Practice; supports the chapter's initial service-target vocabulary.

  5. BurstGPT: A Real-World Workload Dataset to Optimize LLM Serving Systems

    Sections 2–3, especially long-term traffic patterns and short-term burstiness.

  6. MLCommons: Introducing the MLPerf End-to-End RAG Inference Benchmark

    Pipeline description, Performance Metrics, Accuracy Metrics, and Compliance.

  7. Context Platform Engineering to Reduce Token Anxiety — Val Bercovici and Callan Fox, WEKA

    The described coding-agent traces combine rapid tool-driven requests with much longer human-response gaps.

  8. Voice In, Visuals Out: The Agony and the Ecstasy

    A stable context prefix can make repeated agent requests faster and more affordable through prefix caching.

  9. Building Deterministic Infrastructure for Non-Deterministic AI Agents

    Variable agent execution makes inference resemble a cluster scheduling problem.

  10. FinOps Foundation: How to Build a Generative AI Cost and Usage Tracker

    Cost-estimation techniques, illustrative tracking schema, and centralized hub attribution.

  11. Claude Platform: Usage and Cost API

    Usage API, Cost API, pagination, and reporting FAQ; an example of why usage and billing are separate evidence streams.

  12. FinOps Foundation: Unit Economics

    Definition, unit-metric categories, and Product, Finance, and FinOps functional activities.

  13. How Web Data Infrastructure Powers the Next Generation of AI

    At high throughput, logs and metrics become part of the workload that the infrastructure must sustain.

  14. Lessons from building GenAI based applications — Juan Peredo

    Estimate cost across the full workflow and expected usage before setting product prices.

  15. The State of Model Routing — NVIDIA, Cognition, OpenRouter

    A small model's lower token price can be outweighed by excessive tool calls and loops on tasks outside its capabilities or training domain.

  16. FinOps terminology: ownership, depreciation and utilization

    Capitalization; Depreciation; Fixed Cost; Cost Allocation; Total Cost of Ownership; Activity Based Costing; Shared cost.

  17. National Academies: informative censoring and sensitivity analysis

    Chapter 5, TIME-TO-EVENT DATA; assumptions about informative censoring and sensitivity parameters.

  18. National Academies: inference with missing outcomes

    Chapter 4: missing-data mechanisms; complete-case analysis; weighting; sensitivity to assumptions.

  19. Kelley and Walker: Critical-Path Planning and Scheduling

    Part I, sections 1–2, especially project structure, delivery restrictions, deterministic earliest-event recurrence, critical paths and float. Original 1959 paper inspected through an archival scan.

  20. Project Management for Construction: Fundamental Scheduling Procedures

    Sections 10.2–10.3, 10.6 and 10.8–10.9; author-hosted scheduling textbook. Workflow accounting recommendations are explicit applications of the scheduling model.

  21. AIPerf Metrics Reference

    Streaming metrics, request latency, goodput and error definitions; clarifies tool-specific naming and client-observed boundaries.

  22. Metrics design — vLLM

    Metric names and definitions can evolve; explicitly define any illustrative latency boundary and do not add overlapping intervals.

  23. Dean and Barroso: The Tail at Scale

    Why Variability Exists, Component-Level Variability Amplified by Scale, and Within Request Short-Term Adaptations.

  24. gRPC: Deadlines

    Overview, client and server deadlines, deadline propagation, and the published sequence example.

  25. RFC 9111: HTTP Caching

    Sections 3.5 and 4, including cache reuse, unsafe methods, and collapsed requests.

  26. RAG and the MongoDB Document Model

    The illustrated LangChain semantic cache uses MongoDB to return an existing answer when the augmented prompt is semantically similar to a cached request.

  27. MCP Caching, revision 2026-07-28

    Official cache key, TTL, scope, notification, pagination, and security rules.

  28. Automatic prefix caching — vLLM

    Prefix reuse is distinct from within-request KV caching and is not a semantic answer cache.

  29. OWASP Multi-Tenant Security: tenant context and resource access

    Official tenant-context management, database isolation, cross-tenant access prevention, and cache-isolation guidance.

  30. Claude prompt caching: matching and eligibility

    How prompt caching works; Explicit cache breakpoints; Cache limitations; Cache storage and sharing; Troubleshooting common issues.

  31. MeanCache: User-Centric Semantic Cache for Large Language Model Based Web Services

    Section 4 and Algorithm 1; contextual lookup and threshold selection.

  32. Context Platform Engineering to Reduce Token Anxiety — Val Bercovici and Callan Fox, WEKA

    The speakers call balancing cache-write charges against expected cache reads within a retention window 'prompt cache arbitrage' or 'context financial engineering.'

  33. Scaling Memcache at Facebook

    Sections 3.2.1–3.2.2; cache leases, stale sets, thundering herds, and pool allocation.

  34. Context Platform Engineering to Reduce Token Anxiety — Val Bercovici and Callan Fox, WEKA

    The speaker proposes tracking the average number of refreshes per token chunk alongside cache hit rate.

  35. Context Platform Engineering to Reduce Token Anxiety — Val Bercovici and Callan Fox, WEKA

    In WEKA's reported comparison, an additional POSIX storage tier could hold reusable context but could not deliver it to GPUs fast enough to realize the benefit.

  36. Building Context-Aware Reasoning Applications with LangChain and LangSmith

    A chain fixes the sequence of operations; a router lets the model choose a branch, including a prompt, model, or tool.

  37. RouteLLM: Learning to Route LLMs with Preference Data

    Sections 2.1–2.2; decision-time information and routing metrics.

  38. FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance

    Sections 2–3, cascade mechanism and constrained cost formulation.

  39. The State of Model Routing — NVIDIA, Cognition, OpenRouter

    Routing should exploit jagged capabilities and complementary subtask strengths rather than assume the highest-scoring model wins every task.

  40. Selective Classification for Deep Neural Networks

    Sections 2–3; definitions, threshold selection and risk-control assumptions.

  41. On Calibration of Modern Neural Networks

    Sections 2–4: calibration definition, reliability diagrams, ECE, and held-out calibration. Comparison with selective prediction uses its separately cited definitions.

  42. Building Deterministic Infrastructure for Non-Deterministic AI Agents

    Uncontrolled agent retries can amplify a small tool error into escalating compute consumption.

  43. Building Deterministic Infrastructure for Non-Deterministic AI Agents

    Adapt distributed-systems reliability patterns to agents before inventing new infrastructure.

  44. Google SRE: Addressing Cascading Failures

    Retries and Latency and Deadlines.

  45. Google SRE: Handling Overload

    Handling Overload introduction; The Pitfalls of Queries per Second; Per-Customer Limits; Client-Side Throttling.

  46. DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving

    Sections 2–3 and Figure 2; a bounded experimental example of phase interference and SLO-constrained capacity.

  47. NVIDIA NVML: nvmlUtilization_t

    nvmlUtilization_t field definitions in the inspected vR610 documentation.

  48. Infra behind Krea 2 - How to train and serve at scale

    Krea used tensor core utilization as a proxy for useful compute activity because GPU utilization alone only indicated time spent working.

  49. Notes on Little's Law — Karl Sigman

    Definitions and Theorem 1.1; the serving interpretation follows directly from choosing requests as the items.

  50. vLLM memory profiling: allocations and transient peaks

    Official main-branch source: MemorySnapshot, MemoryProfilingResult and memory_profiling, including its worked allocation example.

  51. CUDA C++ Best Practices Guide

    Sections 4.1.3.1, 9.1–9.2, and 11.1–11.3.

  52. Computer-Use 2.0: Agents Just Got Multi-Cursor

    The infrastructure team describes a demand-sized warm sandbox pool that moves startup waiting away from GPU workers.

  53. Under 5 minutes to a deployed LLM endpoint — Audry Hsu, RunPod

    Keep active workers running with models already downloaded when response latency matters.

  54. Under 5 minutes to a deployed LLM endpoint — Audry Hsu, RunPod

    RunPod Serverless exposes maximum-worker and spending-cap controls alongside autoscaling.

  55. Modal: Scaling Out

    How autoscaling works and Configuring autoscaling behavior.

  56. Quantifying infrastructure noise in agentic coding evals

    Primary engineering experiment; controlled resource variation and infrastructure-versus-capability distinction.

  57. Continuous batching — Transformers

    Conceptual scheduling distinction; no universal batch-size or throughput claim.

  58. Frontier results, on device - RL Nabors, Arize

    On-device inference can remove remote connectivity dependencies and provider inference fees, but transfers computation and energy consumption to the user's device.

  59. Lessons from building GenAI based applications — Juan Peredo

    A secondary classifier can screen requests or responses, but it adds latency and cost without guaranteeing correct classification.

  60. Lessons from building GenAI based applications — Juan Peredo

    Run independent agent operations concurrently instead of accumulating their latency in a serial chain.

  61. Engineering voice agents: Latency, quality, and scale

    Measure network time separately from engine time and consider colocating the orchestrator and models.

  62. Engineering voice agents: Latency, quality, and scale

    Select the LLM against both streaming latency and tool-calling quality; use-case-specific fine-tuning of smaller models is one reported way to improve quality without moving to a larger model.

  63. Voice In, Visuals Out: The Agony and the Ecstasy

    Constrain both input context and generated output rather than relying only on a fast model.

  64. Hacking the Inference Pareto Frontier

    Evaluate combinations of techniques because a quality improvement that adds latency can be paired with a serving optimization that reduces it.

  65. How Zapier Builds AI Products and Features With the Help of Braintrust

    Zapier reported reducing its stream-based copilot latency from around 14 seconds to three seconds after adopting GPT-4o with accompanying prompt and tool-call changes.

  66. Context Platform Engineering to Reduce Token Anxiety — Val Bercovici and Callan Fox, WEKA

    In the illustrated conversation, extending cache TTL bridges more request gaps and reduces repeated prefilling, at the cost of a larger retained working set.

  67. How Web Data Infrastructure Powers the Next Generation of AI

    Generating realistic client-like traffic can become a validation bottleneck even when synthetic load generation is straightforward.

  68. Playground in Prod - Optimising Agents in Production Environments

    The demonstrated optimized prompt did not fix the selected false-positive relation, despite its better aggregate validation result.

  69. Hacking the Inference Pareto Frontier

    Set required quality and latency from the application experience, then minimize cost within those constraints.

  70. Google SRE Workbook: Canarying Releases

    Canary definition, requirements, worked deployment comparison, and minimizing risk.

  71. Hacking the Inference Pareto Frontier

    A worker balance fitted to an initial workload can become unsuitable when the user mix changes; scale prefill and decode capacity with the evolving workload.

  72. From Chaos to Choreography: Multi-Agent Orchestration Patterns That Actually Work — Sandipan Bhaumik

    A shared cache can break agent-to-agent data consistency even when the underlying database write succeeds.

  73. Selective Question Answering under Domain Shift

    Section 3.1, Selective Prediction; confidence methods and calibrator; section 5 results and domain-shift analysis; appendix A.4–A.5.

  74. Infra behind Krea 2 - How to train and serve at scale

    Krea treated overheated GPUs as replacement candidates rather than spending training time troubleshooting them in place.

  75. How Zapier Builds AI Products and Features With the Help of Braintrust

    Request-level tracing helps locate improvement targets that become obscured in a multi-tool agent workflow.