Example budget for a 1 to 2 second interactive answer: query rewrite 100 to 300 ms (if used), query embedding 20 to 50 ms, vector and keyword search 20 to 100 ms, reranking 50 to 200 ms, then LLM generation as the largest part.
Cache embeddings of repeated queries, cache results for popular queries, and add a semantic cache that returns stored answers for near-identical questions (with care for freshness and permissions).
Reduce work with approximate indexes, a smaller k before reranking, quantization, parallel calls, and streaming the answer.
Loading…