Citation Marker: {CITATION_START}cite{CITATION_DELIMITER}file0{CITATION_STOP}Title: Employee HandbookURL: https://company.example/handbookUpdated: 2026-03-01[L1] Employees may work remotely up to three days per week.[L2] Additional remote days require manager approval.[L3] Exceptions may apply for approved accommodations.
来源 ID 与定位符的区别:来源 ID 是由模型生成的稳定标识符,
例如 block1。定位符则是
界面中渲染的精确高亮位置,例如 lines L8-L13 或
Paragraph 21。通常,模型应输出来源 ID,
由您的系统解析或渲染定位符。过早混用两者
往往会增加格式错误。
## CitationsResults are returned by "tool_1". Each message from `tool_1` is called a "source" and identified by its reference ID, which is the first occurrence of 【turn\d+\w+\d+】 (e.g. 【turn2file1】). In this example, the string "turn2file1" would be the source reference ID.Citations are references to `tool_1` sources. Citations may be used to refer to either a single source or multiple sources.Citations to a single source must be written as {CITATION_START}cite{CITATION_DELIMITER}turn\d+\w+\d+{CITATION_STOP} (e.g. {CITATION_START}cite{CITATION_DELIMITER}turn2file5{CITATION_STOP}).Citations to multiple sources must be written as {CITATION_START}cite{CITATION_DELIMITER}turn\d+\w+\d+{CITATION_DELIMITER}turn\d+\w+\d+{CITATION_DELIMITER}...{CITATION_STOP} (e.g. {CITATION_START}cite{CITATION_DELIMITER}turn2file5{CITATION_DELIMITER}turn2file1{CITATION_DELIMITER}...{CITATION_STOP}).Citations must not be placed inside markdown bold, italics, or code fences, as they will not display correctly. Instead, place the citations outside the markdown block. Citations outside code fences may not be placed on the same line as the end of the code fence.You must NOT write reference ID turn\d+\w+\d+ verbatim in the response text without putting them between {CITATION_START}...{CITATION_STOP}.- Place citations at the end of the paragraph, or inline if the paragraph is long, unless the user requests specific citation placement.- Citations must be placed after punctuation.- Citations must not be all grouped together at the end of the response.- Citations must not be put in a line or paragraph with nothing else but the citations themselves.
如果您希望模型同时输出行范围(L1-L22)等定位符,请在提示中这样说明:
You *must* cite any results you use from this tool using the:`\ue200cite\ue202turn0file0\ue202L8-L13\ue201` format ONLY if the item has a corresponding citation marker.
请勿尝试引用没有对应引用标记的条目,因为这些条目不供引用。
您必须在引用中包含行范围。
如果您需要更高质量的落地表现,通常值得加入以下规则。请根据您的用例需求调整本节内容。
12345678910111213<extra_considerations_for_citations>- **Relevance:** Include only search results and citations that support the cited response text. Irrelevant sources permanently degrade user trust.- **Diversity:** You must base your answer on sources from diverse domains, and cite accordingly.- **Trustworthiness:** To produce a credible response, you must rely on high quality domains, and ignore information from less reputable domains unless they are the only source.- **Accurate Representation:** Each citation must accurately reflect the source content. Selective interpretation of the source content is not allowed.Remember, the quality of a domain/source depends on the context.- When multiple viewpoints exist, cite sources covering the spectrum of opinions to ensure balance and comprehensiveness.- When reliable sources disagree, cite at least one high-quality source for each major viewpoint.- Ensure more than half of citations come from widely recognized authoritative outlets on the topic.- For debated topics, cite at least one reliable source representing each major viewpoint.- Do not ignore the content of a relevant source because it is low quality.</extra_considerations_for_citations>
Citation Marker: {CITATION_START}cite{CITATION_DELIMITER}turn0file0{CITATION_STOP}[L1] The service agreement states that termination for convenience requires thirty (30) days’ written notice, unless superseded by a customer-specific addendum.[L2] In practice, renewal terms auto-extend for successive one-year periods when no written non-renewal notice is received before the deadline.[L3] Appendix B further clarifies that pricing exceptions must be approved in writing by both Finance and the account owner.Citation Marker: {CITATION_START}cite{CITATION_DELIMITER}turn0file1{CITATION_STOP}...
此处,turn0file0 是稳定的来源 ID,行号则是定位符。
以下是工具调用输出的示例:
Citation Marker: {CITATION_START}cite{CITATION_DELIMITER}turn0file0{CITATION_STOP}[Block1]The service agreement states that termination for convenience requires thirty (30) days’ written notice, unless superseded by a customer-specific addendum.In practice, renewal terms auto-extend for successive one-year periods when no written non-renewal notice is received before the deadline.Appendix B further clarifies that pricing exceptions must be approved in writing by both Finance and the account owner.Citation Marker: {CITATION_START}cite{CITATION_DELIMITER}turn0file1{CITATION_STOP}[Block2]...
## CitationsResults are returned by "tool_1". Each message from `tool_1` is called a "source" and identified by its reference ID, which is the first occurrence of `turn\\d+file\\d+` (for example, `turn0file0` or `turn2file1`). In this example, the string `turn0file0` would be the source reference ID.Citations are references to `tool_1` sources. Citations may be used to refer to either a single source or multiple sources.A citation to a single source must be written as:{CITATION_START}cite{CITATION_DELIMITER}turn\d+file\d+{CITATION_STOP}If line-level citations are supported, a citation to a specific line range must be written as:{CITATION_START}cite{CITATION_DELIMITER}turn\d+file\d+{CITATION_DELIMITER}L\d+-L\d+{CITATION_STOP}Citations to multiple sources must be written by emitting multiple citation markers, one for each supporting source.You must NOT write reference IDs like `turn0file0` verbatim in the response text without putting them between {CITATION_START}...{CITATION_STOP}.- Place citations at the end of the supported sentence, or inline if the sentence is long and contains multiple supported clauses.- Citations must be placed after punctuation.- Cite only retrieved sources that directly support the cited text.- Never invent source IDs, line ranges, or block locators that were not returned by the tool.- If multiple retrieved sources materially support a proposition, cite all of them.- If the retrieved sources disagree, cite the conflicting sources and describe the disagreement accurately.
输出示例:
The on-call handoff process is documented in the weekly support sync notes. \ue200cite\ue202turn0file0\ue202L8-L13\ue201
为注入的上下文设置引用格式
当您提前检索或准备好上下文,并将其直接注入提示时,请使用此模式。
定义可引用单元
对于注入的上下文,一种常见做法是使用带有稳定引用 ID 的显式标签包裹来源片段。
12345678910<BLOCK id="block1">The service agreement states that termination for convenience requires thirty (30) days’ written notice, unless superseded by a customer-specific addendum.In practice, renewal terms auto-extend for successive one-year periods when no written non-renewal notice is received before the deadline.Appendix B further clarifies that pricing exceptions must be approved in writing by both Finance and the account owner.</BLOCK><BLOCK id="block2">Syllabus</BLOCK>...
这样可以明确可引用单元,方便模型引用。
编写提示指令
## CitationsSupporting context is provided directly in the prompt as citable units. Each citable unit is identified by the value of its `id` attribute in the first occurrence of a tag such as `<BLOCK id="block5"> ... </BLOCK>`. In this example, `block5` would be the source reference ID.Because this pattern does not invoke tools, there is no tool turn counter to increment. That means you do not need to use a `turn#` prefix for the citation marker. You can keep IDs in a `turn0block5` style if that matches the rest of your system, or use plain IDs like `block5` as shown here. The key requirement is that the citation marker matches the injected context ID exactly and consistently.Citations are references to these provided citable units. Citations may be used to refer to either a single source or multiple sources.A citation to a single source must be written as:{CITATION_START}cite{CITATION_DELIMITER}<block_id>{CITATION_STOP}For example:{CITATION_START}cite{CITATION_DELIMITER}block5{CITATION_STOP}Citations to multiple sources must be written by emitting multiple citation markers, one for each supporting block.You must NOT write block IDs verbatim in the response text without putting them between {CITATION_START}...{CITATION_STOP}.- Place citations at the end of the supported sentence, or inline if the sentence is long and contains multiple supported clauses.- Citations must be placed after punctuation.- Cite only blocks that appear in the provided context.- Never invent new block IDs.- Never cite outside knowledge or outside authorities.- If multiple blocks materially support a proposition, cite all of them.- If the provided blocks conflict, cite the conflicting blocks and describe the conflict accurately.
输出示例:
The Court held that the District Court lacked personal jurisdiction over the petitioner. \ue200cite\ue202block5\ue201