Pattern
- Generate a summary of a document or of retrieved context.
- Call
POST /v1/attributionswith the document, the summarization prompt asquestion, and the summary asanswer. - Make each returned answer range a hover or click target.
- On click, scroll the document pane to the source range and highlight it.
UX that works
- Keep the summary readable. Link the facts, such as numbers, names, dates, and claims, and leave the rest as plain text.
- Show the evidence in place. A side-by-side document pane, or a popover with the source
text, keeps the reader in flow. - Use
confidencefor emphasis, not as a verdict. Sort or style links by strength.confidencesays how strongly a phrase is tied to its source, not whether the summary is right. - Highlight with the original offsets. Keep the exact document string you sent, so source ranges line up with what you render.
Where it fits
- Financial filings and earnings summaries
- Contract, policy, and compliance review
- Support-ticket and call-transcript summaries
- Research notes and literature digests
- Analyst-report roundups
