← All questions
LLMOps & ProductionHard· Latency Optimization· RAG· Performance Tuning

Your RAG endpoint’s p50 is 1.3 seconds and product want...

In a RAG pipeline, the majority of the latency is usually consumed by the LLM’s decode phase. If the p50 is 1.3 seconds, it is common to find that 91% of that time is spent on decoding. While developers often look to optimize the reranker, reducing the number of candidates only saves a few milliseconds, which is insignificant relative to the total budget. You must prioritize optimizing the generation process while also flagging the potential cost of increased retrieval misses.

Code playground (Python)