Glean
Glean logoGlean · Feature trail

AI Chat Latency Optimization

4 posts · Nov 2025 – Aug 2026

What this trail covers

Glean's AI chat capabilities are being optimized for latency and cost efficiency. This post investigates the impact of input token count and KV caching on Time To First Token (TTFT) and overall chat latency for LLM calls. KV caching significantly reduces latency by reusing computations across LLM calls, especially in multi-turn conversations or workflows with similar prefixes. Experimentation with Azure's KV cache shows a ~0.15ms saving per cached input token, leading to substantial TTFT reduction. The post also discusses RAG vs. fine-tuning, their benefits, use cases, and challenges, including data privacy, potential limitations, and infrastructure complexity. A hybrid approach combining RAG and fine-tuning is also explored.

All Glean trails