Condition Ledgers: Letting Rule Application Steer Multi-Hop Retrieval in Specialist Domains

Retrieval-augmented generation (RAG) means fetching documents from an external store and pasting them into a language model's prompt before it answers. In specialist domains like housing law, the usual worry is that retrieval misses the right document. The file shows a second failure that is at least as large. Even when the correct statute is handed to the model, it often still answers wrong. GPT-4o-mini on Housing Statute QA rises only from 49.7% to 71.7% accuracy with gold statutory context, and gains on bar-exam questions are described as minimal (A Reasoning-Focused Legal Retrieval Benchmark). TheoremQA reports the same pattern for theorems placed in the prompt (TheoremQA). The model has the rule but cannot apply it. Applying a rule also usually requires more retrieval: a statute's conditions point to defined terms, exceptions and cross-referenced provisions, each of which has conditions of its own. Following every reference leads to combinatorial path explosion, where the number of candidate chains grows roughly as the reference degree raised to the chain length.

We propose one object that addresses both problems. A condition ledger is the explicit list of conditions a retrieved rule imposes. Each condition is marked satisfied, unsatisfied or open, and each mark cites a fact or a retrieved passage. Only open conditions trigger the next retrieval, which keeps the search goal-directed and small. The language model is asked to judge only one condition at a time against one piece of evidence. A deterministic step then combines the judgments into the final answer, for example "the rule applies if all elements hold and no exception triggers." The bet is that models fail mainly at combining many premises and choosing what to look up next, not at local judgments. The ledger takes both jobs away from the model.

Core Claim

In domain RAG, a large and measurable share of errors are "retrieved-and-incorrect": the gold passage is in context, yet the answer is wrong. This is the retrieval-time analogue of the "known & incorrect" errors that KALE measures for parametric memory.

We claim two things. First, condition-driven retrieval reaches the needed supporting provisions at a small fraction of the cost of neighbourhood expansion. Second, symbolic composition over a ledger of local judgments cuts retrieved-and-incorrect errors more than any prompting or fine-tuning change that leaves composition to the model.

The cost argument is simple. Suppose each rule contributes $c$ open conditions that the case facts cannot settle, and the chain of nested rules has depth $k$. Then the number of retrieval calls is bounded by about $c^k$, compared with $d^k$ for expanding every cross-reference, where $d$ is the reference degree. The saving is real whenever $c \ll d$, and conditions settled directly by the facts are never expanded. Whether $c$ is actually small in real statutes is an empirical question we measure first.

How This Sits Against Prior Work

Three papers motivate the problem by showing that gold context does not fix application. The legal benchmark shows the gap for statutes. TheoremQA shows it for theorems. The CORE papers (CORE, report; CORE: Concept-Oriented Reinforcement for Bridging the Definition–Application Gap in Mathematical Reasoning) show that models with definitions available still rely on surface heuristics; shuffling answer options drops Qwen-2-Math-7B from 74% to 45%. None of these papers changes how retrieval and answering interact.

Graph-based RAG supplies partial methods for taming path explosion, each with a different weak point:

  • HopRAG builds passage-to-passage edges from LLM-simulated questions and lets an LLM navigate them. The expense is paid at indexing and navigation, and the edges are fixed before any case is seen.
  • DTKG routes queries into a chained track or a parallel track. It fails when an early entity is wrong (about 15% of its failures) and cannot serve hybrid queries.
  • Path Pooling and HyperRAG rescore graph structure. HyperRAG's finding that LLM-guided beam search underperforms a trained scorer is a constraint on our design: we do not let the LLM freely choose where to go.

Our expansion differs from all four. Its next hop is determined by which conditions of the current rule remain unresolved for this specific case, not by similarity or pre-built edges. The branching is therefore bounded by rule structure rather than graph degree.

Three further papers supply the composition idea:

  • GRiD separates knowledge-recall nodes from reasoning nodes. It works only over parametric memory and cannot help when the facts are absent from the weights. The ledger is GRiD's separation applied to retrieved, citable premises.
  • DeepProofLog shows that goal-level guidance tames proof search. Our open conditions are goals in exactly this sense, but stated in natural language over text.
  • BioProAgent shows that a deterministic state machine around an LLM raises physical compliance from 21.0% (ReAct) to 95.6%. We borrow its lesson that deterministic interlocks beat free-form control, applied to composing legal and technical rules.

The closest query-side idea is the legal benchmark's Structured Legal Reasoning. It expands the query once before retrieval and improves BM25 recall by over 6 points and E5-large by nearly 9. We instead expand iteratively after reading each retrieved rule.

Research Program

Measuring the gap. The first piece is a diagnostic. On Housing Statute QA and Bar Exam QA, we split every error by whether the gold passage was retrieved. This yields retrieval-miss and retrieved-and-incorrect rates for several retrievers and generators. We also annotate a sample of statutes to measure $c$, the number of open conditions per rule, against $d$, the cross-reference degree. If $c$ is not much smaller than $d$, the cost argument fails, and we report that.

Building the ledger. For each retrieved rule, a small instruction-tuned model extracts its conditions, exceptions and defined terms. These are checked against a hand-annotated sample, since extraction quality is a known failure point.

For each condition, the generator gives a local verdict (satisfied, unsatisfied or open) and must cite a case fact or a passage. Open conditions become sub-queries for a dense retriever. A small trained reranker, following HyperRAG's evidence that trained scorers beat LLM guidance, picks at most a fixed number of passages per condition. Recursion stops at a depth cap. When the budget runs out, a condition stays open, and the final answer is marked as not fully supported rather than guessed.

A deterministic composer maps the finished ledger to the answer, using element conjunction and exception override.

Training the local judge. An optional second stage fine-tunes an open 7–8B generator on condition-level verdicts. Rule-level labels are derived from gold answers where the ledger is unambiguous. The loss adds a KALE-style divergence term: the model's verdict without the cited passage is pulled toward its verdict with it, so that applying the passage is internalized. This stage is secondary. The main claim must hold with prompting alone.

Baselines

Do-nothing reference. The generator answers closed-book, and also with top-10 BM25 and E5-large retrieval. The file gives BM25 at 5.03% Recall@10 on Bar Exam QA, so the flat-retrieval floor is low.

Gold-context oracle. The same generator receives the gold statute. This is the most informative reference point, because the ledger's purpose is to exceed it. For GPT-4o-mini on Housing Statute QA the reported gold-context accuracy is 71.7% (A Reasoning-Focused Legal Retrieval Benchmark). We count as a real win any ledger result above this number with retrieved rather than gold passages, using the same generator. Beating it with gold passages fed into the ledger isolates the gain in application.

Strongest query-side method. Structured Legal Reasoning query expansion is rerun with the same retriever and generator.

Strongest iterative graph method. HopRAG is run on the same corpora. Its multi-step navigation is the most direct competitor to condition-driven expansion. The file reports its MuSiQue exact match (EM) as 42.20 against SiReRAG's 40.50 (HopRAG). No reported result was found on Lacuna for HopRAG on the legal benchmarks.

Fairness rules. Every iterative method gets the same cap on retrieval calls and generator tokens, the same underlying generator, and the same tuning budget, with prompts tuned on a shared development split.

Ablations. Two ablations isolate the key ingredients:

  • The ledger with composition done by the LLM in free text rather than by the deterministic composer.
  • The ledger with a single static decomposition and no iterative condition-driven retrieval.

Why not just…?

Why not just hand the model the gold rule, or a long flat context? The file already shows this leaves most of the problem. GPT-4o-mini reaches only 71.7% on Housing Statute QA even with gold context, and bar-exam gains are minimal. Path Pooling found that fewer, structurally selected triples beat dumping 200 into the prompt. Our gold-context oracle row measures this alternative directly on the same generator.

Why not just prompt the model to reason element by element, IRAC-style? This is the most serious threat. Such prompting may capture most of the benefit without any symbolic machinery. The LLM-composition ablation is exactly this alternative with a retrieval pipeline matched to ours. If it matches symbolic composition, we conclude that the gains come from condition-driven retrieval alone and drop the composition claim.

Why not just use an iterative retrieval agent like HopRAG or ReAct? These agents also retrieve in several steps. But their next query comes from similarity or pre-built edges, which the file links to latency and to HyperRAG's finding that LLM guidance underperforms. We compare at matched call budgets and plot accuracy against retrieval calls. Condition-driven expansion should dominate at low budgets. If it does not, the cost argument fails.

Why not just fine-tune on gold-context chain-of-thought, or run reinforcement learning on final answers? KALE reports that standard fine-tuning left OLMoE 7B at 44.1% known-and-incorrect errors. CORE shows that answer-level rewards reinforce shortcuts. LLM-WikiRace found reinforcement learning had zero impact on its hardest long-horizon split. We still run fine-tuning on gold-context reasoning with the same data as our optional stage, so the comparison with retrieved-and-incorrect rates is direct.

Proposed Experiments and Decisive Checks

Primary benchmarks. Housing Statute QA (2 million provisions) and Bar Exam QA (900,000 case-law passages) from A Reasoning-Focused Legal Retrieval Benchmark. Metrics are answer accuracy, Recall@10 for supporting provisions, retrieved-and-incorrect rate, retrieval calls, and tokens per question.

Stress test. TheoremQA, using its 350 theorems as the corpus and theorem hypotheses as conditions. We predict smaller gains here, because much of TheoremQA is computation rather than condition checking. A large gain would suggest the mechanism is something other than what we claim. The reference points are GPT-4's reported 51% with Program-of-Thoughts and open models below 15% (TheoremQA).

Sanity check. MuSiQue, to confirm the method does not lose to HopRAG on general multi-hop questions, where rules are absent and ledgers should reduce to plain question decomposition.

Decisive checks. Three results would settle the core claims:

  • Application. With gold statutes fed into the ledger, the retrieved-and-incorrect rate must fall well below the gold-context oracle's error rate for the same generator.
  • Cost. At matched call budgets, condition-driven expansion must reach supporting provisions with higher recall than HopRAG and one-shot expansion.
  • Composition. The LLM-composition ablation must fall measurably short of symbolic composition. Otherwise that half of the claim is dropped.

Honest scope. Bar-exam questions that turn on case holdings may not decompose cleanly into conditions. We therefore report results separately for questions whose gold rule yields a well-formed ledger and for those where it does not.