CCA-F 练习题库· Context Management & Reliability
下列哪些内容会计入一个请求的 context window?(多选)
- Asystem prompt。
- B你的工具定义。
- CClaude 在当前轮输出中生成的 extended-thinking token。
- D由缓存前缀提供的 token(报告为 cache_read_input_tokens)。
- E该模型训练所用的全部数据语料。
正确答案:A B C D(多选)
解析
Anthropic 的 context windows 文档指出,“everything in the request counts toward the context window: the system prompt, every message in messages (including tool results, images, and documents), and your tool definitions”(请求中的一切都计入 context window:system prompt、messages 中的每一条消息(包括 tool result、图片和文档),以及你的工具定义),此外 “the output Claude generates for the turn, including its extended thinking, counts too”(Claude 为该轮生成的输出,包括它的 extended thinking,同样计入)。
- A(system prompt)由此得到确认。
- B(工具定义)同样由此得到确认。
- C(当前轮输出中生成的 extended-thinking token)也由此得到确认。
- D同样计入:文档明确写道 “cached prompt prefixes still occupy the context window: prompt caching changes what you pay for those tokens, not whether they count”(被缓存的 prompt 前缀仍然占用 context window:prompt caching 改变的是你为这些 token 付什么代价,而不是它们是否计入),并且 input_tokens、cache_read_input_tokens 和 cache_creation_input_tokens 都计入该窗口——所以 cache-read token 是计入的。
- E是错的:context window “is different from the large corpus of data the language model was trained on”(不同于语言模型训练所用的大规模数据语料),后者是模型的参数化知识,而不是每次请求的工作记忆的一部分。
延伸阅读
本题为本站自有原创练习题,非任何官方考试内容;解析对照 Anthropic 公开文档撰写, 如与最新文档不符请以官方为准。想在限时环境下检验水平,可参加 模拟考(题目与本页题库不重叠)。