TL;DR
Generative Retrieval (GR) models traditionally struggle with complex queries that require multi-step reasoning, often treating retrieval as a "black box." ReasonGR addresses this by introducing structured Chain-of-Thought (CoT) prompting and parameter-efficient fine-tuning to guide GR models through explicit, step-by-step semantic and numerical reasoning before generating a document ID. Experiments on financial data show significant improvements in retrieval accuracy and consistency over standard GR baselines.
What Problem Does This Paper Address?
Generative Retrieval (GR) is an emerging paradigm where a language model memorizes an entire document corpus within its parameters. Instead of using a traditional index to look up documents, a GR model takes a query and directly generates the unique document identifier (docid).
While GR works well for straightforward question-answering, it fails on queries requiring complex inference or data aggregation—such as navigating intricate financial reports. The authors identify two main culprits:
- Black-box operations: GR models typically encode the query-to-docid mapping implicitly in a single forward pass, lacking explicit, interpretable reasoning steps.
- Surface-level training: Standard models are trained using Maximum Likelihood Estimation (MLE) on simple query-document pairs, which doesn't foster multi-step or logical reasoning capabilities.
Methods
The authors propose ReasonGR, a framework designed to inject multi-step semantic reasoning into numerical retrieval contexts.
The framework consists of three core components:
- Reasoning-Enhanced Prompting: During training, the model is fed diverse prompts combining task-specific instructions (e.g., "Retrieve a document ID that fits the query.") with Chain-of-Thought (CoT) additions (e.g., "Let's think step-by-step."). This forces the model to generate intermediate reasoning steps before outputting the final docid.
- Model Architecture & Parameter Efficiency: Built on a FLAN-T5 base, ReasonGR integrates Low-Rank Adaptation (LoRA) and QLoRA (4-bit quantization). This keeps the backbone weights frozen while efficiently training low-rank matrices dedicated purely to the reasoning task, minimizing computational overhead.
- Adaptive Penalty Scaling Loss: Instead of relying solely on standard cross-entropy loss, the authors designed a custom loss function. It scales penalties based on fine-grained evaluation signals like exact match, partial match, and structural similarity to heavily penalize incorrect or incomplete docid structures.
Additionally, to handle tabular data common in financial reports, tables are split and preprocessed so that every numerical entry is explicitly attached to its corresponding column and row headers during the corpus memorization phase.
Datasets
The framework was evaluated on the FinQA dataset, which contains 8,281 financial queries over complex documents and tabular data.
- Docid Construction: Unique docids were created by extracting keywords via KeyBERT and prepending the company name and report year (e.g.,
GRMN-2006). - Data Augmentation: To better mimic real-world user behavior, the training set was augmented with 10 pseudo-queries per document generated via
docT5query.
Key Insights and Ideas
- CoT Benefits Retrieval, Not Just QA: Chain-of-Thought prompting is widely used to help LLMs answer questions, but this paper proves it can also help a model find the right document by forcing it to parse dates, financial terms, and document structures first.
- Synergy of Prompting Strategies: The full ReasonGR model outperformed a variant that used CoT alone, demonstrating that combining few-shot examples, diverse prompt sampling, and step-by-step guidance yields the best results.
- The Exact Match Challenge: While ReasonGR significantly improved token-level and unordered component matching, generating the exact string of a docid remains a difficult bottleneck for generative retrievers compared to traditional sparse methods like BM25.
Key Results
ReasonGR was compared against BM25 (a traditional lexical retriever) and DSI (a standard generative retrieval baseline). Performance was measured using Exact Match (EM), Part Match (PM), and Set Match (SM).
- Retrieval Accuracy: On the test set, ReasonGR achieved an EM score of 0.626, outperforming both DSI (0.578) and BM25 (0.625). It showed even larger gains in token-level metrics, hitting a PM of 0.762 and an SM of 0.779 (compared to DSI's 0.654 and 0.659).
- Ablation Variants:
ReasonGR (Zero), which omitted prompt training, performed noticeably worse, validating the importance of the structured prompting framework.
- Training Efficiency: Generating long CoT reasoning paths naturally increases computational cost. As seen in Table 2, the full ReasonGR model required more training memory (~18.3 GiB) and time (~5 hours) than the zero-prompt variant, but remained highly manageable thanks to QLoRA 4-bit quantization.
Limitations and Future Work
The authors note several limitations in their current implementation:
- Input Length Constraints: The backbone model had a 512-token input limit, which is shorter than many full financial documents.
- Model Scale: FLAN-T5 base is relatively small; larger or decoder-only models might unlock even stronger CoT reasoning capabilities.
- Loss Granularity: The current sample-level loss function could be improved. Shifting to a token-level loss function could help the model focus more precisely on critical numerical tokens and reduce noise from the generated reasoning text.
Summary updated