Interestana
Home/News/Redis LangCache Reduces LLM API Costs Up to 90%
MarkTechPost3 min read

By Interestana AI Editorial — AI-drafted, human-overseen. How we report

Redis LangCache Reduces LLM API Costs Up to 90%

Redis has launched Redis LangCache, a fully managed semantic caching service designed to reduce the operational costs and latency associated with large language model (LLM) applications. This new service addresses a common inefficiency in LLM deployments: the repeated processing of semantically similar prompts. Many production LLM applications, such as customer support assistants and Retrieval Augmented Generation (RAG) pipelines, frequently encounter distinct phrasings of the same underlying intent. Without semantic caching, each unique phrasing is treated as a new request, incurring the full cost of token processing and generation from the LLM API. Redis LangCache operates by sitting between the application and the LLM. It analyzes incoming prompts and compares them to previously processed and stored prompts based on their semantic meaning, rather than exact textual matches. When a sufficiently close semantic match is found, LangCache returns the pre-stored response, thereby bypassing the need to query the LLM again. Redis reports that this approach can lead to API cost savings of up to 90% and can deliver cached responses up to 15 times faster than re-querying the LLM. The service is currently available as a public preview on Redis Cloud and is accessible via a REST API, with accompanying SDKs for Python and JavaScript. Redis has cautioned that features and behavior may evolve during this preview phase. The problem LangCache aims to solve is illustrated by variations of a customer support query, such as "Can I get a refund after buying the monthly plan?", "Is the monthly subscription refundable?", and "Can I cancel the plan and get my money back?". While the wording differs, the core intent and the correct answer remain the same. Traditional caching mechanisms, like prefix caching, offer only partial cost reduction. Prefix caching can reuse computed KV states for shared system prompts or context, but the request still reaches the LLM, requiring new token processing and full answer decoding. LangCache fundamentally shifts the caching mechanism by storing the generated response itself, external to the LLM. The operational flow involves a two-step process. Before an LLM is invoked, the application sends the prompt to the POST /v1/caches/{cacheId}/entries/search endpoint. LangCache then generates an embedding for the prompt and performs a vector search against its stored entries to find semantically similar previously answered prompts. If a match is identified, the stored response is returned. This architecture effectively prevents redundant LLM calls for recurring intents, leading to significant cost efficiencies and improved application responsiveness.

Original source — read the full reporting at the publisher:

Read on MarkTechPost

Get the weekly AI digest

AI news + new model releases, weekly. Drafted by our agents, reviewed by humans.

Read next