17 min read

RAG framework ranking on SEC filings: seven frameworks, 28 modes, one frozen scorecard

RAG framework ranking on SEC filings: seven frameworks, 28 modes, one frozen scorecard
Read aloud by your browser. Nothing is downloaded.

Part of RAG & Vector Databases — retrieval-augmented generation and vector search.

✅ REAL DATA — Every number in this RAG framework ranking comes from measured runs on my own hardware · seven frameworks in podman, one at a time · Qwen3.8-27B (Q4_K_XL) on llama.cpp/Vulkan, both answering and marking · AMD Radeon PRO W7900 48 GB · Windows 11 · 33 NVIDIA filings from SEC EDGAR · 40 questions whose answers sit in more than one filing.
Key takeaways
  • This RAG framework ranking covers seven frameworks and 28 measured modes on one benchmark. Best mode per framework on the frozen scorecard: Haystack 85.5 (27 of 40 correct), R2R 80.1 (22), LlamaIndex 77.7 (19), LightRAG 74.4 (18), GraphRAG 65.3 (8), kotaemon 58.1 (12), RAGFlow 57.9 (13). The naive floor answered 6.
  • The top three are flat retrievers, and all three got there by the same move: smaller chunks at the same token budget. LlamaIndex 5 to 19, Haystack 16 to 27, R2R 11 to 22, on the same index each time.
  • Document recall stopped predicting correct answers in episode 6 and never resumed. Across 28 modes the answers follow the share of gold passages in the prompt.
  • Graphs earned their 11 to 13 hours on two of eight patterns: joining the proxy statement to the annual report, and knowing when an answer is absent. On the other six they were a tax.
  • No pattern is unsolved except one. D7, a figure restated after the ten-for-one split: best result four of five, from a lexical index; every dense retriever managed two or fewer.

Why a RAG framework ranking, and why only now

This RAG framework ranking is the tenth and last article of a series that measured seven retrieval frameworks on the same corpus, the same questions, the same local model and the same blind judge, one framework at a time. Every episode refused to rank its framework against the others. Consequently, this article is where that refusal pays off: the numbers below were produced under one frozen protocol over several weeks, and none of them was known when the scoring rubric was written.

The ranking is the least interesting result. The pattern behind it is not. In particular, the three best modes of the series are plain retrievers that show the model more, smaller pieces of the corpus. The two frameworks that build a knowledge graph earned their hours on exactly two of the eight ways knowledge scatters across financial filings.

What this RAG framework ranking measures, and what it does not

Every episode in this series measured one framework against the same forty questions and refused to rank it against the others. That was deliberate: a number produced on Tuesday is not comparable with a number produced three weeks later unless the corpus, the questions, the judge and the generation server were frozen in between, and the whole point of freezing them was to make this article possible. Hence the ranking lives here and nowhere else.

Specifically, the benchmark is 33 NVIDIA filings from SEC EDGAR: three annual reports, eight quarterly reports, two proxy statements and twenty current reports, 749,859 tokens in all, cleaned from Inline XBRL into Markdown with the tables kept. On top of it, in turn, sits a golden set of 40 questions that the model proposed and ten machine-checked rules approved, five for each of eight ways knowledge scatters across such documents. In addition, half the questions need two filings to answer; five have no answer in the corpus at all, and the correct response to those is a refusal.

The eight dispersion patterns

The eight patterns are the axis every result below is reported on:

PatternWhat has to be joinedScope
D1a table cell and the narrative that explains itinside one filing
D2a figure and the footnote it depends oninside one filing
D3a definition and its use, far apartinside one filing
D4a quarterly figure and its annual counterpartacross filings
D5an event in an 8-K and its consequence in a later reportacross filings
D6governance data in the proxy and operations in the 10-Kacross filings
D7a figure and its restatement after the ten-for-one splitacross filings
D8nothing: the answer is not in the corpusthe whole corpus

What was held constant

Three things were held constant for every framework. First, the generation model is Qwen3.8-27B (Q4_K_XL) on llama.cpp over Vulkan, on one AMD Radeon PRO W7900, one request at a time. Second, the embedder is nomic-embed-text-v1.5 on a second llama-server. Third, the answer instruction is one paragraph, byte for byte the same in every episode, delivered through whatever hook each framework offers: a prompt template, a task prompt, a QA prompt. Consequently, what differs between rows of the tables below is retrieval and nothing else.

How every answer was scored

Four layers, in order of how much they can be argued with. For example, retrieval recall is set arithmetic: did every document holding the gold evidence come back? Likewise, numeric agreement is deterministic: do the figures in the answer match the gold figures within two percent, with dates excluded? Then, invented numbers are figures that appear in no retrieved context and cannot be reached from any two of them by one arithmetic step. Finally, only the fourth layer is a model: a blind judge that grades “System A” and never learns which framework produced the answer, returning one of CORRECT, PARTIAL, WRONG or ABSTAIN.

In addition, two more measures came out of the series rather than going into it. The share of gold evidence quotes that actually reached the prompt, as opposed to the share of gold documents, was introduced in the LlamaIndex episode after document recall and correct answers parted ways, and it has been recomputed for every run since. Furthermore, every episode’s numbers pass through a claims ledger: a script that regenerates each published figure from the result files and refuses to mark it publishable while any input is still moving. The consolidation this article is drawn from reads only rows whose ledger is clean.

The scorecard rubric, frozen before the results existed

Indeed, a comparison invented after the numbers are in is a justification. The rubric was written on 22 August 2026, when only the naive baseline and LightRAG had been measured, and has not been edited since. Eight dimensions map onto 0 to 10 against fixed anchors, so a framework’s score does not move when another one is added later:

DimensionWeightAnchors (0 → 10)
Cross-document retrieval (D4–D8)300% → 100% strict document recall
In-document retrieval (D1–D3)100% → 100%
Answer correctness (blind judge)200% → 100% CORRECT
Numeric agreement100% → 100% within 2%
Knowing when not to answer100% → 100% right answer-or-refuse decisions
Grounding in its own retrieval100% → 100% supported, invented numbers subtracted
Cost to index the corpus524 h → 0 h
Cost to answer one question5300 s → 1 s, log scale

To be clear, retrieval is worth 40 of the 100 points and correctness 20, on purpose: a system that fetched the evidence and failed to use it is one prompt away from a fix, while a system that never fetched it needs a new index. Of course, the price of that choice is that the total invites misreading. A score of 85 is not 85% correct answers. For that reason, every score below is restated in questions out of forty, the way the series has done since the RAGFlow episode.

Free ebook

Free AI Video, Generated Locally

Working scripts and measured benchmarks. Free.

No spam. Unsubscribe at any time.

The RAG framework ranking on the frozen scorecard

Seven frameworks, twenty-eight measured modes, one floor. Note that the scorecard ranks modes, not frameworks, because a framework’s modes are as far apart as different frameworks are. The best mode of each one:

Framework, best modeScoreCorrectDocument recallRight answer-or-refuse decisionsBuildMedian latency
Haystack, hybrid + rerank on 200-word chunks85.527/40100%87.5%0.01 h25.3 s
R2R, semantic or hybrid at a matched budget80.122/4097.5%95.0%0.36 h21.9 s
LlamaIndex, auto-merging at a matched budget77.719/40100%70.0%0.05 h15.3 s
LightRAG, hybrid74.418/40100%77.5%10.97 h79.2 s
GraphRAG, local65.38/40100%62.5%13.08 h26.7 s
kotaemon, vector58.112/4072.5%62.5%0.04 h19.6 s
RAGFlow, RAPTOR57.913/4067.5%85.0%3.26 h12.8 s
the floor: naive vector search, episode 245.86/4070.0%37.5%—17.6 s
Horizontal bar chart of scorecard points for the best mode of each of seven RAG frameworks, with correct answers out of 40 on each bar
The best mode of every framework on the frozen rubric, with the count of correct answers written on the bar so that a score is never read as a percentage.

Three things the table says at once

First, the top three are flat retrievers with no graph. The top three are flat retrievers with no graph, and all three reached the top by one move: showing the model more, smaller pieces of the corpus for the same number of tokens. Second, the two graph frameworks sit fourth and fifth on the strength of perfect document recall, and answered 18 and 8 questions after 11 and 13 hours of indexing. Third, the spread between the best and the worst measured mode of the same framework is wider than the spread between frameworks: Haystack ranges from 10 to 27 correct, R2R from 11 to 22, LlamaIndex from 5 to 19.

How to read a score of 85.5

The scorecard’s top entry, Haystack’s hybrid-plus-reranker recipe on its default 200-word splitter at a matched token budget, scores 85.5. In questions:

  • for 25 of the 25 questions whose answer sits in more than one document, it retrieved every evidence document (30 of 30 points);
  • for 15 of the 15 questions settled inside a single document, it retrieved every evidence document (10 of 10);
  • the blind judge called 27 of 40 answers fully correct (13.5 of 20);
  • 28 of the 30 numeric questions hit the value within two percent (9.3 of 10);
  • 35 of 40 answer-or-refuse decisions were the right call (8.8 of 10);
  • 67.5% of answers stand on evidence it retrieved itself, with no invented numbers to subtract (6.8 of 10);
  • 0.01 hours to build the index and a median 25.3 seconds per answer (5 and 2.2 of 5).

In sum, forty of those 85.5 points came from finding the right documents; 13.5 came from answering correctly, 27 times out of 40. Similarly, the same sentence holds for every row: the score rewards retrieval twice as much as answering, on purpose, and the count of correct answers is the number to carry away.

Which dispersion pattern breaks which RAG framework

Above all, the series exists for this table rather than the one above. Correct answers per pattern, in questions out of five, for the best mode of every framework and the floor:

Heatmap of correct answers out of five per dispersion pattern D1 to D8 for the best mode of each of seven RAG frameworks and the naive floor
Correct answers per dispersion pattern, best mode per framework. Full names of the patterns are in the table at the top of the article.
Best modeD1D2D3D4D5D6D7D8
floor03002010
LightRAG hybrid22220514
GraphRAG local10200113
RAGFlow RAPTOR24110032
LlamaIndex auto-merge, matched24424210
Haystack hybrid + rerank, 200-word45535320
R2R matched budget25533310
kotaemon vector21222201

Why the D8 column reads backwards

D8 is the column that reads backwards. Here, a correct answer is a refusal phrased as a statement, and the judge marks a bare refusal as ABSTAIN, so the flat retrievers’ zeros mean they refused all five, which is the right behaviour. Notably, the column is where the graph frameworks score and the flat ones do not, and it is also the pattern where LightRAG was measured refusing less reliably than plain vector search on the answerable questions.

Three groups of patterns

Read across the rows, the patterns sort into three groups. D2, D3 and D5, the footnote, the definition distance and the event-to-consequence patterns, are solved: the best flat retrievers answer them five for five. Next, D1, D4 and D6, the table-against-narrative, granularity and governance patterns, are half solved, three of five at best, and the best is never the same framework for all three. Lastly, D7, the restatement across the ten-for-one stock split, is not solved by anything: the best result of the series is four of five, from kotaemon’s full-text index in hybrid mode, and no dense retriever managed more than two. This is because the two annual reports before and after the split are near-identical in vocabulary, and only a lexical match on the restated figure tells them apart.

Retrieval is not the hard part: the evidence across 28 modes

Scatter plot of the share of gold evidence quotes in the prompt against the share of answers judged correct for every measured mode of seven RAG frameworks
Every measured mode of the series. The share of gold evidence passages actually in the prompt, against answers judged correct. Document recall is not on this chart, because it stopped predicting correct answers in episode 6.

To recap, two measures of retrieval were kept for every mode: whether the right documents were represented in the prompt, and whether the right passages were. The first is what a framework reports; the second, however, is what the model reads. For instance, they parted ways in the LlamaIndex episode, where 67.5% document recall came with 13.3% of the gold passages in the prompt, and they parted ways in every episode since. Moreover, in three frameworks the mode with the highest document recall answered fewer questions than a mode with lower recall. As a result, in the chart above the correct answers follow the passages, not the documents.

Moreover, the move that carried the top three frameworks is the same move each time: hold the evidence budget in tokens fixed and cut the corpus into smaller pieces, so the same tokens point at more places. For example, LlamaIndex went from 5 to 19 correct between the same auto-merging index at top-k 8 and at a matched budget. Haystack’s default 200-word splitter at a matched budget went from 16 to 27. R2R’s default limit of ten 224-token chunks answered 11; the same index at the matched budget answered 22. Meanwhile, nothing about the retriever changed in any of the three.

What a graph cost, and what it returned

Scatter plot of hours to build the index on a log scale against the share of answers judged correct for every measured mode of six frameworks with a build cost
Hours to build the index against answers judged correct, every mode with a measured build. The graph builds are the points on the right.

Specifically, four pairs in the series isolate a structure against its own flat mode on the same framework. LightRAG’s graph against its naive mode: +2.5 points of correct answers overall, +60 on D6, −40 on D2 and D3. GraphRAG local against basic: +2.5 overall. RAGFlow’s knowledge graph compiled into the same index: +2.5 overall, every point on D4. RAGFlow’s RAPTOR tree: +10 overall, spread over D2, D3, D4 and D8. By comparison, the graph builds cost 11 and 13 hours; RAPTOR cost 3.3. The best flat retriever was built in 41 seconds and answered more questions than any graph mode by nine.

However, that is not the same as saying graphs do not work. For example, where a question needs the proxy statement joined to the annual report, D6, LightRAG’s graph answered five of five and no flat retriever passed three. Similarly, where the answer is not in the corpus, D8, the graph frameworks produced a statement of absence where the flat ones refused. In short, a graph earns its hours on the two patterns where the link between documents has to be written down in advance; on the six others it is a tax, and on the in-document patterns it is a penalty.

Which RAG framework for what

Finally, the scorecard answers “which one should I try first”. By contrast, the decision matrix answers the question a reader actually has, which is “which one for my documents”:

If your corpus looks likeStart withBecause, measured
long documents where the answer sits inside one of them (D1–D3)Haystack or R2R, small chunks, matched token budgetfive of five on D2 and D3 for both; four of five on D1 for Haystack
a stream of short event documents whose consequences appear later (D5)a dense retriever with small chunksHaystack 5/5, LlamaIndex 4/5; Haystack’s BM25 alone found one of the five D5 questions
two document families that must be joined by an entity, not a phrase (D6)LightRAG’s graph5/5 against 3/5 for the best flat retriever, at eleven hours of indexing
figures that get restated and the question names the restatement (D7)a lexical index beside the dense one, read separatelykotaemon full-text 4/5, Haystack BM25 3/5; every dense mode 0 to 2
questions that may have no answer, and a wrong one is expensive (D8)R2R at a matched budget, or any flat retriever with the refusal instructionR2R: 38 of 40 right answer-or-refuse decisions; the graphs refused less reliably on answerable questions
a product that has to be running by lunchtime, with an APIR2R22 of 40 after four configuration findings; the only framework that ships as a server
a team that will not write codekotaemon, with its hybrid mode read as full-text15 of 40 on full-text; a 10 GB image and a build that does not repeat

Three things the series measured that no single episode could

The same configuration is not the same index. For instance, RAGFlow’s RAPTOR built twice from the same settings changed the prompt in 37 of 40 questions. LlamaIndex draws node ids from uuid4, so its id-bearing digest never repeats. kotaemon counts a random file id against the chunk budget, so four builds gave four chunk counts. By contrast, Haystack and R2R reproduced both digests every time. Therefore, before comparing two runs of any framework, compare their digests; the series’ code bundle does it in one script per episode.

“Hybrid” is a word, not a mechanism. Haystack fuses two ranked lists by reciprocal rank and the fusion has a measured edge case at position six. Meanwhile, R2R fuses two lists of which the full-text one is empty, because its query ANDs every word of the question. And kotaemon concatenates the two lists and cuts from the top, so the vector list never reaches the prompt. In other words, three frameworks, three different things behind the same setting, and only one of them was a hybrid.

The judge was blind and the numbers were checked twice. Across the 28 modes and 1,120 judged answers, no measured mode contained a figure absent from its own retrieval. The check exists because the first version of the floor, in episode 2, once cited a share count that appears in no filing. Finally, every published number in every episode was regenerated from the result files by a script that refuses to publish a moving value, and the seven framework ledgers behind this article hold 610 verified claims and none pending.

Summary of the RAG framework ranking

Seven retrieval frameworks were measured on the same 33 SEC filings, the same 40 cross-document questions, the same local model and the same blind judge, one framework at a time, each mode on a freshly built stack. In the end, on the frozen scorecard Haystack’s default splitter at a matched budget scored 85.5 with 27 of 40 correct, R2R 80.1 with 22, LlamaIndex 77.7 with 19, LightRAG 74.4 with 18, GraphRAG 65.3 with 8, kotaemon 58.1 with 12 and RAGFlow 57.9 with 13. Meanwhile, the floor answered 6. Above all, the result that matters more than the order is the shape of it: the three best modes are flat retrievers that show the model more, smaller pieces for the same tokens, and the two graph frameworks earned their hours on exactly two of the eight patterns. In short, retrieval was not the hard part. Instead, getting the right passage, rather than the right document, in front of the model was.

RAG framework ranking FAQ

Which RAG framework scored best on the benchmark?

Haystack, with its default 200-word splitter and a hybrid-plus-reranker recipe at a matched token budget: 85.5 on the frozen scorecard and 27 of 40 correct answers, 100% document recall, no invented numbers. Next, R2R was second with 22 of 40 at a matched budget.

Is a knowledge graph worth building for RAG on financial filings?

Only for two of the eight dispersion patterns. LightRAG’s graph answered every governance-against-operations question and the graph frameworks handled absence better; on the six other patterns a graph was a tax of 11 to 13 hours, and the best flat retriever answered nine more questions than any graph mode.

Why does document recall not predict correct answers?

Because a framework can put the right file in the prompt without the right passage. Therefore the two measures diverge. In fact, measured across 28 modes, correct answers follow the share of gold passages in the prompt, and in three frameworks the mode with the highest document recall answered fewer questions than a mode with lower recall.

What single change improved results the most?

Above all, smaller chunks at the same token budget. LlamaIndex went from 5 to 19 correct, Haystack from 16 to 27 and R2R from 11 to 22, each on the same index and the same retriever, by changing only how many pieces reach the prompt.

Which framework handles restated figures across a stock split?

As yet, none reliably. So far, the best result on the D7 pattern is four of five, from kotaemon’s full-text index; Haystack’s BM25 managed three; every dense retriever in the series managed at most two, because the pre-split and post-split annual reports are near-identical in vocabulary.

Can the benchmark be reproduced?

Yes. Indeed, each episode ships a code bundle with the harness, the golden set, the container definitions and every raw result file, and the ebook assembles the appendix of all 40 questions with every system’s answer from those files. The ledgers hold 610 verified claims across the seven framework episodes.

Companion code and data — every episode of the series ships its own bundle with the shared harness, the frozen golden set, the container definitions and every raw result file: LightRAG, GraphRAG, RAGFlow, LlamaIndex, Haystack, R2R, kotaemon. The consolidation and the figures of this article are regenerated from those files by two scripts, and the scorecard rubric has not been edited since 22 August 2026.

Free ebook

Free AI Video, Generated Locally

Run Wan 2.1 in ComfyUI on your own GPU — the scripts I use, measured times, sample clips. No cloud, no API keys.

No spam. Unsubscribe at any time.

Did this article help?
Artur Poniedziałek
Artur Poniedziałek
IT Expert & Project Manager
🤖 AI ⚡ PM 🐍 Python 🖥️ Local AI

IT Expert & Project Manager with 15+ years of experience. Exploring practical AI applications — from local LLMs and RAG systems to workflow automation. Writing to share knowledge and inspire others to experiment with new technologies.

One response to “RAG framework ranking on SEC filings: seven frameworks, 28 modes, one frozen scorecard”

Leave a Reply

Your email address will not be published. Required fields are marked *