How to build an LLM eval set from SEC XBRL company facts
Short answer: pull the facts in bulk, swap the bulk file's month-end dates for the filing's own dates, read segment facts from the filing's inline XBRL, compute each reference in code, re-check every cited fact against the filing, then read each question against the filing's line labels. That last step changed 13 of Tickmark Core's 149 tasks.
Key facts
| Set | Tickmark Core: 149 tasks from 67 companies, built from 10-Q and 10-K filings dated 7 April to 29 September 2026. |
|---|---|
| Sources | The SEC Financial Statement Data Sets to generate tasks. The companyfacts API and each filing's inline XBRL to re-check them. |
| Wording review | 10 November 2026. 13 of the 149 tasks changed: 12 questions reworded with the reference kept, and 1 reference corrected. Task ids did not change. Our Core changelog records each one with the old and new question. |
| Model calls for this post | None. The counts come from our Core changelog and the shipped task file. |
Seven steps from company facts to a graded set
These are the steps the Core pipeline runs, in order. Steps 2, 3 and 6 are explained below.
- Pull the facts in bulk and filter by date. Start from the SEC Financial Statement Data Sets. Core keeps 10-Q and 10-K filings dated 1 April 2026 or later whose current period ends on or after 1 January 2026.
- Replace month-end dates with the filing's own dates. The bulk files round each period end to a month end. Load the filing's XBRL instance and use its context dates, with zero days of slack.
- Read segment facts from the filing, not from companyfacts. The companyfacts API returns facts without dimensions. Read any fact on a segment axis from the filing's inline XBRL, and require the axis and the member to match exactly.
- Compute each reference in code and cite its facts. Store the concept, period, unit, dimensions and accession of every fact the answer uses, and compute the reference from those values.
- Re-check every cited fact against the filing. Drop a task when any cited fact is missing from the filing's XBRL instance or differs in period dates, dimensions or unit.
- Read each question against the statement's own line labels. Name the statement line, say whether intersegment sales count, and give period dates instead of fiscal labels.
- Grade answers in code within a stated tolerance. Ask for a value, a unit and a scale in JSON, and score them in code.
Why the bulk dates are not enough
The Financial Statement Data Sets record each period end rounded to a month end. Tetra Tech's fiscal quarter ended on 28 June 2026, and the bulk file records it as 30 June. A question that says "the three months ended June 30, 2026" then names a period the filing does not show. Core reads the context dates from each filing's XBRL instance and allows zero days of difference.
Why segment facts need the filing
A segment figure is the same concept as the company total, with a member on an axis such as the business-segments axis. The companyfacts API returns facts without dimensions, so Core's re-check reads consolidated facts from companyfacts and any segment fact from the filing's inline XBRL. The member must match exactly: Retail does not match NonRetailMember. Thirty Core tasks read a segment figure from a 10-Q; how models did on them is a separate note.
What reading the questions against the filings changed
Every cited fact already matched the filing's XBRL instance. The 13 changes are about which line a fact sits on: 12 questions let a reader pick a different line from the one the reference used, and one reference used the wrong line.
| Cause | Tasks | Example |
|---|---|---|
| The concept is not the statement line the question names | 5 | NiSource reports Customer revenues and Total Operating Revenues. Three comparison tasks used Customer revenues and now say so. |
| Segment revenue with or without intersegment sales | 5 | UFP Industries reports Construction's net sales to outside customers and its intersegment sales on separate rows. The question now excludes intersegment sales. |
| The fiscal label in the question differs from the filing's | 3 | Orion Energy Systems calls its June 2026 quarter fiscal 2027 Q1. The generated questions said fiscal 2026 Q1. They now give the period end date. |
The one corrected reference is Tetra Tech's gross margin for the quarter ended 28 June 2026. The reference subtracted only Subcontractor costs, tagged us-gaap:CostOfGoodsAndServicesSold. The filing's Gross profit also subtracts Other costs of revenue. The reference moved from 0.8472 to 0.1859, and the question now names reported Gross profit. A concept name can fit the question and still be the wrong line in that filing.
The fifth line-item case is Rocky Mountain Chocolate Factory, whose Cost of sales row is separate from Franchise costs. The other intersegment cases are Tetra Tech's Commercial/International Services Group, Forward Air's Intermodal segment, Broadwind's Industrial Solutions segment and an Air T segment claim.
XBRL can also be wrong
A fact can match the instance and still disagree with the filing's text. When XBRL reports a 2026 impairment the filing does not have shows two cases. Check a sample of references against the HTML statement, as well as against the instance.
Limits
The 13 changes come from one review of 149 tasks on 10 November 2026. They show what that review found in this set. They are not an error rate for XBRL or for companyfacts. Core's generator and checks are ours; another pipeline may need different filters.
Use a set that has been through these checks
Core is the 149 tasks after all seven steps, with reference answers, tolerances and the cited XBRL facts, scored by grade.py. Start with the free 20-task sample, read how it's graded and the datasheet, or see Core on the pricing page. For writing the questions themselves, see how to evaluate a language model on SEC filings. More notes are on the research page.