跳到主要内容Skip to main content

Prompt CachePrompt Cache

Prompt Cache

  • 硬件与部署Hardware & deployment
  • 第五站 · 跑起来Station 5 · Running It
解决什么问题What problem it solves

把重复的系统提示和资料缓存起来,重复问同一份上下文时省时间和钱。Cache repeated system prompts and documents, saving time and money when asking about the same context again.

这是什么What it is

复用已处理过的相同前缀,跳过重复计算。

Reusing processing already done for an identical prefix so it is not computed twice.

为什么需要知道Why it matters

做 Agent 时系统提示通常很长,缓存能显著降低成本。这也是本站不自己托管模型的一个原因。System prompts in agent work are usually long, so caching meaningfully lowers cost. It is also why this site does not host models itself.

别名Chinese aliases

提示词缓存 · 前缀缓存

出处Sources
  • Claude 提示词缓存文档Anthropic prompt caching docs ↗
  • OpenAI 提示词缓存指南OpenAI prompt caching guide ↗