Skip to content

AI & LLMsSEC filings assistant

Ask about ten companies’ annual and quarterly reports, and get the answer with the passage it came from.

Pick a question, and see the answer, its grade and what the model was shown

Loading the questions…

The question

Companies file their annual (10-K) and quarterly (10-Q) reports with the SEC: long documents, with the numbers in tables and the risks in prose. An assistant over them has to find the passage that answers a question among thousands, answer from it and show it, or say that the filings don’t answer.

Products like Hebbia and AlphaSense show the passage behind an answer. Here the questions, their answer key and every answer are open, so how often it is right can be checked: I wrote 223 questions with known answers before building it, measured every choice on them, then tested it on 100 more written after every setting was fixed.

How it works

A filing into chunks

I keep only each filing’s main document, turn its HTML into paragraphs and tables, and cut it into chunks that never cross an Item (Item 1A, Risk Factors; Item 7, the managers’ discussion) and are never longer than the embedder reads. A table stays whole; a long one is cut by its rows, with its caption and header rows on every piece, so a number never loses the column that says which year it is. The 45 filings make 12,995 chunks.

Cutting a report along its own parts, its sections and its tables, rather than every few hundred words, is what Jimeno Yepes and others found worth most when they chunked financial reports for retrieval. Each chunk also keeps its Item and the page it was printed on, which is what a citation points to.

A line on every chunk: the company, the period, the Item

A table of income figures looks the same in every company’s report and every year’s. So every chunk starts with one line saying whose it is and when: “NVIDIA Corporation (NVDA) 10-K for fiscal year 2025 (ended January 26, 2025). Part II, Item 7. Management's Discussion and Analysis of Financial Condition and Results of Operations.” The line is embedded and indexed with the chunk, and the reranker reads it too.

It is the cheap form of Anthropic’s contextual retrieval, a fixed line instead of one a model writes for each chunk, and the part of the search worth most: +22.8 points (95% interval +19.5 to +26.6) in the top ten, over the 20 pairs of setups that differ only in it.

Switch the header line off and on. With it, the small MiniLM embedder ranks this table 3rd for the question; without it, 65th. Over all 203 questions, MiniLM alone puts the evidence in the top ten for 18% without the line and 47% with it.

Vector search turns the question and every chunk into embeddings, lists of numbers placed so that texts of like meaning sit near each other, and finds the chunks nearest the question: it knows that “earn” and “net income” mean the same here. Keyword search, BM25, scores a chunk by the question’s words it holds, a rare word far more than a common one, a word repeated less with each repeat, and a long chunk less than a short one: it is the search that finds “fiscal year 2025” and a ticker exactly. Each search gives its own ranked list, and each finds things the other misses: for the question below the two top tens share 3 chunks.

Their scores can’t be added (a cosine of 0.79 against a BM25 score of 10.4), so reciprocal rank fusion adds their ranks instead: a chunk scores 160+r\frac{1}{60 + r} for its rank rr in each list it is in. The table 1st by vectors and 4th by keywords scores 161+164=0.0320\frac{1}{61} + \frac{1}{64} = 0.0320 and comes first. Keyword search beside vectors is worth +3.7 points (95% interval +2.3 to +5.4) on average: +7.8 beside the small MiniLM embedder, +0.6 beside OpenAI’s large one, which already finds most of what the words would.

The question’s two top tens and the eight fusion keeps, which hold the answer 1st, 2nd, 3rd, 6th and 7th. Point at a chunk to see what each list gives it. Over all 203 questions, keyword search beside OpenAI’s large embedder takes the evidence in the top ten from 72.4% to 73.4%.

The filters read from the question

Before either search, I read the question for a company, by any of its names, and a period: a date, which picks the filing whose quarter ends that day, or a fiscal year, which picks that year’s 10-K. Each is kept only if the filings hold it, and the period only once a company is named; a question that names neither is searched across everything. “How much net income did NVIDIA earn in fiscal year 2025?” leaves 975 of the 12,995 chunks after the company and 404 after the period: one filing.

The filters are worth +12.8 points (95% interval +10.5 to +15.1) in the top ten, +19.5 on the numbers alone, where the same table exists in every report, and less where the header line already says whose a chunk is: +5.3 with it, +26.5 without.

Switch the filters on one at a time. Over all 203 questions, on the search the assistant uses, they take the evidence in the top five from 67.0% to 73.4%, and in the top ten from 73.4% to 75.9%.

A reranker, measured and left out

An embedding is made of the question alone and of each chunk alone. A cross-encoder reads the question and a chunk together, as one text, and scores how well the one answers the other; it is too slow to read all 12,995 chunks, so it reorders the fused list’s first 40. I measured two: the MiniLM cross-encoder, which runs anywhere, and Cohere’s, a paid service.

On average the cross-encoder adds +4.3 points in the top ten, most over the small embedders: +9.5 over MiniLM. Over OpenAI’s large embedder, the one the assistant uses, it puts the evidence first less often: −7.3 points (−11.4 to −2.9). Cohere’s reranker finds +2.0 points more in the top ten but puts it first less often (−5.4). So the assistant ranks by the fused list alone.

Reorder the question’s fused ten with each reranker; the red lines are the chunks that hold the answer. Over all 203 questions, on the search the assistant uses, the evidence comes first for 46.3% with no reranker, 39.4% with the cross-encoder and 40.9% with Cohere’s; it is in the top ten for 75.9%, 73.9% and 77.8%.

How an answer is graded, and a citation checked

A number is checked in code against the value the filing tags in XBRL: right when the answer states it to the precision it gives, with its scale word applied, so “$416.2 billion” is right against 416,161 million. A number with no scale word and a thousands comma, “416,161”, is read as the filings’ tables print it, in millions. Dates, years, percentages and citation markers are taken out first, so “June 30” is never $30 billion.

A text answer is graded by a model against the passage the question was written from: correct, partly right for half a point, or wrong. A question the filings can’t answer counts only when the answer says so without stating an answer as fact. The grading model is named beside its grades, since two graders can agree on most answers and still move a score by a few points (Thakur and others).

Every claim in an answer carries a marker, [1], for the excerpt it came from. A citation counts when that excerpt holds the evidence: for a number, the figure as the filing prints it, in the company’s own filing; for a text answer, at least half of the evidence passage’s six-word runs.

Four stored answers from the demo. Grade each yourself, then see the grade and the check that gave it; under a number, type any answer to see how the rule reads it. Over the 203 questions, the live setup’s answers cite the passage holding the evidence in 72% of cases.

The data

The filings
13 annual (10-K) and 32 quarterly (10-Q) reports of Apple, Amazon, Broadcom, Berkshire Hathaway, Alphabet, Eli Lilly, Meta, Microsoft, NVIDIA and Tesla, filed from early 2025 to early 2026, from SEC EDGAR (opens in a new tab). It reads them as 12,995 chunks.
The answer key
120 questions whose numbers come from the XBRL tags in the filings themselves, 83 about risks and strategy, each with the passage that answers it, and 20 the filings can’t answer. Then 100 held out (50 numbers, 40 text, 10 the filings can’t answer), on figures and passages the first set never used, committed as c21fa78 (opens in a new tab) before any answer to them existed.
The grading
Numbers checked in code against the tagged value, text answers graded by a model against their passage (how). Two setups answered: the live one, behind the demo (OpenAI’s large embedder with BM25 and the filters, gpt-4o-mini answering, gpt-4.1 grading), and one with no paid key (bge-small + BM25 + filters, Claude Haiku 5.5 answering, Claude Sonnet 5.5 grading), on the held-out questions.

The answers were produced once and stored: nothing is generated when you open the page.

What I found

Build the search

I scored every setting of the search on the 203 answerable questions: how often the passage or table cell that answers a question is among the ten chunks a setup retrieves. From the baseline, clean chunks and a small, common embedder, to the setup the assistant uses, it goes from 18% to 76%.

The largest single step was the cheapest: a line naming the company and the period at the top of each chunk, worth 29 points. A better embedder came next (69% with bge-small), and OpenAI’s largest added only 3 more. On the live setup, turn keyword search off and it loses 2.0 points; turn the filters off and it loses 2.5.

Two rerankers were measured the same way and left out: the cross-encoder found less (74% in the top ten), and Cohere’s found 78% but put the evidence first less often (41% against 46%). And the search that needs no paid key, bge-small with keyword search and the filters, finds the evidence in the top ten as often as the live one, 76%, and first for 43%.

What each part is worth

What each part of the search is worth, in points, with its 95% interval, and whether the assistant keeps it
PartTop tenFirstPairsIn the assistant
The header line on every chunk+22.8+19.5 to +26.6+21.4+17.8 to +25.620Kept
Filters read from the question+12.8+10.5 to +15.1+6.1+3.9 to +8.428Kept
Keyword search (BM25) beside vector search+3.7+2.3 to +5.4+2.2+0.9 to +3.524Kept
OpenAI’s large embedder instead of bge-small+1.5+0.5 to +2.7+3.3+0.9 to +6.08Kept
The MiniLM cross-encoder+4.3+2.1 to +6.2+1.9−1.3 to +5.228Left out
Cohere’s reranker, over the live search+2.0+0.5 to +3.9−5.4−12.9 to +1.81Left out

Points of the share of questions with the evidence in the top ten, and first. Each part’s gain is its average over the pairs of setups that differ only in it, with a 95% interval from 10,000 resamples of the 45 filings, since the questions on one filing rise and fall together (Miller). Cohere’s is its one measured pair.

One change at a time, and all the numbers

The path from the baseline to the setup the assistant uses, one change a row, each row the share of questions with the evidence in the top ten. Hover a bar for the rest of its numbers.

Share of questions whose evidence is in the top ten results, for each setup
  1. Clean chunks, a small embedder (MiniLM)18%
  2. + company/period header in each chunk47%
  3. bge-small embedder69%
  4. OpenAI text-embedding-3-small71%
  5. OpenAI text-embedding-3-large72%
  6. + BM25 keyword search (hybrid)73%
  7. + company/period filters from the question76%
  8. + MiniLM cross-encoder reranker74%
  9. + Cohere rerank-v3.5 instead78%
The retrieval numbers behind the chart
SetupTop 1Top 5Top 10MRRNumbersText
Clean chunks, a small embedder (MiniLM)8%15%18%0.1117%21%
+ company/period header in each chunk17%36%47%0.2656%34%
bge-small embedder33%60%69%0.4488%42%
OpenAI text-embedding-3-small38%63%71%0.4990%43%
OpenAI text-embedding-3-large43%66%72%0.5393%42%
+ BM25 keyword search (hybrid)45%67%73%0.5494%43%
+ company/period filters from the question46%73%76%0.5798%45%
+ MiniLM cross-encoder reranker39%68%74%0.5194%45%
+ Cohere rerank-v3.5 instead41%76%78%0.5699%47%

What I built

In Python, in four stages, each measured on the answer key before the next.

  1. 1. The answer key first

    120 questions whose numbers come from the XBRL tags in the filings themselves, 83 about risks and strategy with the passage that answers them, and 20 the filings cannot answer, written before anything was built; then 100 more, written after every setting was fixed and frozen by a commit before anything answered them.

  2. 2. Read the filings

    12,995 chunks of paragraphs and whole tables, each with its header line, Item and printed page (How it works).

  3. 3. Find

    Scored every setting of the search on the 203 answerable questions, 56 setups in all, and kept the parts that gain.

  4. 4. Answer

    Eight excerpts shown to the model, which cites each claim and says so when the filings don’t answer; every answer graded against the key.

The result in plain words

On the 100 questions held out, with the search that needs no paid key:

Numbers answered right
96%48 of 50
95% interval 90–100% · the first 223: 95%
Text answers, graded
91%40 questions
95% interval 83–99% · the first 223: 89%
Said so when the filings don’t answer
100%10 of 10
every one · the first 223: 100%
Cites the passage with the answer
77%90 answerable
95% interval 68–85% · the first 223: 72%

On 100 questions written after every setting was fixed, and frozen by a commit before anything answered them, it gets 96% of the numbers right (48 of 50, none wrong), scores 91% on the text answers and says so for all 10 the filings can’t answer. Every figure sits inside the interval of the same figure on the first 223, the questions the settings were chosen on: it holds on questions it had never seen.

The demo’s answers come from the live setup (OpenAI’s large embedder with BM25 and the filters, gpt-4o-mini answering, gpt-4.1 grading). On the first 223 it gets 94% of the numbers right, puts the evidence in front of the model for 76% of the questions, cites the passage holding it in 72% of its answers, and declines every one of the 20 the filings can’t answer, at $0.03 per 100 questions and a median 4.3 seconds an answer.

Every number

Every answer score, on the held-out questions and on the first set, with the two setups
ScoreHeld out (100), no keyFirst 223, no keyFirst 223, live
Numbers right96%95%94%
Text answers, graded91%89%84%
Said so when the filings don’t answer100%100%100%
All answerable questions94%92%90%
Evidence among what the model was shown78%73%76%
Answer cites the passage holding the evidence77%72%72%
Numbers: right, wrong, declined48 right, 0 wrong, 2 declined114 right, 3 wrong, 3 declined113 right, 6 wrong, 1 declined
Text: right, partly, wrong, declined36 right, 1 partly, 0 wrong, 3 declined71 right, 5 partly, 0 wrong, 7 declined62 right, 16 partly, 2 wrong, 3 declined

No key: bge-small + BM25 + filters, Claude Haiku 5.5 answering, Claude Sonnet 5.5 grading. Live: OpenAI’s large embedder with BM25 and the filters, gpt-4o-mini answering, gpt-4.1 grading. Intervals: 95%, percentile bootstrap over filings; unanswerable questions one by one, 10,000 resamples.

What I’d do next

  1. Follow-up questions

    It answers one question at a time, with no memory of the last, so “and the year before?” starts from nothing. Carrying the company and the period over from the question before is the next feature.

Questions people ask

How does RAG work on SEC filings?

Retrieval-augmented generation finds the passages that answer a question and has a language model answer from them, citing each. Over SEC filings the hard part is the finding: 45 filings are 12,995 chunks, and the same table recurs in every report. Here a header line on each chunk, two searches and filters read from the question put the evidence in the top ten for 76% of 203 questions, against 18% for plain chunks and a small embedder.

What is hybrid search, and is it better than BM25 or vectors alone?

Hybrid search runs keyword search (BM25) and vector search side by side and fuses their lists. On these filings it is better than either alone, by how much depends on the embedder: BM25 adds +7.8 points beside a small embedder and +0.6 beside OpenAI’s large one (Two searches).

What is reciprocal rank fusion?

A way to join ranked lists without comparing their scores: each item gets 1k+r\frac{1}{k + r} from every list it is in, rr its rank there, and the sums are sorted. With k=60k = 60, a chunk first in both lists scores 261≈0.0328\frac{2}{61} \approx 0.0328; a chunk first in one list only, 161≈0.0164\frac{1}{61} \approx 0.0164, so being found by both searches counts for more than being first in one.

Reciprocal rank fusion or a reranker: which one?

They do different jobs: fusion merges two searches’ lists, a reranker reads the question with each candidate and sorts the list again. Here fusion stays and the reranker was left out, because over OpenAI’s large embedder the cross-encoder put the evidence first 7.3 points less often.

Does a reranker always help?

No. Over the small MiniLM embedder the cross-encoder adds +9.5 points in the top ten; over OpenAI’s large embedder it adds nothing in the top ten and costs 7.3 points in first place. A reranker is worth measuring on your own questions before it goes in.

What is contextual retrieval, and is a header line the same thing?

Anthropic’s contextual retrieval has a model write a sentence of context at the head of each chunk before it is indexed. A fixed header line naming the company, the period and the Item is its cheap form: no model call, the same line for every chunk of a section. On these filings it is the part of the search worth most, +22.8 points in the top ten.

How do you evaluate a RAG pipeline?

In two parts, each against an answer key. The search: for each question, where the passage holding the answer ranks. The answers: right, wrong or declined, and whether the cited passage holds the evidence. Write the questions first, and keep a set nothing is tuned on: here, 100 questions frozen by a commit before anything answered them.

Which RAG evaluation metrics matter?

For the search, the share of questions with the evidence first, in the top five and in the top ten, and MRR@10, which rewards ranking it high. For the answers, numbers right, text answers graded, questions the documents can’t answer declined, and answers that cite the passage holding the evidence. Each with a 95% interval: on 50 numeric questions, 96% right is somewhere between 90% and 100%.

Can you evaluate RAG without ground truth?

Partly: a model can judge whether an answer is supported by the passages it was shown. But a key makes the numbers firm. For filings the key is in the filings themselves: every figure in a 10-K or 10-Q is tagged in XBRL, so 120 of these questions have answers no one had to write.

Where do the questions and their answers come from?

The numeric questions ask for a figure the filing tags in XBRL, so the answer key is the filing’s own. The text questions are written from a passage, each kept only if its quoted evidence appears in the filing word for word. The questions the filings can’t answer ask about companies, years and facts they don’t hold.

How is this different from FinanceBench?

FinanceBench is a benchmark: questions over 10-Ks with their answers, graded by hand, for comparing systems. This is a system with its own questions over 45 filings of 10 companies, its numeric key read from XBRL, and every setting of its search scored on them, so each part’s worth is measured.

Further reading

References

  • Islam, P., Kannappan, A., Kiela, D., Qian, R., Scherrer, N., Vidgen, B. (2023). FinanceBench: A New Benchmark for Financial Question Answering. arXiv:2311.11944.
  • Kobeissi, A., Langlais, P. (2026). Decomposing Retrieval Failures in RAG for Long-Document Financial Question Answering. arXiv:2602.17981.
  • Nandula, K. (2026). Show Your Work: Can Small Open Models Read SEC Filings with Evidence a Machine Can Check? arXiv:2611.24990.
  • Jiang, Y., Chen, J., Makri, E., et al. (2026). Fin-RATE: A Real-world Financial Analytics and Tracking Evaluation Benchmark for LLMs on SEC Filings. KDD 2026. arXiv:2602.07294. doi:10.1145/3770855.3817528.
  • Choe, J., Kim, J., Jung, W. (2025). Hierarchical Retrieval with Evidence Curation for Open-Domain Financial Question Answering on Standardized Documents. Findings of ACL 2025. arXiv:2505.20368. doi:10.18653/v1/2025.findings-acl.855.
  • Choi, C., Kwon, J., Ha, J., et al. (2025). FinDER: Financial Dataset for Question Answering and Evaluating Retrieval-Augmented Generation. ICLR 2025 Workshop on Advances in Financial AI. arXiv:2504.15800.
  • Reddy, V., Koncel-Kedziorski, R., Lai, V. D., Krumdick, M., Lovering, C., Tanner, C. (2024). DocFinQA: A Long-Context Financial Reasoning Dataset. arXiv:2401.06915.
  • Anthropic (2024). Introducing Contextual Retrieval. 19 September 2024.
  • Jimeno Yepes, A., You, Y., Milczek, J., Laverde, S., Li, R. (2024). Financial Report Chunking for Effective Retrieval Augmented Generation. arXiv:2402.05131.
  • Cormack, G. V., Clarke, C. L. A., Büttcher, S. (2009). Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Learning Methods. SIGIR ’09, 758–759. doi:10.1145/1571941.1572114.
  • Robertson, S., Zaragoza, H. (2009). The Probabilistic Relevance Framework: BM25 and Beyond. Foundations and Trends in Information Retrieval 3(4), 333–389. doi:10.1561/1500000019.
  • Miller, E. (2024). Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations. arXiv:2411.00640.
  • Thakur, A. S., Choudhary, K., Ramayapally, V. S., Vaidyanathan, S., Hupkes, D. (2025). Judging the Judges: Evaluating Alignment and Vulnerabilities in LLMs-as-Judges. GEM² Workshop, ACL 2025, 404–430. arXiv:2406.12624.