Amazon Bedrock 提示缓存降低 90% 输入成本
原标题:Optimizing cost and latency with Amazon Bedrock prompt caching
AI 摘要
AWS 博客介绍 Amazon Bedrock 的提示缓存功能,通过在请求中加入 cachePoint 标记缓存系统提示、文档和工具定义等重复上下文,缓存命中时输入 token 成本最多降低 90%,TTFT 也会缩短。文章给出缓存写入比标准输入贵 25%、缓存读取便宜 90% 的定价,并展示消息内容、系统提示、工具定义、混合 TTL、租户隔离及 LangChain 集成六种实践场景。
正文节选
Optimizing cost and latency with Amazon Bedrock prompt caching Prompt caching in Amazon Bedrock can reduce your input token costs by up to 90 percent when you repeatedly send the same context to foundation models, based on Amazon Bedrock prompt caching pricing. Without caching, a 10,000-token contract sent alongside 50 user questions means 500,000 input tokens billed at full price for content the model has already processed. You can mitigate this issue by shortening prompts, reducing context win