š¤ Your LLM-Wiki Need to be Refined
DeepRefine is a general LLM-based reasoning model for agent-compiled knowledge refinement that improves the quality of any pre-constructed knowledge bases with user queries to make it more suitable for the downstream tasks.
We provide a Dockerfileā for a reproducible environment.
Create atlastune from scratch:
cd /path/to/DeepRefine
conda env create -f docker/atlastune_environment.yml
conda activate atlastune
pip install -e .
Create the environment with pip only:
conda create -n atlastune python=3.10 -y
conda activate atlastune
cd /path/to/DeepRefine
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 \
--index-url https://download.pytorch.org/whl/cu126
pip install -r docker/requirements-atlastune.txt
pip install flash-attn==2.8.3 --no-build-isolation
pip install -e .
pip install -e . registers the bundled verl package. For local atlas-rag development, use pip install -e ./AutoSchemaKG instead of the PyPI pin when needed.
The /deeprefine Cursor skill and deeprefine CLI live in a separate repo (DeepRefine-Skillā ), sibling to this one. After atlastune is ready:
pip install -e /path/to/DeepRefine-Skill
cd /path/to/your-kb-project && deeprefine cursor install
See DeepRefine-Skill/README.mdā for the full graphify workflow.
We have a demo pipline test.ipynbā , in which you can have a quick overview about what DeepRefine is doing.
We collect the raw training data of HotpotQA from https://hotpotqa.github.io/ā and then construct the data samples for RL training through the following script:
bash scripts/autograph-r1/data_prepare/hotpotqa_cons.sh
Or you can also access the training data under the folder data/.
ā ļø Configuration Reminder: Please ensure to replace all path configurations in the following scripts with your own paths.
Update your config in verl/third_party/autograph_r1/config.ini.
Train $\texttt{DeepRefine-4B}$ based on $\texttt{Qwen3-4B-Instruct-2507en}$ with GRPO and GBD reward:
bash scripts/train/run_qwen3-4b_graph_refiner.sh
Train $\texttt{DeepRefine-8B}$ based on $\texttt{Qwen3-8B}$ with GRPO and GBD reward:
bash scripts/train/run_qwen3-8b_graph_refiner.sh
We have also provided our model in HuggingFaceā .
ā ļø Configuration Reminder: Please ensure to replace all path configurations in the following scripts with your own paths.
There are six evaluation mode:
bash scripts/eval/gr_refine_bench_no_refine.sh
bash scripts/eval/gr_refine_bench_wo_rl.sh
bash scripts/eval/gr_refine_bench_rl.sh
bash scripts/eval/tr_refine_bench_no_refine.sh
bash scripts/eval/tr_refine_bench_wo_rl.sh
bash scripts/eval/tr_refine_bench_rl.sh
@article{huang2026deeprefine,
title={DeepRefine: Agent-Compiled Knowledge Refinement via Reinforcement Learning},
author={Huang, Haoyu and Bai, Jiaxin and Liu, Shujie and Wei, Yang and Tsang, Hong Ting and Gao, Yisen and Xie, Zhongwei and Li, Yufei and Song, Yangqiu},
journal={arXiv preprint arXiv:2605.10488},
year={2026}
}
Content type
Image
Digest
sha256:93c0ef533ā¦
Size
20.2 GB
Last updated
about 1 month ago
docker pull hhyhuang/deeprefine