Methodology

How we extract risk factors, compute diffs, and interpret them. Where the deterministic pipeline ends and the AI layer begins.

Page generated 2026-11-25; source filing dates vary

Automated comparisons and AI summaries can contain errors. Check the linked source filings.

Pipeline overview

RiskDiff has five stages. All five are deterministic — given the same source filing, they produce the same output every time, with no language model involvement. The fifth stage summarizes observed disclosure changes. It does not infer the direction of business risk.

Stage 1 — EDGAR fetch

Deterministic

SEC EDGAR HTTP fetch

10-K filings are fetched directly from www.sec.gov using the company's CIK. Every fetch carries a User-Agent header per SEC requirements. Each filing's accession number is preserved so any claim on the site can be traced back to the exact source document.

Stage 2 — Item 1A extraction

Deterministic

4-strategy locator

Risk factors live in Item 1A of the 10-K. The extractor tries four strategies in order:

Extraction uses BeautifulSoup. No large language model is involved. If all four strategies fail, the filing is skipped. Extraction can still misidentify headings or include page furniture; use the original filing to check any important finding.

Stage 3 — TF-IDF similarity diff

Deterministic

scikit-learn cosine matching

Each risk factor from the prior year is matched against the current year using TF-IDF vectorisation (unigrams + bigrams) and cosine similarity. The greedy best-first match assigns pairs above a similarity threshold; unmatched entries become ADDED or REMOVED. Newly regenerated comparisons classify matched pairs as UNCHANGED only when their normalised text is equal; other matched pairs are MODIFIED. Older saved comparisons used a similarity threshold for unchanged sections and may omit small edits.

Factor-match confidence describes textual similarity between paired sections, not the accuracy of a claim or the likelihood of a financial outcome. For modified sections, cosine similarity of at least 0.75 is high confidence; 0.60 to below 0.75 is medium; 0.45 to below 0.60 is low. Scores below 0.45 are not paired. These labels are heuristics, not calibrated probabilities.

For MODIFIED entries we run a sentence-level diff using difflib.SequenceMatcher to produce a short list of reworded, added, or removed sentences.

Stage 4 — Deterministic disclosure-change score

Deterministic

Rule-based 1-10 score

Every disclosure gets a deterministic 1-10 score for prioritizing changes. It combines matching status, textual similarity, topic keywords, and length difference. It does not estimate financial impact or the probability of harm. The formula:

Tiers: 8-10 = high, 4-7 = medium, 1-3 = low. The same input always yields the same score. No large language model involved.

Stage 5 — Disclosure overview

Deterministic

Observed text changes

The overview reports counts across all extracted sections in the comparison. It is not an AI interpretation. Business-risk direction is undetermined: wording edits and unmatched sections do not establish increased or decreased exposure.

Legacy AI briefs are withheld. Derived comparisons are invalidated when source evidence or comparison rules change. The API exposes the overview as disclosure_overview; the legacy ai_brief field is null.

Related passages help review reorganized disclosures. Approximate textual overlap does not establish that an entire risk continued. Unresolved sections require source review.

Coverage and known limits

Coverage and filing dates lists the cached annual comparisons and available source metadata. Coverage varies by company and year. It is not a complete SEC filing monitor and does not include a quarterly comparison pipeline. Missing extraction or source metadata may leave gaps. Heading errors, merged or split factors, and reordered sections can change matching results; an added factor does not establish that a theme is new to the company.

Opt-in email updates

Confirmation sends a historical sample. We check daily for selected published comparisons with known filing dates in the past 14 days, around or after your confirmation date. Filing dates record the day rather than the time; the eligibility window allows one day before confirmation. Optional company preferences narrow those updates. Unknown dates and historical examples are excluded from new-filing updates. These are selected updates, not real-time or comprehensive filing alerts.

Reproducibility

Comparisons and disclosure overviews are computed deterministically from the validated extraction inputs and the versioned comparison code. Derived caches are invalidated when those inputs or algorithms change. The overview reports comparison counts; it does not infer whether investment risk increased or decreased.

Open data

Each public company page has index.md (Markdown) and index.json preview alternates with summary counts, selected changes, and SEC source links. Research subscribers can access the complete JSON and Markdown export of each individual comparison under /full/. A single-download bulk export of the entire dataset is not included. The MCP server at https://riskdiff.com/api/mcp provides full comparisons through its Research tools.