Which Side Failed? Learning Selective RAG from One-Bit Feedback

A deployed question-answering system that retrieves documents before answering, known as retrieval-augmented generation (RAG), usually learns from very little after launch. A user accepts or rejects an answer, and when the system declines to answer, it learns nothing at all. A rejected answer is also ambiguous. It may have failed because the retrieved passages never contained the fact. It may instead have failed because the passages contained it and the language model misused it. This note argues that the problem has a precise counterpart in economics, and that the economics literature has already worked out the design lesson. In repeated bilateral trade, a platform posts a price to a buyer and a seller. It sees only whether the trade happened. When it posts a single shared price, a failed trade does not reveal which side refused, and learning provably breaks down. Posting two separate prices fixes this, and a budget that only needs to balance over the whole run, rather than on every trade, recovers the best rates.

The proposal transfers that lesson to selective RAG. The system keeps two separately learned acceptance thresholds instead of one combined confidence cutoff. The first threshold applies to a retrieval-side score: is the evidence sufficient? The second applies to a generator-side score: will the model use the evidence correctly? The system is held to a global error budget rather than a per-query one. That lets it deliberately answer some uncertain queries to find out which side is failing. For the generator-side score, we read the model's internal summary of the task at an intermediate layer, the "task vector" that in-context learning has been shown to create. The claim is falsifiable. Under shifting query streams, two decoupled thresholds with a global error budget should answer measurably more queries correctly, at the same cumulative error rate, than any learner that tunes a single combined threshold from the same one-bit feedback.

Core Claim

Bilateral trade is the cleanest case of a mechanism that "fails silently." A trade happens only if the seller's private value is at most the price and the buyer's private value is at least it. The platform observes a single accept/reject bit, which is the AND of two hidden conditions. Bilateral Trade: A Regret Minimization Perspective shows that against an adversarial sequence of values, even full feedback gives linear regret. Regret here means the gap to the best fixed price in hindsight, and linear regret means the learner never catches up. Regret Analysis of Bilateral Trade with a Smoothed Adversary and An α-regret analysis of adversarial bilateral trade show that under accept/reject feedback, a single price stays stuck at linear regret even when the adversary's values are slightly randomized. Separate buyer and seller prices reach roughly $T^{3/4}$ regret over $T$ rounds. No-Regret Learning in Bilateral Trade via Global Budget Balance goes further by requiring the platform's budget to balance only in total. Its algorithm first accumulates a surplus, then spends it on deliberately loss-making trades that are informative.

A selective RAG system has the same logical shape. An answer is correct, roughly, only when the evidence-sufficiency variable $e$ clears a bar and the generator-reliability variable $g$ clears a bar. Feedback is one bit, and only when the system answers. Today's systems effectively post one price. They threshold one combined score, for example answer log-probability or a learned discard decision. The structural claim is that this conflation, together with censoring on abstentions, is what stops online adaptation under drift. The remedy follows the economics: decouple the thresholds and fund information-gathering answers from a global error budget.

Concretely, the system answers query $t$ when $\hat e_t \ge \tau^{e}_t$ and $\hat g_t \ge \tau^{g}_t$. Here $\hat e_t$ and $\hat g_t$ are the two estimated scores, and $\tau^{e}_t$ and $\tau^{g}_t$ are thresholds learned online. On a learned fraction of queries in the "spread" region, where exactly one score clears its threshold, the system also answers in order to probe. The only constraint is cumulative:

$$\sum_{t=1}^{T} \mathbb{I}\{\text{answered}_t \wedge \text{rejected}_t\} \;\le\; \epsilon \sum_{t=1}^{T} \mathbb{I}\{\text{answered}_t\},$$

where $\epsilon$ is the target error rate. Spread probes that land in the "one side passes" region reveal which side was failing. Probes are paid for by the margin earned on confidently correct answers, playing the role of the budget surplus in the global-budget-balance algorithm.

Research Program

The work has three parts.

Formalization. The first part formalizes "selective RAG with censored one-bit feedback" as a two-sided posted-threshold problem. The theoretical targets are stated as targets, not results. The first target is a lower bound: an adaptive query stream can force linear regret on any learner that thresholds a single combined score. This would adapt the needle-in-a-haystack constructions from the bilateral trade papers. The second target is an upper bound for decoupled thresholds under a smoothness assumption on how scores are distributed. That assumption mirrors the σ-smoothed adversary of Repeated Bilateral Trade Against a Smoothed Adversary.

The analogy is imperfect, and the formalization must say where. In bilateral trade, the platform's reward (gain from trade) is never observed. In RAG, correctness is observed whenever the system answers. Hardness therefore comes from censoring and conflation, not from an unseen reward. The single-price impossibility may weaken accordingly, which is exactly why the empirical diagnostic below comes first.

Generator-side score. The second part builds the score $\hat g$. In-Context Learning Creates Task Vectors shows that a transformer compresses its in-context demonstrations into one vector at the final token of an intermediate layer, around layer 15 in LLaMA-7B. Patching that vector into a demonstration-free pass recovers 80–90% of few-shot accuracy, against 10–20% zero-shot. We use that paper as the method source. We read the hidden state at the sweet-spot layer for the query's final token, with the retrieved passages and a fixed demonstration block present, and train a small probe to predict whether the generator will answer correctly given that the gold evidence is present.

That paper also constrains the design. Its evidence covers only single-token outputs. We therefore restrict ourselves to short-answer QA, where answers are a few tokens, and we treat any failure of the probe on multi-hop chains as a finding rather than a surprise.

Retrieval-side score. The score $\hat e$ comes from a lightweight passage-sufficiency model. It is trained on HotpotQA supporting-fact labels, which say whether the needed paragraphs were retrieved. This keeps the two scores tied to separate causes by construction.

Online learner. The third part is the learner itself. It adapts the two-phase structure of the global-budget-balance algorithm, which first builds an error surplus and then spends it on spread probes. It runs over a grid of threshold pairs, with an exponential-weights update on censored feedback in the style of the Blind-Exp3 learner from the smoothed-adversary paper. Like that learner, ours needs a discretization width. Because the smoothed-adversary algorithm requires knowing σ, we tune the grid width on a held-out stream and report sensitivity to it.

The closest RAG work is An Information Bottleneck Perspective for Effective Noise Filtering on Retrieval-Augmented Generation. It trains a filter that compresses retrieved passages under a mutual-information objective and emits a discard flag when no passage helps. It motivates this proposal: unfiltered top-5 retrieval drops Natural Questions exact match to 14.7, below the 16.2 achieved with no retrieval. Its filter's single discard decision is the one-price mechanism we argue against. That work is offline, supervised, and white-box. Ours is online, learns from one-bit feedback, and splits the accept decision in two. The shared phrase "information bottleneck" is a coincidence of names. That paper's version is about compression; ours is about what a failure signal fails to reveal.

Two agentic RAG papers supply evidence that failure attribution matters across hops. Test-Time Strategies for More Efficient and Accurate Agentic RAG finds that de-duplicating documents alone lengthens search loops. It also finds that distilling evidence with an external model helps. Dr3 attributes 62% of off-topic multi-hop errors to sub-question solving, mainly retrieval failure, and 31% to decomposition. Both diagnose with heuristics or offline labels. Neither learns the attribution online from user feedback.

Three papers on bilateral trade with observable features study pricing conditioned on low-dimensional context vectors: Contextual Online Bilateral Trade, Nonparametric Contextual Online Bilateral Trade, and Feature-Based Online Bilateral Trade. They suggest how $\hat e$ and $\hat g$ can serve as features, but they never touch language models. Ad Auctions for LLMs via Retrieval Augmented Generation puts an auction inside RAG, but over advertisers' bids, not over the system's own accept decisions.

Baselines

The naive reference points come from the cited paper's settings. The first is always answering with no retrieval. The second is always answering with unfiltered top-5 context. The IB paper reports 16.2 and 14.7 exact match on Natural Questions for these two settings. Both run on the same generator and query streams and set the floor for coverage and error.

The single-threshold learned filter is the closest existing method. It is the IB-tuned filter of An Information Bottleneck Perspective for Effective Noise Filtering on Retrieval-Augmented Generation, with its discard flag acting as the abstention decision. That paper reports 21.5 exact match on Natural Questions at a 2.5% compression rate. It also reports a true-flip-rate, the share of answers flipped from right to wrong by noisy context, of 17.6% versus 51.0% for standard filtering. It is the strongest competitor because it already learns a principled accept/discard rule. We use its LLaMA-2-7B filter recipe on our generator and allow it to be re-tuned on the stream's labeled warm-up prefix. It gets the same warm-up labels and the same tuning budget, measured in grid points and seeds, as our method.

The single-threshold online bandit is the closest competitor that adapts online. It runs the same censored exponential-weights learner, on the same budget, over a one-dimensional grid of thresholds on the generator's answer log-probability. It is the direct analog of a single posted price.

The two-threshold bandit with a per-query error constraint is the key ablation. It has the same two scores but no global budget, so it cannot pay for spread probes. It isolates whether the global-budget ingredient matters, as distinct from the second score. A fourth arm swaps the task-vector probe $\hat g$ for model self-assessment by prompting ("is this evidence sufficient and are you confident?"). It isolates whether the internal readout matters.

For the agentic setting, the contextualized Search-R1 configuration of Test-Time Strategies for More Efficient and Accurate Agentic RAG reports a 5.6% exact-match gain over Search-R1. We use it only as the base system on HotpotQA, on top of which acceptance thresholds are learned. No reported result was found on Lacuna for any method that learns RAG acceptance online from one-bit feedback.

"Beating" a baseline has a single definition. At matched cumulative error rate $\epsilon \in \{5\%, 10\%\}$, the method must deliver more accepted correct answers over the stream, with non-overlapping 95% confidence intervals across five stream orderings. It must also show lower regret against the best fixed threshold pair in hindsight, which can be computed exactly because every configuration can be scored offline on every logged query.

Why not just…?

Why not just calibrate one threshold offline on a labeled dev set? If queries are stationary, this probably works as well as anything online, and the proposal does not dispute that. The claim is limited to drift. The experiments include a stationary stream, where we expect, and will report, parity with offline calibration. They also include block-drifting streams, where a fixed calibration should fall away from the best threshold in hindsight. If offline calibration matches us under drift too, the online part of the proposal fails.

Why not just run a standard bandit over a grid of threshold pairs with a per-query error cap? This is the real threat. Because correctness is observed whenever the system answers, a plain bandit may handle much of the problem. The ablation separates two ingredients: the second score, and the global budget that funds probes. If the per-query-capped two-threshold bandit matches the full method, the honest conclusion is that decoupling matters and the global-budget idea from bilateral trade does not transfer. We would report that result as it is.

Why not just ask the model whether the evidence suffices, instead of probing its internals? Self-assessment works on black-box APIs, which matters in practice. However, the Dr3 finding that most errors come from retrieval while the model drifts off-topic suggests that the model's verbal judgment does not reliably track the cause of failure. The attribution test below compares self-assessment and the task-vector probe directly. If self-assessment attributes failures as well, we recommend it and drop the white-box requirement.

Why not just stuff all retrieved context into a long prompt? Unfiltered top-5 context is already worse than no retrieval on Natural Questions (14.7 vs 16.2 in the IB paper). Dr3 reports off-topic rates of 44.44% for chains longer than two hops. Both results argue against simply adding more context. We keep the always-answer top-5 arm so this is checked on our generator too.

Proposed Experiments

The data are Natural Questions, TriviaQA, HotpotQA, and 2WikiMultiHopQA, all used in the cited RAG papers. User feedback is simulated as one bit: whether the answer exact-matches gold, given only when the system answers. Streams come in three regimes. The first is stationary, a shuffled single dataset. The second is block drift, alternating thousand-query blocks of Natural Questions and HotpotQA, with periods where retrieval quality is artificially degraded by injecting distractor passages. The third is adaptive, where a stream-builder reorders queries to push the learner's current thresholds toward the wrong side, mirroring the adversarial constructions. The generator is a 7B open-weight model, so hidden states are accessible. Every configuration is precomputed on every query, which makes hindsight regret exact.

The first and decisive check runs before any online learning, entirely on logged data. It asks whether two decoupled thresholds actually define a better acceptance region than any single combined threshold. We compute the best coverage achievable at fixed error under each rule. If the best two-threshold region beats the best single threshold by less than one point of coverage at $\epsilon = 10\%$, the conflation story is wrong for RAG, and the project stops or pivots.

The second check tests attribution on HotpotQA. There, supporting-fact labels tell us whether the gold paragraphs were in context. We measure how well $\hat e$ and the task-vector-based $\hat g$ each separate retrieval failures from generator failures, against log-probability and self-assessment. We also sweep the readout layer to see whether the task-vector sweet spot appears for retrieval-conditioned QA as it did for single-token tasks.

The third check runs the online comparison against the baselines above across the three stream regimes, and plots regret against $T$ on log-log axes. The question is whether the single-threshold learner's regret grows near-linearly under adaptive drift, as the bilateral-trade lower bounds predict for one price, while the decoupled learner's regret bends toward the $T^{3/4}$ slope those papers prove for two prices.

The fourth check is the global-versus-per-query budget ablation. It reports what fraction of spread probes produced informative feedback and how much error budget they consumed.