Gating What a Retrieval System Writes Into Its Own Knowledge Graph

Some retrieval-augmented systems build a small knowledge graph as they work. A knowledge graph here means a set of (subject, relation, object) facts. When the graph lacks a fact the question needs, the system reads raw documents, has a language model extract new facts, and adds them to the graph for later reasoning steps. This "patch the graph on the fly" design is the most promising answer to an old problem in specialized domains. Hand-built domain ontologies are precise, but they must be rebuilt from scratch for every new field. The weakness is that the language model doing the extraction hallucinates. A false fact written into the graph at step one is treated as ground truth at step three. Today's systems write extracted facts unchecked and only audit the final answer, if they audit anything.

We propose a calibrated write gate for this memory. Every candidate fact is scored by a verifier that must locate a verbatim supporting quote and matching entities in the source text. The gate's threshold is set with conformal risk control, a distribution-free calibration method, on a few hundred labeled extractions from the target domain. As a result, the rate of false facts admitted into memory is held below a user-chosen level $\alpha$. The core claim is empirical and testable. In domain multi-hop question answering, a substantial share of final-answer hallucinations trace back to false facts written into working memory, and these errors compound with hop depth. Controlling the write error rate should therefore reduce answer hallucination more, for the same cost, than auditing the answer afterwards. The gate also needs no expert-built ontology, only a small calibration set.

Where this sits in prior work

The method this proposal modifies is SUBQRAG. SUBQRAG breaks a question into sub-questions. When its graph misses a fact, it extracts new triples from text and stores the facts it used in a "graph memory." Its extraction is open-domain and unchecked, and the paper itself notes error accumulation across hops. We keep its loop and change only what is allowed into memory.

Two other lines of work motivate the gap from opposite sides:

  • Expert-curated structure. OG-RAG grounds retrieval in hypergraphs built from expert agricultural ontologies. Progressive Ontology Prompting traverses a hand-built clinical ontology with an explorer–evaluator pair of models. The nuclear regulatory planner relies on an expert edge vocabulary such as SATISFIES and VIOLATES. All three get precision from curated structure, and all three name the cost of rebuilding it per domain as their main limitation.
  • Missing static facts. The medical reading-comprehension work KMQA shows that injecting a static medical graph helps on licensing exams. It also attributes 44% of its failures to facts missing from both text and graph, which is exactly the hole dynamic patching is meant to fill.

The verifier borrows from three sources:

  • Entity checks. HalluGraph aligns response graphs to source graphs using entity-grounding and relation-preservation scores. It reaches 0.94 AUC on legal contracts, but it works only after generation and collapses on short contexts. We move its entity check to the moment each triple is written, where the "context" is the source passage the triple came from, so short-context collapse should matter less.
  • Quote faithfulness. RLSeek shows that requiring verbatim evidence quotes catches baseless paraphrase. We use quote matching as a scoring feature, not as a reinforcement-learning reward.
  • Calibration. TRAC applies conformal prediction to final RAG answers on open-domain questions. We apply the calibration one level down, to memory writes.

One finding constrains the design. RAGTruth reports that baseless additions are far more common than explicit contradictions. A contradiction-style entailment check alone would therefore be too weak, which is why the verifier requires positive quote support rather than only the absence of conflict.

Core Claim and Mechanism

For each candidate triple $t$, the verifier outputs a support score $v(t) \in [0,1]$. The score combines three components:

  • whether an exact or near-exact quote span from the retrieved passage supports the relation;
  • whether both entities appear in that span, as in HalluGraph's entity grounding;
  • a small fine-tuned support classifier.

A triple is written only if $v(t) \ge \lambda$. On a calibration set of $n$ candidate triples labeled true or false, let $L_i(\lambda) = 1$ when triple $i$ is false yet accepted at threshold $\lambda$, and 0 otherwise. This loss can only shrink as $\lambda$ rises. Conformal risk control then chooses

$$\hat\lambda = \inf\Big\{\lambda : \tfrac{n}{n+1}\hat R_n(\lambda) + \tfrac{1}{n+1} \le \alpha\Big\},$$

where $\hat R_n(\lambda)$ is the average of $L_i(\lambda)$ over the calibration set. For an exchangeable new candidate, this guarantees an expected false-write rate of at most $\alpha$.

The honest caveat is that candidates at later hops are conditioned on earlier writes. Exchangeability can therefore fail. We will measure realized false-write rates per hop rather than assume the guarantee holds.

Rejected triples are not discarded silently. The system falls back to giving the generator the raw quoted passage as text, so a rejection costs structure rather than information.

Research Program

The work has three parts.

A measurement study. We instrument an ungated SUBQRAG-style pipeline and hand-label every triple it writes on a sample of questions. We then estimate the false-write rate as a function of hop index. We also attribute each wrong final answer to one of three causes: a false memory triple, a retrieval miss, or a generator error made with correct memory. If false writes explain only a small fraction of wrong answers, the premise fails, and we would report that as the main result.

Building the gate and calibrating it per domain. We use 300–500 labeled triples per domain. This is a deliberately small budget, so the portability claim is measured against ontology rebuilding rather than asserted.

A controlled injection experiment. We plant false triples into memory at fixed rates. This measures how final-answer accuracy and hallucination respond to memory error independently of the gate. It tells us how much any gate could possibly help.

Baselines

The naive reference points are the language model with no retrieval and straightforward chunked RAG, run on the same generator.

  • On CRAG, the paper reports about 34% accuracy for the best model without retrieval. Straightforward RAG reaches about 44% accuracy, with a best truthfulness score of about 13.4% on Task 3. Industry systems reach about 63% accuracy and up to 51% truthfulness (Copilot Pro).
  • We use CRAG's truthfulness metric because it penalizes hallucinated answers. That makes it the right score for a claim about error control.

The strongest open method on the general multi-hop benchmarks is ungated SUBQRAG. It reports 56.00 EM on HotpotQA, 29.70 on MuSiQue, and 61.90 on 2WikiMultiHopQA, against 51.90, 28.20, and 50.60 for HippoRAG2. We will rerun SUBQRAG and our gated variant with identical generators, retrievers, extraction prompts, and hop budgets, so that the gate is the only difference.

Beating SUBQRAG means one of two outcomes with a non-overlapping bootstrap interval:

  • lower hallucination at equal or better EM; or
  • higher EM at matched cost.

A gate that lowers hallucination but loses more than about one EM point would count as a trade-off, not a win.

On the nuclear regulatory benchmark NuScale-MQA, the planning system reports 81.5% accuracy, against 73.0% for LightRAG, 70.5% for HippoRAG, and 49.5% for GraphRAG. It does so with an expert edge ontology and at $0.215 per query.

  • If NuScale-MQA is available to us, the test is whether a gated, ontology-free pipeline reaches or approaches that planner's accuracy.
  • If we cannot obtain it, we will build a comparable question set over public regulatory documents. We will not claim comparison to the 81.5% figure in that case.

For medical licensing questions, the reference is KMQA's 61.8% on NLPEC with a static graph. A modern-generator rerun of KMQA-style static injection will be our comparison point there.

We also compare against text-only retrieval with distractor training in the style of RAFT. RAFT reports 35.28% on HotpotQA with LLaMA2-7B, against 0.03% for plain RAG and 4.41% for domain fine-tuning plus RAG, and 74.00% on HuggingFace APIBench against 42.59%. RAFT is the strongest argument that no graph is needed. We will train it on the same domain data budget.

Three ablations isolate the key ingredient:

  • Post-hoc filtering. An ungated pipeline whose final answers pass through a fine-tuned span detector, the RAGTruth-style critic that reached 78.7% response-level F1.
  • Fixed threshold. The same verifier with a hand-picked threshold in place of conformal calibration.
  • Entity check only. The gate using the entity-grounding check without quote matching.

Why not just…?

Why not just drop the graph and use distractor-trained text RAG? RAFT's results show that text-only retrieval can be strong, and nothing in the file shows graph memory beating it on domain data. This is a real threat. If gated graph memory does not beat a matched RAFT baseline on the domain benchmarks, the honest conclusion is that dynamic graphs are not worth their latency there. The matched comparison above is designed to settle that question.

Why not just audit the final answer with a hallucination detector? Post-hoc detection, whether HalluGraph or a fine-tuned RAGTruth critic, can only refuse or regenerate a whole answer. It cannot stop a false hop-one fact from steering hops two and three. The injection experiment quantifies the difference. If answer accuracy degrades steeply with planted memory error, write-time gating has more room to help than end-of-answer filtering. If the degradation is flat, post-hoc auditing suffices and we will say so. Running both against the same budget of verifier calls makes the comparison fair.

Why not just pick a confidence threshold by hand, or ask the model to self-check each triple? In any single domain, a tuned threshold may match conformal calibration in accuracy. The calibration's value is that the same procedure, given a few hundred labels, hits a stated false-write rate in a new domain without retuning. We test this by tuning the fixed threshold on one domain and transferring it. If the transferred threshold's realized error rate stays as close to target as the calibrated one's, the conformal component adds little and we will report that.

Decisive Checks

The proposal stands or falls on four measurements:

  • In the attribution study, false memory writes must account for a meaningful share of wrong answers, and their rate must grow with hop depth.
  • The injection curve must show that answer quality is sensitive to memory error.
  • The gated pipeline must lower hallucination relative to SUBQRAG on CRAG truthfulness and on hand-labeled answers in the domain sets, without losing more than about one EM point on HotpotQA, MuSiQue, and 2WikiMultiHopQA.
  • Realized per-hop false-write rates must stay near $\alpha$ across domains and across hop depths.

If the first check fails, the work becomes a negative result about where graph-RAG hallucinations actually originate, which is still worth publishing.