DEV Community

stocktoolai
stocktoolai

Posted on

A Small Provenance Schema for AI-Generated Stock Summaries

An AI summary is easier to audit when each claim carries its source. For developers building research tools, a useful starting point is a small provenance record.

{
  "claim": "Revenue increased year over year",
  "source_url": "<original-company-filing-url>",
  "reporting_period": "<period>",
  "basis": "consolidated",
  "page": "<page-or-section>",
  "checked_by_human": false
}
Enter fullscreen mode Exit fullscreen mode

Why these fields matter

A reporting period prevents a recent summary from silently repeating an old number. A basis field prevents mixing standalone and consolidated accounts. A page reference makes it possible for a reader to reproduce the check without searching a long document.

Validate before displaying

Treat model output as untrusted input. Parse it against a schema, check that the URL belongs to an expected source, and display an explicit missing-source state when the field is absent. A well-formed URL alone does not establish that the document supports the claim.

Keep extracted figures separate from narrative interpretation. Store units and currencies explicitly; do not let the interface imply that a percentage, a currency amount and a per-share value are interchangeable.

A minimal review loop

  1. Fetch or upload the original filing.
  2. Extract a claim with its passage and document location.
  3. Verify period, units and accounting basis.
  4. Let a reviewer accept, amend or reject the claim.
  5. Preserve the source reference when generating a shorter summary.

This is a suggested design pattern, not a description of a production architecture or a claim of improved model accuracy.

Disclosure: this post is from the StockTool.AI account. StockTool.AI is our stock insights and tracking platform; the pattern above is relevant to tools that organize financial research. AI output should be checked against original disclosures. This article does not provide investment advice.

Written with AI assistance.

Top comments (0)