AddThisFeature

AI Source Citations

Attach every factual claim in an AI answer to the record or passage that supports it.

involved AI Safety & Trust

What it adds

Inline citations on AI-generated answers, each resolving to a specific record, document, or passage inside the app.

What your agent is told to do

5
  1. 1

    Find the places where the app already generates answers from its own data, and capture which records were retrieved for each generation. Citations are built from the retrieval step, not reconstructed afterwards by asking the model where it got something.

  2. 2

    Cite the smallest useful unit. A paragraph or a single field beats a whole document, and a whole document beats a collection, because a citation the user has to search through is barely a citation.

  3. 3

    Re-check permissions at the moment a citation is opened, using the app's existing authorization rules. The set of records the generation ran over may include things the reader is not entitled to see, and the citation must fail closed rather than reveal a title or excerpt.

  4. 4

    Mark statements that combine several sources as inferences, listing every source involved, and distinguish them visually from statements lifted from one place. Confidence banding and review routing belong to AI Confidence and Uncertainty; this feature owns only provenance.

  5. 5

    Do not attach a citation to a statement merely because the record was in the retrieval set. An unsupported claim with a plausible-looking citation is worse than an uncited one, because the citation stops the reader checking.

Edge cases it handles

8
  • A citation must point at the smallest span that actually supports the claim. Citing an entire long document forces the reader to re-do the work and turns provenance into decoration.
  • Permissions must be checked when the citation is opened, not only when the answer was produced. A user whose access was revoked, or a colleague the answer was shared with, must be refused without leaking the source's title or a preview.
  • Retrieved but unused records must not be cited. The retrieval step returns candidates, and treating all of them as support attaches authority to material the answer never relied on.
  • A statement synthesised across several sources must say so and name all of them, rather than picking one source and presenting the inference as a direct quotation.
  • When a cited record is deleted, moved, or has its access changed, the citation must resolve to a clear unavailable state that says the source no longer exists or is no longer visible. A dead link or a silent redirect to the wrong record destroys trust in every other citation on the page.
  • An answer where the model produced no supportable claims must say it could not find support, rather than shipping an uncited wall of text that looks identical to a cited one.
  • Citations must survive the answer being exported, printed, or copied, at minimum as a readable reference, because an answer separated from its provenance will be quoted as fact.
  • If the generation is truncated or the model returns malformed structured output, discard the partial citation mapping rather than attaching offsets that now point at the wrong text.

Definition of done

8
  • Every factual statement in a generated answer either carries a citation or is visibly marked as unsupported.
  • Citations resolve to a specific record or passage, not to a search result or a collection.
  • Opening a citation re-checks the reader's permissions and refuses without leaking source content.
  • Statements inferred across multiple sources are labelled as such and list every source involved.
  • Deleted or newly restricted sources render as an explicit unavailable citation rather than a broken link.
  • Records retrieved but not used to support the answer are never cited.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.