Amsterdam's ReasonGR Beats BM25 at Reasoning Over Financial Documents
A new framework combines chain-of-thought prompting with LoRA adapters to help generative retrieval models handle financial queries that require numerical reasoning.
ProTakeaways
- ReasonGR adds chain-of-thought prompting and LoRA adapters to generative retrieval for reasoning-heavy queries.
- Tested on FinQA, a financial dataset requiring multi-step numerical reasoning over reports and tables.
- Full model hits 0.626 EM on test, edging out BM25 (0.625) and DSI (0.578).
- Bigger gains on partial and set match, roughly 10 points above DSI baseline.
- Uses FLAN-T5 base with QLoRA 4-bit quantization, KeyBERT docids, docT5query pseudo-queries.
- Trained in about 5 hours on a single H100; no code release announced.
Generative retrieval has been pitched as the clean replacement for the classic index-retrieve stack: instead of maintaining a vector index, you train a single model to spit out the document ID for a given query. It works well for open-domain question answering, but it falls apart the moment queries need actual reasoning, like pulling the right annual report to answer a question about operating margins. A team from the University of Amsterdam has published ReasonGR, a framework that tries to close that gap by wiring chain-of-thought prompting and LoRA adapters directly into the retrieval model.
The paper targets a very specific weakness. Standard generative retrievers like DSI treat the query-to-docid mapping as a black box learned in one forward pass, and they are trained with maximum likelihood on surface-level query-document pairs. That works when lexical or semantic similarity is enough, but it does not teach the model to chain together numerical facts scattered across tables and prose.
Why generative retrieval keeps stumbling on finance
Generative retrieval (GR) encodes the whole corpus into the model's weights and generates document identifiers autoregressively for each query. The appeal is that you drop the external index entirely. The problem, as the authors frame it, is that GR models trained with maximum likelihood on query-document pairs never learn explicit multi-step reasoning, so they choke on tasks like FinQA, where answering a query means aggregating dispersed numerical evidence from complex financial reports.
ReasonGR attacks this on three fronts: better prompts, cheaper fine-tuning, and a loss function that grades partial correctness rather than treating every wrong token equally.
How the framework is put together

The backbone is FLAN-T5 base, a modest encoder-decoder. On top of it, the authors bolt on LoRA adapters plus 4-bit QLoRA quantization of the frozen weights, so only a small set of low-rank matrices is actually trained. Document IDs are constructed by concatenating KeyBERT-extracted keywords with the company name and report year, joined by hyphens, which gives the decoder a semantically meaningful target instead of an opaque numeric ID.
The prompt construction is the more interesting piece. During training, the model randomly draws one of five task templates (variations on "generate the document ID that answers the question") and pairs it with one of five chain-of-thought instructions like "Let's think step-by-step." For CoT variants, the target output includes intermediate reasoning steps before the final docid. Training also incorporates the tables inside documents by splitting each cell and attaching its row and column headers, and it augments the query distribution with ten pseudo-queries per document generated by docT5query.
The final ingredient is an adaptive penalty scaling loss. Rather than a plain cross-entropy, the loss is multiplied by a penalty factor built from four signals: exact match, partial match, set match, and a structure score based on length. Predictions that are close but not exact get a softer gradient than complete misses.
What the numbers actually show
Evaluated on FinQA (8,281 samples, 75/10/15 split), ReasonGR beats the vanilla DSI generative retriever across the board and nudges past BM25 on exact match:
| Model | Test EM | Test PM | Test SM |
|---|---|---|---|
| BM25 | 0.625 | - | - |
| DSI | 0.578 | 0.654 | 0.659 |
| ReasonGR (Zero, no prompt training) | 0.601 | 0.750 | 0.767 |
| ReasonGR (CoT only) | 0.612 | 0.755 | 0.774 |
| ReasonGR (full) | 0.626 | 0.762 | 0.779 |
The gains over DSI on partial and set match, roughly ten points, are more dramatic than the exact-match delta. That is the honest read: the model is much better at getting most of the docid tokens right, but landing the exact string is still hard.
Training cost is not trivial either. The zero-prompt variant finishes in about 3.5 hours on a single H100, but the full CoT-augmented ReasonGR takes over 5 hours across 55 epochs, and the CoT-only variant balloons to nearly 7 hours because reasoning traces make sequences longer.
Where this is useful, and where it is not
The practical target is narrow but real: retrieval over corpora where the query requires reasoning over numerical or tabular content, financial filings being the obvious case, but the same shape applies to scientific tables, medical records, or engineering specs. If you are building a system that has to pull the right 10-K given a question about a specific line item, this recipe is worth studying.
- Good for: reasoning-heavy retrieval over structured documents, especially where docids can be made semantically meaningful.
- Not good for: large corpora where memorizing everything in model weights becomes impractical, or generic web-scale search where BM25 and dense retrieval already dominate.
- Open caveats: the 512-token input limit is shorter than the average FinQA document, and the authors themselves flag that FLAN-T5 base may simply be too small for effective chain-of-thought behavior.
The paper does not release code, which limits how quickly others can reproduce it. But the recipe is straightforward to reconstruct from the description: FLAN-T5 base, LoRA plus QLoRA on frozen weights, KeyBERT-generated docids, docT5query for pseudo-query augmentation, and a penalty-weighted cross-entropy. The real contribution is less a new architecture than a demonstration that generative retrieval starts behaving reasonably on numerical tasks once you stop treating it as pure memorization and give it explicit reasoning scaffolding.