最新资讯
dev.to 如何在专用 GPU 服务器上用 OpenAI 兼容 API 部署 LLM dev.to 审计 153 份 Claude Code 与 Codex 会话记录:User-Agent 与 URL 中的邮箱泄露 dev.to 你的 Agent Harness 应具备的 17 项能力 dev.to 离线 AI 记忆中 0.8 余弦阈值为何失效 dev.to Kimi K3.1 Pro 开放权重:自托管 2.8T 模型前的开发者清单 dev.to 如何通过工具调用引导模型以提升 Harness 质量 dev.to AI Agent 审计轨迹不等于对话记录 dev.to 精简 MCP server 工具数量:更少工具、更小影响面,双重收益 dev.to 为什么 git checkout 无法撤销 AI 编码 agent 的改动? wechat AI短剧门槛降降降!实测即梦短剧工作室:剧本分镜预演一条龙,伙伴计划长期护航 dev.to 让模型改写文档前,先量化事实保真度 dev.to 回放 153 个 Claude Code 与 Codex 会话,审计 Agent 的生产影响范围
多元动态
登录 注册
大模型 marktechpost.com · @Michal Sutter

Redis LangCache:托管语义缓存,宣称降低最多 90% 的 LLM API 成本、缓存命中快至 15 倍

原文 我的收藏

Redis LangCache 是一款完全托管的语义缓存服务,部署在应用与 LLM 之间。文章指出生产环境 LLM 应用很少遇到全新问题,支持助手和 RAG 管线每天会以不同措辞处理相同意图,而多数技术栈把每种措辞都当作全新计费请求。该服务宣称可将 LLM API 成本降低最多 90%,缓存命中返回速度提升最多 15 倍。

AI推荐理由 Redis LangCache 是托管式语义缓存服务,位于应用与 LLM 之间,针对支持助手和 RAG 管线中同一意图被反复以不同措辞提问的场景,宣称可降低最多 90% 的 LLM API 成本、缓存命中返回快至 15 倍。对 LLM 应用成本与延迟优化有直接价值;但 90% 与 15 倍为厂商宣称指标,摘要未给出测试条件与基准细节。

76

正文

Editors Pick Agentic AI Artificial Intelligence AI Infrastructure Technology AI Shorts Applications Enterprise AI For Devs New Releases Software Engineering Tech News Uncategorized Production LLM applications rarely receive a question nobody has asked before. Support assistants and RAG pipelines field the same intents thousands of times a day, each phrased differently, and most stacks treat every phrasing as a fresh, fully billed request. Redis LangCache is a fully managed semantic caching service that sits between the application and the model, matches incoming prompts against previously answered ones by meaning rather than exact text, and returns the stored response when a close enough match exists. Redis reports API cost savings of up to 90% and cache-hit responses up to 15x faster than re-querying the model. Is it deployable? Yes. LangCache is available today as a public preview on Redis Cloud, accessed through a REST API with Python and JavaScript SDKs, and Redis notes that features and behavior may change during the preview. The Problem: Paraphrases Are Still Full LLM Calls Consider three requests to a customer-support assistant: “Can I get a refund after buying the monthly plan?” “Is the monthly subscription refundable?” “Can I cancel the plan and get my money back?” The wording differs, but the question and answer are identical. Without a semantic cache, each version triggers a complete generation: input tokens processed, output tokens decoded, user waiting. Prefix caching only removes part of that cost. When requests share a system prompt or context, the engine reuses the KV states computed for that prefix, but the request still reaches the LLM, new tokens still get processed, and the full answer still gets decoded. A prefix-cache hit is a cheaper generation call, not an avoided one. How LangCache Works LangCache moves the cache outside the model and stores the generated response itself. The architecture is a two-call loop: Before invoking the model, the app sends the prompt to POST /v1/caches/{cacheId}/entries/search. LangCache generates an embedding for the prompt and runs a vector search over stored entries. If a semantically similar entry clears the configured similarity threshold, the cached response is returned and no LLM call occurs. On a miss, the app calls its chosen LLM as usual, then stores the prompt and new response through POST /v1/caches/{cacheId}/entries for future matches. Embedding generation is handled by the service, with default models or bring-your-own. Cache behavior is controlled through similarity thresholds, TTLs, and eviction policies, plus adaptive controls that tune precision and recall. Built on Redis’s vector database and exposed as a REST API, it works with any LLM provider and language. Hit rates and savings are monitored from the Redis Cloud console. What a Cache Hit Actually Saves A cache hit removes the input tokens, the output tokens, and the decoding latency of an additional model call. In a demo run comparing both paths on a paraphrased question, direct inference took 2.232 seconds and consumed 514 input tokens plus 250 output tokens. LangCache returned the earlier response in 0.37 seconds with zero LLM input or output tokens, roughly 6x faster in that run. The Redis documentation is careful about how savings accrue. On a cached response you do not pay for output tokens, while input token costs are typically offset by embedding and storage costs. The suggested estimate is: Est. monthly savings = (Monthly output token costs) x (Cache hit rate) With $200 of monthly LLM spend, 60% of it on output tokens, and a 50% hit rate, that works out to $60 saved per month. Redis also publishes a savings calculator for annual estimates. Redis’s public preview announcement cited up to 15x faster responses on cache hits and up to 70% lower token usage, while the current product page states savings of up to 90%. Customer Mangoes.ai reports a 70% hit rate on its patient-care voice app, cutting LLM spend by 70% with 4x faster responses. The actual result depends on how much safe repetition exists in the traffic. Where Semantic Caching Needs Care Deciding which questions can safely share an answer is a production concern, not a configuration detail. A threshold set too low returns a refund policy to a customer asking about upgrades. Set too high, nearly every paraphrase goes back to the model and the cache stops paying for itself. Production setups need well-tuned thresholds, expiration policies so stale answers age out, data isolation between tenants, and monitoring for incorrect matches. LangCache covers these with access scopes, custom filtering, TTL and eviction controls, and monitoring through Redis Cloud. Data stays on the customer’s Redis servers, and Redis states it does not access that data or use it to train models. Key Takeaways Prefix caching cuts prompt-processing cost; semantic caching eliminates the LLM call entirely on a hit. LangCache is a two-call REST integration: search before the model, store after it. Savings come mainly from avoided output tokens; the docs give the formula output cost x hit rate. Redis claims up to 90% cost savings and up to 15x faster cache hits; a demo run showed 6x. Thresholds, TTLs, isolation, and false-match monitoring decide whether a semantic cache is safe. Check out redis.io/langcache and follow the API and SDK examples. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well. Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容