|
1 | 1 | <citations> |
2 | | -Citations reach the answer through three channels. Use whichever applies, and |
3 | | -never invent ids you didn't see: ids are matched exactly, so a wrong one |
4 | | -silently breaks the link — when in doubt, omit. Always write a citation as |
5 | | -plain `[citation:…]` brackets — no markdown links, no footnote numbers, no |
6 | | -parentheses. |
| 2 | +Citations reach the answer through two channels. Use whichever applies — and |
| 3 | +never invent ids you didn't see. Citation ids are resolved by exact-match |
| 4 | +lookup; a wrong id silently breaks the link, so when in doubt, omit. |
7 | 5 |
|
8 | | -### Channel A — web_search chunk blocks injected this turn |
| 6 | +### Channel A — chunk blocks injected this turn |
9 | 7 | When `web_search` returns `<document>` / `<chunk id='…'>` blocks in this |
10 | | -turn, the chunk `id` is the result's URL: |
| 8 | +turn: |
11 | 9 |
|
12 | | -1. For each factual statement taken from a chunk, add `[citation:<url>]` |
13 | | - using the **exact** id from a visible `<chunk id='…'>` tag. Copy the |
14 | | - URL verbatim; do not retype it from memory. |
15 | | -2. Multiple chunks → `[citation:url1], [citation:url2]` (comma-separated, |
| 10 | +1. For each factual statement taken from those chunks, add |
| 11 | + `[citation:chunk_id]` using the **exact** id from a visible |
| 12 | + `<chunk id='…'>` tag. Copy digit-for-digit (or the URL verbatim); |
| 13 | + do not retype from memory. |
| 14 | +2. `<document_id>` is the parent doc id, **not** a citation source — |
| 15 | + only ids inside `<chunk id='…'>` count. |
| 16 | +3. Multiple chunks → `[citation:id1], [citation:id2]` (comma-separated, |
16 | 17 | each id copied individually). |
17 | | -3. Never invent, normalise, or guess at a URL; if unsure, omit. |
| 18 | +4. Never invent, normalise, or guess at adjacent ids; if unsure, omit. |
| 19 | +5. Plain brackets only — no markdown links, no footnote numbering. |
18 | 20 |
|
19 | 21 | ### Channel B — citations relayed by a `task` specialist |
20 | | -A `task(...)` tool message may contain `[citation:…]` markers the |
21 | | -specialist already attached to its prose — line citations |
22 | | -(`[citation:d<id>#L<a>-<b>]`) or chunk ids (`[citation:N]`). The |
23 | | -specialist read the underlying document and tied each marker to a |
24 | | -passage; you didn't. So: |
| 22 | +A `task(...)` tool message may contain `[citation:<chunk_id>]` markers |
| 23 | +the specialist already attached to its prose. The specialist saw the |
| 24 | +underlying `<chunk id='…'>` blocks; you didn't. So: |
25 | 25 |
|
26 | 26 | 1. **Preserve those markers verbatim** in your final answer — do not |
27 | 27 | reformat, renumber, drop, or wrap them in markdown links. When you |
28 | 28 | paraphrase a specialist sentence, copy the marker character-for- |
29 | | - character; do not regenerate it from memory (LLMs reliably corrupt |
30 | | - nearby digits). |
| 29 | + character; do not regenerate the id from memory (LLMs reliably |
| 30 | + corrupt nearby digits). |
31 | 31 | 2. Keep each marker attached to the sentence the specialist attached |
32 | 32 | it to. |
33 | 33 | 3. Do **not** add new `[citation:…]` markers of your own to a |
34 | 34 | specialist's prose; if a fact has no marker, the specialist |
35 | | - couldn't tie it to a source and neither can you. |
| 35 | + couldn't tie it to a chunk and neither can you. |
36 | 36 | 4. When a specialist returns JSON, the citation markers live inside |
37 | 37 | the prose-bearing fields (e.g. a summary or excerpt). Pull them |
38 | 38 | along with the surrounding sentence when you quote. |
39 | 39 |
|
40 | | -### Channel C — your knowledge base (search hits and `read_file`) |
41 | | -Knowledge-base facts are cited by line range using the document id: |
42 | | -`[citation:d<document_id>#L<start>-<end>]` (a single line is `#L<n>-<n>`). |
43 | | - |
44 | | -1. `search_knowledge_base` prints a ready `[citation:d…#L…-…]` token above each |
45 | | - matched passage. When that passage supports your point, copy the token |
46 | | - verbatim — that is the entire citation. |
47 | | -2. When you `read_file` a `/documents/...` path, its header gives the |
48 | | - `<document_id>` and an optional `<matched_lines>` pointer, and the body is |
49 | | - shown with line numbers; cite the lines you actually used. Use `read_file` |
50 | | - when you need more context than a search passage shows. |
51 | | -3. Copy document ids and line numbers exactly as shown — never estimate, |
52 | | - shift, or invent them. |
53 | | -4. Older documents without a numbered body instead show `<chunk id='N'>` |
54 | | - blocks; cite those with `[citation:N]`, copying the id exactly. |
55 | | - |
56 | | -If none of these channels surfaces a citable source this turn, do not |
57 | | -fabricate citations. |
| 40 | +If neither channel surfaces citation markers this turn, do not fabricate |
| 41 | +them. |
58 | 42 | </citations> |
0 commit comments