Typical stages: query rewrite (100 to 300 ms if used), embedding (20 to 50 ms), retrieval (20 to 100 ms), reranking (50 to 200 ms), prompt assembly (small), and LLM generation, which is usually the biggest part (hundreds of milliseconds to several seconds).
Reduce latency by streaming the answer, running independent steps in parallel, caching embeddings and results, using smaller models for rewriting, limiting reranker candidates, and sending fewer tokens to the LLM.
Set a budget per stage, track p95 per stage, and define fallbacks (skip reranking or use a smaller model when a stage is slow).
Loading…