# 2.5 seconds and twenty cents—the rollback sequence needs product sign-off

Date: 2026-11-12
Category: Interview Preparation
Tags: AI Products, RAG, Cost and Latency
Summary: The contract promises P95 of 2.5 seconds and 0.2 yuan per session, but actual measurements show 4.8 seconds and 0.42 yuan. This article explains how to break down latency by segment, arrange degradation into an ordered set of decisions, and identify which constraints must not be traded for metrics.

B2B customer service RAG, average 3.2 turns per session, pipeline is retrieval, reranking, generation. Measured P95 first token 4.8 seconds, cost per session ¥0.42; the contract says P95 ≤ 2.5 seconds and ≤ ¥0.20 per session, with penalties for exceeding it.

There is no shortage of available levers: caching, small-model routing, cutting recall and reranking, streaming output, parallel retrieval, degrading to retrieval-only answers, handing off to a human.

The easiest way to answer this question is "have engineering optimize it." But every item on this list trades quality for numbers. How much to trade, in what order, and what must not be traded — these three things need product sign-off, not a casual decision at the scheduling meeting.

> Post 8/10 in this series · [Previous: Search can look up, recommendation can browse, support can act — where is the Agent increment?](/2026/11/11/agent-vs-search-recommend-support/) · [Next: Two hundred documents, eight pieces of feedback a day — where does the flywheel start turning](/2026/11/13/vertical-rag-cold-start-flywheel/)

## First, break down the 4.8 seconds

Disclaimer: the table below is a compositional hypothesis I use for validation, not a conclusion copied from some report.

| Segment | Hypothesized share | How to investigate |
| --- | --- | --- |
| Access, auth, permission filtering | 10% | Segmented timing in the pipeline trace |
| Query rewriting / intent classification | 12% | Turn off rewriting, run a fixed question set and compare |
| Retrieval (multi-route recall) | 20% | Serial to parallel, look at per-route latency distribution |
| Reranking | 18% | Turn off reranking, run ablation, look at latency and nDCG change |
| Context assembly and truncation | 5% | Log tokens sent in |
| First token generation | 30% | Compare TTFT across model tiers |
| Network and queueing | 5% | Peak concurrency stress test |

The seven cells add up to exactly one hundred, but a real pipeline is never evenly split — first token generation and reranking often each take a large chunk. That is why the second step is the key one.

Product-side validation doesn't require writing code; it requires layered instrumentation plus ablation experiments: fix 100 real questions, turn off rewriting, turn off reranking, and hit the cache directly, each run once, to see how many milliseconds each segment actually contributes and how much quality drops when it's turned off. Making the call to cut reranking without this table in hand is the same as changing a prompt without looking at metrics.

There is also a question that must be clarified first: does 2.5 seconds mean first token or full completion? A contract that says "first token" and one that says "answer complete" lead to completely different designs. This follow-up question is the best way to tell whether someone has actually dealt with an SLA.

## Three-tier degradation matrix

| Tier | Trigger condition | Levers used | User-perceivable change | Fallback |
| --- | --- | --- | --- | --- |
| A High-frequency factual / standard SLA | Cache hit or simple intent | Cache + small-model routing + recall count halved + skip reranking | Barely noticeable, shorter answers, citations still present | Retrieval-only answer + source links |
| B Complex multi-hop / VIP SLA | Requires multiple documents, customer flagged as important | Parallel retrieval + keep reranking + streaming output; trim fragments only when over budget | Text appears first, conclusion may come in two parts | "Confirmed part + pending marker," one-click handoff to human |
| C Failure or cost over budget | API errors, daily budget exhausted | Degrade to retrieval-only answer, explicitly labeled "no summary generated" | Clearly different: no generative conclusion | Queue + human agent, handoff with context |

The key to the three tiers isn't the levers, it's the trigger conditions. They must be fixed in advance and wired into monitoring — you can't wait for P95 to drift and then have the on-call person decide on the spot. Decisions made on the spot are basically impossible to review afterward.

Each tier's "user-perceivable change" also needs to go into the product spec. Tier B users see streaming in segments, not "why is it slower today"; Tier C users see an explicit label, not a passage that reads like a conclusion but was never actually generated. Same degradation, but whether you explain it clearly makes an order-of-magnitude difference in user trust in the product.

One more point that's easy to overlook: Tier A's hit rate won't go up just because you want it to. In customer service, question repetition is indeed high, but what repeats is mostly the simplest part — long-tail questions almost never make it into the cache. Budgeting Tier A as the cost workhorse will very likely get slapped back to reality in the first week.

## Some things must not be degraded

Four hard constraints: citations must be traceable to the source text, facts must not be fabricated, permission isolation must not be bypassed, and answers involving amounts or commitments must not be generated by a degraded pipeline.

In other words, **what gets degraded is the generation method and presentation form, not the factual constraints**. Tier A can go without reranking, but the cited fragments must still be there; Tier C can withhold the summary, but it must not give an unverified summary.

Once this boundary loosens, the cost metrics will look good for a long stretch — until one day a support agent sends a degraded answer to a customer. This kind of thing won't show up in canary testing; it only shows up in real traffic, at a moment when nobody is watching.

## Which metric does streaming output improve

It improves perceived latency, i.e., TTFT (time to first token). It does not reduce total completion time, nor does it reduce token cost — in most implementations it's slightly more expensive due to chunking.

So the three metrics must be tracked separately:

- TTFT / P95 first token: the 2.5 seconds in the contract, which streaming can directly improve.
- P95 full completion time: how long the user actually waits; streaming doesn't help, and may even make it longer.
- Cost per session: calculated from the actual distribution of 3.2 turns; streaming doesn't affect the denominator.

An acceptance report that only reports first-token latency is the most common form of self-deception. I'd put these three rows on the same dashboard, and require all three to hold at acceptance: first token on target, full completion time not worse, cost within budget. If any one is missing, don't sign.

The boundary also needs to be stated clearly: the premise that "users care about when the first character appears" holds for short answers; in scenarios requiring long reasoning, fast first token with stalls in the middle is actually a worse experience.

## Trade-off order and launch acceptance

There is only one ordering principle: **first cut calls that produce no quality benefit, then touch the steps that cost quality**. Cache → intent routing (simple questions go to the small model) → serial to parallel → reduce the number of fragments sent in → only then reranking and the generation model.

```mermaid
flowchart LR
  S[超出预算] --> A[命中缓存]
  A --> B[小模型路由]
  B --> C[串行改并行]
  C --> D[减少送入片段]
  D --> E[砍重排]
  E --> F[换生成档位]
  F --> G[纯检索并转人工]
```

The first two steps usually absorb most of the cost with almost no quality loss. Cutting reranking right out of the gate means saving the most effective lever for last and putting the most quality-damaging move first.

Two checks need to be run before launch.

One is a peak concurrency stress test: measure P95 TTFT and P95 full completion time per the contract's definition, and record the trigger rate for each degradation tier. If the trigger rate exceeds the set threshold (say, Tier C above 5%), capacity isn't provisioned adequately — you can't sneak past acceptance on degradation.

The other is quality acceptance after degradation: run all three tiers A/B/C against a fixed evaluation set, requiring each tier's citation accuracy and no-answer false-response rate to stay above threshold. Cost should be taken at P95 of the 3.2-round distribution, not the mean—the mean averages away the compensation risk of long sessions; the books look good, but it hurts just the same when you pay out.

## Follow-up: the client insists on "never degrade"

First acknowledge the reasonable part of that statement. What he really can't accept is most likely not the word "degradation" but quality changes he wasn't told about. So I'd list the four hard constraints separately in a contract appendix, stating that these four never change under any circumstances, and that the rest is tiered service levels.

Then offer three commercial options for him to choose from: raise the unit price to reserve peak resources, relax the SLA to 3.5 seconds, or accept "transfer to a human when over budget + explicit notification." Putting the three numbers—compensation cost, reserved-resource cost, and human-transfer cost—side by side is far more effective than arguing about "whether to degrade."

One more thing to state upfront: no degradation at all means that during failures you can only queue or fail, and those two things are themselves experience degradation—just not written into the contract. Making that clear is the product team's responsibility.

## How I'd judge the answer

The passing bar is being able to list the techniques: caching, small models, streaming. Good is being able to break down latency, give a tiered strategy, and distinguish perceived latency from real latency. Excellent is framing the degradation order as a product decision, writing out the non-degradable hard constraints, using P95 rather than the mean for acceptance, and translating "never degrade" into commercial terms and responsibility boundaries.

A typical point-loser: cutting recall count and reranking together to hit the target without measuring citation accuracy. The SLA is met, and the product is ruined.

> When you squeeze cost to the end, what you're squeezing isn't the numbers—it's the list of "which experiences can't be skimped on at any price."

With the budget settled, it's on to the question most easily led astray by a PPT: when there's no data, where does the flywheel start turning?
