Retrieval-augmented generation (RAG) gives a language model a handful of retrieved documents to read before it answers. Small models specialized this way are attractive for medicine and other high-stakes domains, but they have a quiet weakness: their answers change when the same documents are shown in a different order. This proposal argues that the weakness is mostly learned, not mostly architectural. Retrievers usually put the useful document first, so fine-tuning on retriever-ordered examples teaches the model the rule "trust whatever is near the top." That rule is the same kind of surface shortcut that fine-tuned models pick up in other reasoning tasks. It fails as soon as a convincing but wrong document, a "hard distractor," lands in the favored slot.
We propose to measure this learned position shortcut directly. We then remove it with a reinforcement learning (RL) scheme in which each training question is answered under several orderings of the same documents, and those answers are scored against one another. The resulting gradient rewards behavior that stays correct however the evidence is arranged. The model is also rewarded for quoting the passage it actually used, so that agreement across orderings comes from the evidence and not from a fixed guess. The test is whether this beats the obvious cheaper fix, ordinary fine-tuning on shuffled documents. The setting where it should matter most is the one where the shortcut does the most damage: hard distractors and held-out domains.
Core Claim
Two findings in the literature look unrelated but describe the same failure. Do RAG Systems Suffer From Positional Bias? studies open-domain question answering with dense and sparse retrievers and shows that reordering retrieved passages does not help. Placing relevant passages at the high-attention edges pushes hard distractors to the opposite edge, a "cancellation effect," so relevance-first ordering is statistically no better than a random shuffle. The authors conclude that models must become intrinsically robust. Separately, Disentangling Reasoning Tokens and Boilerplate Tokens For Language Model Fine-tuning shows that uniform supervised fine-tuning (SFT) overfits to predictable, sample-independent structure and neglects the sample-specific reasoning. Our claim connects the two. In retrieval-augmented fine-tuning data, the position of the useful passage is exactly such predictable structure, because retrievers rank it highly. SFT therefore turns position into a cheap proxy for relevance. That proxy is what lets hard distractors win.
If the claim is right, two consequences follow, and both are testable. First, a retrieval-augmented fine-tuned model should rely on position more than its base model does. Second, a training signal that compares outcomes across orderings of the same evidence should remove that reliance. It should do so better than simply randomizing order during SFT, because SFT on shuffled data still rewards imitating the demonstration's surface form and never rewards being right in the specific orderings where the model currently fails.
Prior work motivates this claim without testing it. EC-RAFT specializes Llama-3.1-8B for clinical-trial design by SFT on retrieved trials plus reasoning traces, and never evaluates order sensitivity. RbFT trains 3B models to classify passages as helpful, irrelevant, or counterfactual, but does not ask whether that classifier is itself position-biased. UR2 trains retrieval-and-reasoning policies with RL across math and medicine, but over a pre-summarized, cleaned corpus that hides the distractor problem and never examines document order. Gold Panning exploits positional bias at inference with Bayesian active search over repeated black-box queries. It changes no weights and was tested on synthetic long-context tasks. None of these trains the order dependence out of a small specialized model, and none measures whether specialization caused it.
Research Program
The program has three parts: a diagnostic, a training method, and a generalization study.
The diagnostic builds controlled contexts from a retrieved set. Each context holds one supporting passage, one hard distractor, and several ordinary passages. Hard distractors are passages with a high distracting effect, following the definition in Do RAG Systems Suffer From Positional Bias?. We place the support at position $i$ and the distractor at position $j$ across a grid of placements and record accuracy for each cell. We summarize order dependence with a flip rate. For each question $q$ we sample $K$ orderings $\pi_1,\dots,\pi_K$ of its retrieved set and compute
$$ \mathrm{Flip}(q)=1-\max_{a}\frac{1}{K}\sum_{k=1}^{K}\mathbb{1}[\hat a(q,\pi_k)=a], $$
where $\hat a(q,\pi_k)$ is the model's answer under ordering $\pi_k$. A model that never changes its answer has a flip rate of zero. We run the diagnostic on a base instruct model, on the same model after retriever-ordered SFT, and after shuffled SFT. This directly tests whether specialization creates the shortcut.
The training method is a variant of group-relative policy optimization (GRPO). GRPO is the RL method used in ToolRL and AutoTriton: it samples several answers to one prompt and pushes up those that score above the group average. We change what a group is. For each question we draw $M$ orderings of the same retrieved documents and sample $n$ rollouts under each. All $Mn$ rewards are normalized together. A rollout earns positive advantage only when it beats the model's average over all orderings. As a result, the largest gradients go to orderings where the model usually fails, such as a distractor in slot one. In ordinary GRPO with one random ordering per question, by contrast, a question answered wrongly in every rollout carries no signal about order at all.
The reward has two parts. One is answer correctness. The other is a grounding term borrowed from RLSeek, which forces quotation before judgment and penalizes low lexical overlap between quotes and the source. Here the model must quote the span it relied on. Where gold support annotations exist, as in HotpotQA supporting facts and the answer-bearing passage in NQ, the quote is checked against that passage by content, never by index, so the position number carries no reward. Following ToolRL's finding that a cold-start RL run on an instruct backbone generalizes better than RL after heavy SFT, and its observation that forced long reasoning causes overthinking in retrieval-style tasks, we start RL from the instruct model and add a mild length cap.
The generalization study takes the domain direction as the application regime. We train on NQ plus medical exam questions (MedQA) with raw rather than summarized retrieval. We then test on held-out multi-hop sets (HotpotQA, 2WikiMultiHopQA, MusiQue), on the MMLU-Pro medical subset, and on MedMCQA. Distractor difficulty is shifted upward at test time: training uses moderate-difficulty distractors, and testing uses distractors with a distracting effect above 0.8. Medical multiple choice adds a second order axis, answer options. We permute options as well as documents, and also score under the MCQA+ protocol of LLMs May Perform MCQA by Selecting the Least Incorrect Option, which replaces the correct option with "none of the above" and converts items to true/false. This checks that order invariance reflects absolute verification and not relative guessing. Backbones are Qwen2.5-3B and 7B instruct models, matching the scales used in UR2 and RbFT.
Baselines
The do-nothing reference is the base instruct model with retriever-ordered context, together with the relevance-first ordering heuristic. On this point the file gives a firm number. Do RAG Systems Suffer From Positional Bias? reports Qwen 2.5 7B with BGE retrieval plus reranking at 71.73% accuracy under relevance-first ordering against 71.00% under random shuffle, which the authors judge statistically indistinguishable. We reproduce this exact configuration on PopQA, where the file places that comparison. Reproducing it first confirms our pipeline before any training. Any trained method must clearly exceed both numbers on the hard-distractor split.
The key competitor is permutation-augmented SFT, meaning retrieval-augmented fine-tuning as in EC-RAFT with document order randomized in every training example. Two variants are run: plain cross-entropy, and the token-reweighting objective from Disentangling Reasoning Tokens and Boilerplate Tokens. That paper reports average scores rising from 52.5% to 59.3% and the held-out Nexus benchmark rising from 14.0% to 27.8% on LLaMA3-8B, though in tool use rather than RAG. This is the strongest cheap alternative because it removes position as a training-time correlate without any RL. We give it the same questions, the same retrieved sets, the same total number of document orderings seen per question, and a matched hyperparameter search.
The strongest existing robustness method is RbFT, which trains compact LoRA models on defect detection and utility extraction. The file reports that it beats competing methods by over 70% in hard counterfactual settings and runs about 17x faster than AstuteRAG and 6x faster than RobustRAG. No absolute accuracy is reported on Lacuna for RbFT on NQ or HotpotQA. We therefore retrain it ourselves on our data at the same backbone size and LoRA rank. We also include UR2-style outcome RL on a single random ordering per question; the file reports only a 5.8% average gain for UR2-7B over prior RAG-RL methods, with no per-benchmark numbers.
The inference-time competitors are Permutation Self-Consistency with $K=8$ orderings and majority vote, and Set-Based Prompting from Order-Independence Without Fine Tuning. Set-Based Prompting reduces permutation variance to exactly zero, but for accuracy the file states only that it stays between the best and worst orderings, with no reported number.
The ablation that isolates our key ingredient compares GRPO with permutation-grouped advantages against GRPO with the same total rollouts drawn from independent random orderings. A second ablation removes the quotation reward.
Beating the competitors means four things on the hard-distractor and held-out splits. Our method should show higher accuracy than shuffled SFT and single-ordering GRPO, with confidence intervals that do not overlap, using three seeds. It should show a lower flip rate than every trained baseline. It should match or exceed eight-pass Permutation Self-Consistency while using a single forward pass. And it should lose no more than shuffled SFT on BigBench Hard, which measures the general-ability loss from specialization documented in Specializing Smaller Language Models towards Multi-Step Reasoning.
Why not just…?
Why not just shuffle documents during fine-tuning? This is the real threat, and the proposal is built around settling it. Shuffling removes the correlation between position and relevance, and it may remove most of the order dependence on in-distribution data. Our hypothesis is narrower. Shuffled SFT still rewards copying demonstrations, and the boilerplate-overfitting evidence suggests that copying does not transfer to new distractor regimes. It also never concentrates learning on the orderings the model currently gets wrong. If shuffled SFT matches permutation-grouped GRPO on the hard-distractor and held-out-domain splits, we will report that the shortcut is a data-distribution artifact fixable by augmentation. The RL contribution would then reduce to the grounding reward, which we test separately.
Why not just ensemble over orderings at inference? Permutation Self-Consistency does reduce variance, but it multiplies cost by the number of orderings. Gold Panning reports that even its smarter active search only cuts queries by 30–65% relative to it. Voting also cannot fix a model that prefers the distractor in most orderings; it just averages the preference. We include eight-pass voting as a ceiling. A single-pass model that reaches it would make the ensemble unnecessary in deployment.
Why not just use order-invariant attention masks? Set-Based Prompting guarantees invariance at no training cost. However, its authors note that documents encoded in parallel cannot see one another, and that instruction-tuned models degrade under the reset position numbers. Multi-hop and medical questions require combining or contrasting passages, so we expect it to fall behind on HotpotQA and MusiQue. Our grid of support and distractor placements will show whether it does.
Why not just train a passage-defect classifier as RbFT does? RbFT is a strong robustness baseline. Its classifier, however, reads passages in order and was never tested under permutation. We run our diagnostic on RbFT itself. If its defect labels flip with order, that supports the claim that robustness training without an order-aware signal inherits the shortcut.
Decisive Checks
The first check is the diagnostic prediction. Retriever-ordered SFT should raise accuracy when the support passage is in slot one and lower it when a hard distractor is there, relative to the base model. If specialization does not increase position reliance, the motivating story is wrong, and the project becomes a pure robustness comparison.
The second check is the grouping ablation on held-out hard-distractor sets, which separates "RL helps" from "comparing outcomes across orderings helps."
The third check is MCQA+ on MedMCQA. The file reports LLaMA 2 13B falling from 43.2% to 16.5% under that protocol. An order-invariant model that still collapses there has learned consistent guessing, not verification, and that result would count against the method even if its flip rate is low.
References
- Do RAG Systems Really Suffer From Positional Bias?
- Disentangling Reasoning Tokens and Boilerplate Tokens For Language Model Fine-tuning
- EC-RAFT: Automated Generation of Clinical Trial Eligibility Criteria through Retrieval-Augmented Fine-Tuning
- RbFT: Robust Fine-tuning for Retrieval-Augmented Generation against Retrieval Defects
- UR2: Unify RAG and Reasoning through Reinforcement Learning
- Gold Panning: Turning Positional Bias into Signal for Multi-Document LLM Reasoning
- ToolRL: Reward is All Tool Learning Needs
- AUTOTRITON: Automatic Triton Programming with Reinforcement Learning in LLMs
- RLSeek: Evidence-Grounded Reasoning for RAG Hallucination Detection
- LLMs May Perform MCQA by Selecting the Least Incorrect Option
- Order-Independence Without Fine Tuning
- Specializing Smaller Language Models towards Multi-Step Reasoning