Link only what the run read
Ask @todoist “Read the whole thread. Where does the second task take place?” in a long thread from our synthetic evaluation workspace. Before the change, it answered:
The second task takes place in the Black Lake.
The answer is right. The fact sits in one comment among about 400, and nothing in the answer tells the reader which one. A link would. But a link in an answer is a claim too: “this is where the fact came from.” The model can write any URL, and a wrong one looks as clickable as a right one.
What the article argues
Anthropic’s How we built our multi-agent research system treats citations as their own step. Once the research is done, a citation agent gets the report and the documents and identifies the specific locations for citations, so that every claim is attributed to a source. The evaluation rubric then asks about citation accuracy: “do the cited sources match the claims?”
That splits the work in two. One part is mechanical: is this link one of the sources? The other needs judgment: does the source say what the answer claims? We kept the split, without a second agent. The model cites as it writes. Code checks each link against the links the run was given. The judge, which grades every answer, checks that the sources support the answer.
What we changed
The rule
I made answers end with their sources when a fact comes from a comment, from another thread or from a search result. The prompt tells the model to copy the exact url of a tool result’s reference, which the Comms tools put on every thread, comment and search match. (The model reads a thread through a short handle, covered in Shape what tools return, but it cites the url.) The same answer became:
The second task takes place in the Black Lake.
Sources:
- [Second task location (Albus Dumbledore)](https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-lake/c/cm-lake)
The reply check already let through only links to sources the run read. I then widened “read” to “offered”: a link that appears exactly in the asker’s message or in a result the run read, such as a document linked in a comment.
So the model never needs to know a URL. It needs to copy one.
Bare links, and a check that tests them
Comms web replaces a bare thread or comment link with the thread’s title, but keeps the text of a titled link, so a source line written as [title](url) showed whatever title the model wrote. I switched answers to a bare link.
The evaluation case asker-2-my-action-item shows what that changed. The question comes from Minerva in a direct message: “What do I need to do for the feast?” The one thread that answers it says:
Feast preparation owners: Minerva McGonagall brings the sorting hat. Albus Dumbledore writes the speech.
The case expects the run to look up the asker (comms.get_workspace_user) and search (comms.search_content). Its checks: the answer says “sorting hat”, and it doesn’t say “speech”, which is Albus’s job, not hers. The source line for this thread:
Before: Sources:
- [Feast preparation](https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-feast-plan/)
After: Source: https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-feast-plan/
The evaluation check moved with it. must_cite_ids lists the fixture IDs an answer must link, and from then on it passed only for a bare link, by the rule Comms web uses: the link’s visible text equals its target. Its tests pin both sides (reformatted):
"The feast starts at eight.\n\nSource: https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-feast/c/cm-feast-1/"
cites th-feast: true cites cm-feast-1: true
"[Feast](https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-feast/)"
cites th-feast: false
"Decided in comment cm-feast-1."
cites cm-feast-1: false
The prompt change had a side effect. The old instructions gave an example, “I found it in
The bugs were in the bookkeeping
The rule held. What broke, again and again, was the bookkeeping around it: the list of links each answer is checked against, and what is done with the links.
An outside link cost the whole answer. The check refused any answer with a link it didn’t accept, so a good answer could reach Comms as “Sorry, I couldn’t finish an answer this time.” From then on, an inline link that isn’t offered loses its target and keeps its words:
See the [dashboard](https://example.com/) for owners.
→ See the dashboard for owners.
The list was too short. A run kept at most 500 offered links. A connector search returns about 30 items with a few links each, so a run with several searches lost the links it read last, and the answer lost them too. I raised the limit to 5,000. A run that reaches it still drops later links, but logs a warning.
Product pages are not sources. A channel the asker named, or a task the run found, couldn’t be linked, because no read returned it. I let an answer link any Todoist, Comms or Automations page, read or not.
The list held the wrong links. A connected service’s search returned one JSON object per hit, so its result reached the run as a single string of JSON text. We find links in strings with linkify, which reads past a closing quote. A test gives this result (two synthetic hits):
{"document":{"url":"https://handbook.example.com/doc/ai-standard-zU0f","title":"AI standard"}}{"document":{"url":"https://handbook.example.com/doc/vision-T9Q6","title":"Vision"}}
Run through linkify the way the code did before the change (I ran it; the test checks only the fixed result), it gives these two links:
https://handbook.example.com/doc/ai-standard-zU0f","title":"AI
https://handbook.example.com/doc/vision-T9Q6","title":"Vision
The page’s real address was never offered, so an answer that linked it would lose the target and keep only the title. A URL never holds a raw " or \, so I made both become spaces before linkify read the string, and the two links came out exact.
One link, shown twice. Asked “Where did we settle the date of the Quidditch final? Point me to the discussion.”, in a workspace where one comment says “Confirmed: the Quidditch final is on June 20 at the pitch.”, the answer linked the comment and then listed it again (trimmed):
You settled it in https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-quidditch/c/cm-quidditch-date, where ...
Source: https://comms.todoist.com/<workspace>/ch/ch-great-hall/t/th-quidditch/c/cm-quidditch-date
Comms shows each bare link as the thread title, so the reader saw the same title twice. Our own instructions asked for it: “Also keep the source in the source line when the rule above asks for one.” I reworded them and added no_repeated_link, a check on every case: an answer that shows the same bare link twice fails. A case asks this exact question. With the old instructions, it failed 12 runs out of 12. With the new ones, it passed 12 out of 12.
The prompt didn’t hold every time, and the code that appends sources after the model never checked. I then made code rewrite the source line before posting: an entry was kept only when its link appeared nowhere earlier in the answer, and an entry without a link was dropped.
Two products, two rules. The Todoist check refused a link whose text reads as another address, such as [example.com](<a page the run read>), while the Comms check posted it, so I moved the rule into one function both products call.
What we measured
For the sources rule, the evaluation set had 27 cases played three times. The 15 runs that had to link a source all did. The judge gave cited_sources a 5 on all 81 runs. The expectation pass rate went from 0.933 to 0.965, and the cases still failing were failing before. On the Yule Ball case, where the source thread holds a document link, the model had copied that link in 3 runs out of 3, and the check refused each answer. The fix then was to name the document and link the thread.
For offered links, the same case asks “Where is the plan for the Yule Ball, and who wrote it?”. On main, 6 runs out of 6 left the document link out. With the change, 6 out of 6 linked it exactly.
For bare links, over 35 cases, no answer used a titled source link. For the reworded instructions, apart from the 12 out of 12 above, the 18 cases that must cite a source passed 53 of 54 runs before and 54 of 54 after, on a draft of the wording, which the comparison reports as no clear difference.
The bookkeeping fixes are checked by unit tests, not by the evaluation set.
What I’d tell someone doing the same
- Check the mechanical part in code. Whether a link is one the run was given needs no model. Whether the source supports the claim does, so leave that to a judge.
- Expect the bugs in the bookkeeping, not in the rule.
- Prefer removing a link to refusing the answer. A reader who gets “the dashboard” without a link still gets the answer.
- Make the evaluation check read links the way the product renders them. Our
must_cite_idscounts a link only when Comms would show it as the thread’s title, so a passing case is what the reader sees. - Don’t stop at the prompt. After I reworded the instructions, answers could still repeat a link, from the model or from code that appends sources, until code checked it before posting.
The trade-off is in the product pages. Since an answer may link any Todoist, Comms or Automations page, a Source: line no longer proves the run read the thread it lists. Code checks less, and the judge’s grade on whether the sources support the answer carries more. Know which of the two you are giving up when you loosen a rule.