Retrieval-augmented generation (RAG) is the practice of letting a language model look up documents before answering. It is now routinely checked by another language model acting as a grader, a setup called "LLM-as-a-judge." Such a grader has to do two different jobs. The first is to read text: does this passage say that the film was released in 2019? The second is to combine many of those local readings into a verdict: is the answer supported, contradicted by the evidence, or should the system have refused because the evidence is not there? We propose to keep the language model for the first job and to learn the second job as a short, executable logic program. The program is induced from a few hundred human-labeled judgments using meta-interpretive learning, a program-synthesis method that searches for rules fitting a handful of fixed rule shapes.
The motivation is that the failures reported for RAG pipelines and their judges sit mostly in the combining step, not the reading step. Generators hallucinate instead of refusing when the context lacks an answer. They trust corrupted passages over what they already know. They fall apart when an answer must be assembled from several documents (Benchmarking Large Language Models in Retrieval-Augmented Generation). LLM judges, for their part, swing with prompt wording (Judge as A Judge), rely on unacknowledged shortcuts (The Silent Judge), and produce preference cycles (Investigating Non-Transitivity in LLM-as-a-Judge). A verdict computed by a logic program over extracted facts cannot, by construction, be swayed by answer length, candidate order, or rubric phrasing. If that program is relational and recursive, it should also extend to evidence chains longer than any it was trained on. A flat classifier over the same facts cannot do that.
Core Claim
A RAG judge whose verdict layer is a recursive logic program, induced by meta-interpretive learning from roughly 50 to 200 labeled judgments over LLM-extracted relational facts, will do three things. It will match prompted LLM judges on simple single-passage faithfulness. It will beat them on refusal, counterfactual, and multi-document cases. And it will keep its accuracy when tested on evidence chains with more documents than seen in training, which is where a propositional learner given identical facts should break.
The third point is the part that is new. It is also the part that separates this proposal from "extract features with an LLM, then train any classifier."
Background and Positioning
Meta-interpretive learning (MIL) learns Prolog programs by proof search inside an interpreter, guided by metarules. A metarule is a rule template with placeholder predicates, such as the chain shape $P(X,Y) \leftarrow Q(X,Z), R(Z,Y)$. The search fills the placeholders with known or newly invented predicates, which lets it learn recursive definitions from few examples (Turning 30: New Ideas in Inductive Logic Programming; Inductive Logic Programming: Challenges). Its known weaknesses define our constraints. It needs hand-designed vocabulary, it cannot read raw text, and classical meta-interpreters demand zero training errors.
Two recent systems supply our method, and both stop short of text evidence.
Robust Hypothesis Generation has LLM agents propose predicates, a critic LLM vet them, and a translator emit Prolog facts. The facts go to MAXSYNTH, a learner that picks the rule set with the shortest description and thereby tolerates noise. The system reaches 85% on ZENDO against 60% for iterative LLM refinement. It works only on synthetic microworlds and never judges generated text.
ILP-CoT has a multimodal model propose rule structures that become metarules for Metagol. When the search fails, the model reflects and retries. It reaches 81.85% on CLEVR-Hans against 51.6% for direct prediction, but only on visual and grid tasks.
We take the LLM-to-facts interface and the description-length noise tolerance from the first system, and the metarule-guided search from the second. We then apply them to a problem neither addresses: learning how evidence should be weighed in judging retrieved-text answers.
Three lines of work motivate the gap from the evaluation side.
RAGAs splits an answer into atomic statements and asks an LLM whether each is entailed. It agrees with humans at 0.95 on WikiEval faithfulness but only 0.70 on context relevance. Its aggregation is a fixed ratio, not a learned or inspectable decision.
ConsJudge (Judge as A Judge) trains a judge to agree with itself across prompt variants, raising consistency to over 0.90 on HotpotQA and TriviaQA. Agreement with oneself, however, is not correctness: a judge that is consistently wrong is rewarded.
HVR shows how much a symbolic checker can help. It lifts plan correctness from 17.72% to 94.19%, but its rules are hand-written PDDL (a formal language for planning actions and their preconditions), and its authors name rule induction as future work.
Glass-Box Arbitrators makes a similar case for separating codified legal rules from language processing, again with manually written rules.
Our proposal takes the separation of knowledge from inference argued for by rule-based systems and learns the rules instead of writing them.
Research Program
Fact extraction. An extraction layer turns each judging instance, a query plus retrieved passages plus a candidate answer, into ground facts over a fixed evaluation vocabulary. The facts record that the answer asserts a relation between entities, and that a passage states a relation. They also record two local judgments made by the LLM on pairs of short spans: that two mentions co-refer, and that two stated facts conflict. They record the publication order of passages when it is available. Finally, they record the model's own closed-book belief about a fact, obtained by querying it without retrieval.
The vocabulary starts hand-seeded. It is then expanded with the actor–critic loop of Robust Hypothesis Generation, so that the language-bias bottleneck is attacked rather than assumed away. Every LLM call is a narrow judgment about one or two spans. These are the judgments on which LLMs are least exposed to length and order effects, because the answer as a whole is never shown to them.
Rule induction. MIL-style search then learns definitions of target predicates for supported, contradicted, and unanswerable, from a small labeled set. The metarules are chain, tail-recursive chain, identity, and inverse. Recursion is what allows a rule like "a claim is supported if it is linked to a stated fact through a chain of co-referring, stated relations" to cover any number of hops. The closed-book belief predicate gives the learner a way to express when to trust context over memory, which is exactly the arbitration that RGB found missing. Because extraction is noisy, we replace hard consistency with a description-length score over metarule-constrained hypotheses, following MAXSYNTH. We also report the hard-consistency Metagol variant to measure how much that choice matters.
Where the search fails to cover labeled examples, a reflection step in the style of ILP-CoT asks the LLM to propose new predicates or metarules. We log every accepted addition so the language bias remains auditable. The final verdict is taken from the learned predicates in a fixed order: contradicted, then supported, then unanswerable as the default. We ablate this ordering.
Deployment. The output is a judge that returns a verdict together with a proof tree. The same program also serves as a gate on a RAG generator: when the gate derives "unanswerable" or "contradicted," the system refuses or flags the answer. We also study what the learned rules say. Readable programs (Ultra-Strong Machine Learning) let us ask whether induced rules rediscover known failure structure, such as conflicts between a newer and an older source, and whether a domain expert can repair a wrong rule faster than they could relabel data.
Baselines
The naive reference points come first. One is the RAG generator with no judge or gate. On RGB, ChatGPT refuses in only about 45% of insufficient-context cases and corrects only 57.14% of counterfactual errors, and multi-document accuracy peaks at 60–67% before dropping to 34% under noise (Benchmarking Large Language Models in Retrieval-Augmented Generation). The other is a majority-verdict judge. These RGB figures describe generators rather than judges, so we compare them only against the gated pipeline, never against judge accuracy.
The strongest existing reference-free judge is RAGAs (RAGAs), which reports 0.95 agreement with humans on WikiEval faithfulness and 0.70 on context relevance. We rerun it with the same backbone LLM we use for extraction, so that neither side gains from a stronger model. We also run a few-shot rubric judge that sees the same labeled examples as our learner, in context, with its rubric tuned on the same development split under the same number of prompt iterations. Beating RAGAs means matching it within noise on single-passage faithfulness and exceeding it on RGB refusal, counterfactual, and integration cases and on FEVER's not-enough-info class.
For trained judges, ConsJudge is the natural competitor (Judge as A Judge). Its reported numbers are consistency above 0.90 and a downstream generator average of 65.69 against 63.63 for Llama3-8B. We train it on the same backbone and the same unlabeled pool, and also give it our labeled examples as preference pairs so it is not starved of supervision.
The ablation that isolates our key ingredient is a propositional learner: gradient-boosted trees and a shallow decision tree trained on the identical extracted facts, flattened into count and indicator features, with the same labels and the same tuning budget. We add two more ablations. The first gives the induced program to the LLM as a natural-language rubric instead of executing it, to test whether symbolic execution matters or only the rule content. The second is an HVR-style hand-written rule set, produced by an author under a fixed time budget, to test whether induction beats a human writing the rules directly.
Why not just…?
Why not just use a strong prompted judge like RAGAs? On single-passage faithfulness this is a real threat. RAGAs already agrees with humans at 0.95, and we do not expect to beat it there. The case for our approach rests on the cases RAGAs does not aggregate well. Its score is a ratio of entailed statements, so it has no notion of refusal, of source conflict, or of multi-hop support, and its context-relevance agreement is 0.70. Our experiments report results broken down by RGB ability and FEVER class. If RAGAs matches us on those breakdowns, the claim fails outside the length-generalization setting.
Why not just train a classifier on the extracted facts? This is the most serious alternative. If the LLM extraction carries most of the signal, boosted trees on the same facts may match the logic program on in-distribution data, and we expect that they might. The claim that separates the two is structural. A recursive rule applies to evidence chains of any length, while a fixed-width feature vector sees longer chains as out-of-distribution inputs. The length-generalization split below settles this directly. If trees match the program there too, we would conclude that MIL adds interpretability but not accuracy, and report it that way.
Why not just make the LLM judge self-consistent, as ConsJudge does? Consistency across prompts rewards a judge for being stable, not for being right. The Silent Judge and Investigating Non-Transitivity in LLM-as-a-Judge document biases that survive consistent prompting. Our perturbation probes below measure verdict flips for both judges under padding, reordering, and paraphrase. We expect the program to be invariant except where extraction itself changes. A result showing ConsJudge equally invariant and equally accurate would weaken the case.
Why not just hand-write the rules, as HVR and Glass-Box Arbitrators do? For a narrow, stable domain, hand-written rules may suffice. The hand-written baseline measures how far a time-bounded expert gets, and the cross-domain transfer test measures who adapts faster. Transfer means moving from the general web domain of FEVER and WikiEval to RGB's recent-news questions, with either 50 new labels for the learner or one hour of editing for the human.
Proposed Experiments
Benchmarks. We evaluate on RGB in English, covering noise robustness, negative rejection, information integration, and counterfactual robustness. We use FEVER's labeled claims with gold and retrieved evidence, whose original pipeline reached only 31.87% accuracy when correct evidence was required and 45.89% evidence recall (FEVER). We use WikiEval for agreement with human judgments. We use the HotpotQA and NQ portions of the ConsJudge testbed for judge consistency and for downstream reward use. Learners receive 50, 100, or 200 labeled judgments, and learning curves are reported for all trained baselines.
Decisive check 1: length generalization. We build a split from FEVER claims whose evidence spans one or two articles for training. The test set uses claims spanning more articles, from FEVER's multi-article subset, together with a constructed extension that chains RGB integration questions to three and four hops. The prediction is that the logic program's accuracy degrades gracefully while the propositional learner and the few-shot judge drop sharply.
Decisive check 2: bias invariance. We pad answers with neutral text, shuffle passage order, and paraphrase rubrics and answers, then report the verdict flip rate for every judge.
Decisive check 3: extraction versus induction. On a hand-annotated subset we feed the learner gold facts instead of extracted ones. This separates errors from the reading step from errors in the rules, and tells us whether the description-length noise tolerance is carrying real weight.
Decisive check 4: gating. We attach each judge as a gate to a fixed RAG generator on RGB and report refusal rate and counterfactual correction against the ungated generator's figures above, charging each gate its false-refusal rate so that a gate cannot win by refusing everything.
Across all four checks, the proposal succeeds only if the induced program wins on the length and bias checks at equal label budgets. Interpretability alone would not justify the added machinery.
References
- Benchmarking Large Language Models in Retrieval-Augmented Generation
- Judge as A Judge: Improving the Evaluation of Retrieval-Augmented Generation through the Judge-Consistency of Large Language Models
- The Silent Judge: Unacknowledged Shortcut Bias in LLM-as-a-Judge
- Investigating Non-Transitivity in LLM-as-a-Judge
- Turning 30: New Ideas in Inductive Logic Programming
- Inductive Logic Programming: Challenges
- Hypothesis Generation via LLM-Automated Language Bias for ILP
- Abductive Logical Rule Induction by Bridging Inductive Logic Programming and Multimodal Large Language Models
- RAGAs: Automated Evaluation of Retrieval Augmented Generation
- Hierarchical Planning for Complex Tasks with Knowledge Graph-RAG and Symbolic Verification
- Glass-Box Arbitrators: An Explainable Neuro-Symbolic AI Framework for International Commercial Arbitration Proceedings
- Ultra-Strong Machine Learning: comprehensibility of programs learned with ILP
- FEVER: a Large-scale Dataset for Fact Extraction and VERification