DeepRefine: Agentic Knowledge Refinement via Reinforcement Learning

Haoyu Huang, Jiaxin Bai, Shujie Liu, Yang Wei, Huihao Jing, Hong Ting Tsang, Yisen Gao, Zhongwei Xie, Yufei Li, Yangqiu SongarXiv 2026

TL;DR

DeepRefine is a novel reinforcement learning framework designed to automatically fix structural defects—such as missing links, factual errors, or redundancies—in pre-built knowledge bases (KBs). By diagnosing issues locally based on user queries and optimizing a "Gain-Beyond-Draft" reward via Group Relative Policy Optimization (GRPO), it significantly boosts downstream Retrieval-Augmented Generation (RAG) performance without requiring expensive full-KB reconstruction.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) systems rely heavily on external Knowledge Bases (KBs), like Knowledge Graphs or LLM-Wikis, to ground large language models in factual data. However, these KBs are rarely perfect; they frequently suffer from incompleteness (missing evidence chains), incorrectness (imprecise assertions), and redundancy (ambiguity or coreference issues).

When LLM agents interact with flawed KBs over time, these defects compound, degrading retrieval quality and downstream task performance. While one could retrain a KB builder or recompile the entire database from scratch, doing so at scale is computationally prohibitive and often introduces new peripheral noise. DeepRefine addresses this by introducing a post-construction knowledge refinement paradigm that answers two core challenges: how to localize defects without scanning the entire KB, and how to optimize an editing policy without "golden" correction trajectories.

Methods

DeepRefine treats knowledge base refinement as an end-to-end reinforcement learning problem, employing an agentic, multi-turn approach to interact with and update the KB. It operates via a three-step reasoning process:

  1. Answerability Judgement Loop: Given a user query, the agent performs multi-turn dense retrieval to expand a local subgraph. It evaluates whether the query can be answered using the retrieved context. If it can, the process skips further editing; if not, it proceeds to diagnose the issue.
  2. Error Abduction: The agent analyzes the interaction history to abductively infer why the query was unanswerable, categorizing the root cause into incompleteness, incorrectness, or redundancy.
  3. Refinement Actions Generation: Instead of rewriting entire text chunks, the agent generates structured, code-like API calls (insert_edge(), delete_edge(), and replace_node()) to modify the KB directly.

To train this policy without ground-truth edit trajectories, the authors utilize Group Relative Policy Optimization (GRPO) paired with a novel Gain-Beyond-Draft (GBD) reward. The GBD reward quantifies the exact utility of the edits by measuring the token-level F1 score improvement of the final RAG answer generated using the refined KB versus the original draft KB.

Figure 2: Demonstration of GRPO training for the agentic knowledge refinement (DeepRe- fine), where the orange arrows denote the multi-turn interactions of DeepRefine with KBs and the green arrows denote the refinement actions on KBs.

Datasets

  • Training: 5,000 samples randomly selected from the HotpotQA training set.
  • Evaluation: Five diverse QA benchmarks covering Simple QA (Natural Questions, PopQA), Multi-hop QA (2WikiMultihopQA, Musique), and Long-term Conversation QA (LOCOMO).
  • Controlled Defect Benchmark: To isolate performance on specific errors, the authors constructed a diagnostic dataset of 501 samples from HotpotQA (Dev-Distractor), injecting explicit corruptions (167 instances each of incompleteness, incorrectness, and redundancy).

Key Insights and Ideas

  • Targeted Edits Over Total Reconstruction: Completely rebuilding a KB from scratch often introduces global noise. DeepRefine demonstrates that fixing localized, query-relevant regions yields better downstream RAG performance than full reconstruction methods like AutoGraph-R1.
  • Code as an Action Space: Using structured operators like insert_edge() or delete_edge() makes the refinement process highly efficient. It reduces token decoding costs and allows seamless integration with standard graph databases (e.g., NetworkX, Neo4j).
  • Generalization to Unseen Queries: Even though the KB is refined using a specific subset of queries, the structural improvements accumulate at the KB level. This boosts performance for entirely separate, held-out evaluation queries that were never seen during the refinement phase.

Key Results

  • Consistent F1 Gains: Across all three evaluated KB constructors (Naive, RL Fine-Tuned, and Graphify) and various retrievers (Subgraph, ToG, HippoRAG), DeepRefine steadily improved downstream RAG F1 scores. For instance, using a Naive Constructor with the ToG retriever, DeepRefine-8B boosted the overall average F1 score from 33.01 to 38.61.
  • Massive Efficiency Gains: DeepRefine is significantly faster than reconstruction baselines. Across Simple QA, Multi-hop QA, and Conversation QA, it cut time consumption by roughly 2x to 3x (e.g., reducing Multi-hop QA processing time from 9,780.4 seconds down to 3,357.5 seconds).
Effectiveness vs. efficiency comparison

Limitations and Future Work

The authors note that their training data was derived from HotpotQA using relatively simple filtering criteria, meaning the training data quality could be further optimized. Promising directions for future work include sourcing higher-quality, more diverse training data and exploring how to combine DeepRefine with a robust, systematic refinement framework to ensure long-term KB stability.

Summary updated

BibTeX
@misc{huang2026deeprefine,
  author = {Haoyu Huang and Jiaxin Bai and Shujie Liu and Yang Wei and Huihao Jing and Hong Ting Tsang and Yisen Gao and Zhongwei Xie and Yufei Li and Yangqiu Song},
  title = {{DeepRefine: Agentic Knowledge Refinement via Reinforcement Learning}},
  year = {2026},
  eprint = {2605.10488},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.10488},
}
Figure