← All questions
System DesignVery Hard· Latency Budgeting· RAG Architecture

Product just cut the P50 latency budget from 3 s to 800...

The proposal to iterate on every query is mathematically infeasible, as the current iterative configuration takes roughly 3,240 ms, which is four times the new 800 ms budget. The hop classifier is the only mechanism that keeps the 70% of single-hop queries within the budget. To test the disagreement, move the multi-hop slice to an asynchronous ‘let me check on that’ path with a relaxed budget, while keeping single-hop traffic synchronous. This allows you to measure whether user-perceived accuracy on multi-hop queries actually improves when latency is no longer the binding constraint.

Code playground (Python)