← All IntelIntel / article
Engineering Rag
- Source
- elevenlabs.io
- Author
- ElevenLabs editorial sitemap
- Date
Why it matters
Racing several small models for query rewriting, with a raw-message fallback after one second, halved median RAG latency without a single-provider dependency. The pattern applies to any that runs retrieval on every turn.
Key takeaways · AI-distilled
- ElevenLabs found query rewriting, which collapses dialogue history into a self-contained retrieval query, accounted for more than 80% of its latency while it depended on one externally hosted .
- The redesign sends each rewrite to several models at once, including self-hosted Qwen 3-4B and 3-30B-A3B, and keeps the first valid response.
- ElevenLabs reports latency fell at every percentile: median 326ms to 155ms, p75 436ms to 250ms, and p95 629ms to 426ms.
- Racing also smoothed peak-hour slowdowns from external providers: during one provider's outage, conversations continued on the self-hosted models, and ElevenLabs says the extra compute cost was negligible because it already runs that infrastructure.
Terms in this piece · Glossary
- RAG — Retrieval-augmented generation — fetching relevant documents first and pasting them into the model's context so it answers from your data instead of memory.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- LLM — A large language model — the neural network behind tools like Claude and ChatGPT, trained on huge amounts of text to predict what comes next.
Read the source elevenlabs.io
More from ElevenLabs editorial sitemap
Recommended reads
Comments
Checking sign-in…
Loading comments…

