Official code for the paper "Deep Research as Rubric for Reinforcement Learning".
A toolkit for synthesizing evaluation data from Deep Research agents. Given a set of queries, the pipeline orchestrates multiple Deep Research frameworks to produce research reports and generates evaluation rubrics from those reports.
The core idea: use Deep Research agents as a data generation engine for evaluation and rubric synthesis.
(query, research_report) pair and generates structured evaluation rubrics via an LLMquery CSV
-> src/rubric_generation.py (single sample)
-> unified_router_server -> framework (deer_flow / open_deep_research / ...)
-> final_report
-> openai_wrapper_server -> rubric
-> src/benchmark_evaluation_2modes.py (single benchmark batch)
-> predicted_answer + benchmark_eval + rubric_eval -> CSV
-> src/run_all_benchmarks.py (all benchmarks)
-> aggregate_summary
-> src/dr_as_rubric_sft/synthesize_sft_data.py
-> SFT training data -> RL training
The companion dataset is available on HuggingFace: miiikiik/dr-as-rubric-data
It contains:
The 8B model checkpoints at each step of the bootstrap loop (described in the paper) are available on HuggingFace:
pip install -r requirements.txt
cp config.yaml.example config.yaml
cp baselines.yaml.example baselines.yaml
cp .env.example .env
# Edit these files with your API keys and model endpoints
Key settings in config.yaml:
openai_wrapper_server: your LLM endpoint (vLLM, OpenAI API, etc.)tavily_search / zhipu_search: search API configurationbenchmark_oss_path: (optional) OSS path for benchmark databenchmarks: paths to benchmark data filesBenchmark datasets are not included. Download them from their respective sources:
| Benchmark | Source |
|---|---|
| ResearchQA | HuggingFace |
| GPQA | HuggingFace |
| MMLU | GitHub |
| MMLU-Pro | HuggingFace |
| DeepResearch Bench | GitHub |
| LocalSearchBench | HuggingFace |
Place each dataset under data/<benchmark_name>/ following the paths in config.yaml.example.
cd example
bash unified_router_start.sh
UNIFIED_ROUTER_CONFIG=config.yaml \
python src/rubric_generation.py \
--query-csv-path data/my_data/your_queries.csv \
--framework deer_flow \
--n-parallel-tasks 8 \
--batch-size 8 \
--output-folder-name my_rubrics
cd example
bash run_simple_all_benchmarks.sh /path/to/your/model
python src/dr_as_rubric_sft/synthesize_sft_data.py \
--input-dir output/my_rubrics \
--output-dir artifacts/sft_data
The synthesized data can be used for SFT training, followed by RL training to further improve model performance.
python scripts/bootstrap_loop.py --config scripts/bootstrap_config.yaml
The bootstrap loop operates across two separate directories on the same machine (or cluster):
| Workspace | Role | Key Contents |
|---|---|---|
dr-rubric repo (dr_rubric_repo) | Data synthesis and evaluation | This repository -- rubric generation, benchmark evaluation, SFT data synthesis |
Training workspace (training_workspace) | RL training | Training framework (e.g. verl), reward configs, training scripts, model checkpoints |
These are configured in scripts/bootstrap_config.yaml:
dr_rubric_repo: /path/to/this/repo # where rubric generation runs
training_workspace: /path/to/training-workspace # where RL training runs
Each bootstrap step alternates between the two workspaces:
dr-rubric Repo Training Workspace
────────────── ──────────────────
Step N:
1. Start vLLM with current model ─────────────> (model checkpoint lives here)
2. Start framework servers
3. Run rubric generation ─> output/rubric-bootstrap-*-step-N/
4. Repair missing rubrics
5. Merge to CSV ─> data/my_data/{model}/bootstrap-step-N.csv
6. Stop all servers
7. Generate reward config
8. Generate training script
9. Run RL training (verl)
10. Checkpoint ─> next step's model
The training workspace is not part of this repository. It must contain:
reward_config/ -- reward model configs and environment pluginsenv.sh -- shell environment setup sourced by generated training scriptsverl) must be available in $PATHSee scripts/bootstrap_config.yaml.example for the full configuration reference, including vLLM, rubric generation, and training parameters.
src/ # Core pipeline code
rubric_generation.py # Single-sample rubric generation workflow
benchmark_evaluation_2modes.py # Batch benchmark data generation
run_all_benchmarks.py # Multi-benchmark orchestrator
benchmark_loader.py # Benchmark dataset loaders
evaluation_handler.py # Evaluation dispatcher
config_loader.py # Configuration loading utilities
llm_handler.py # LLM call handler
openai_wrapper_server.py # LLM proxy with thinking removal
unified_router_server.py # Framework router
deer_flow_server.py # DeerFlow framework server
open_deep_research_server.py # Open Deep Research framework server
deep_research_server.py # DeepResearch framework server
simple_inference_server.py # Simple inference framework server
tavily_mock_server.py # Mock search server (uses LLM)
rubric_evaluation.py # Rubric-based evaluation
run_baselines.py # Baseline comparison runner
dr_as_rubric_sft/ # SFT data synthesis
scripts/
bootstrap_loop.py # Iterative self-improvement loop
bootstrap_config.yaml.example # Bootstrap configuration template
merge_rubric_batched_to_csv.py # Batch merging utility
repair_missing_rubrics.py # Repair missing rubric entries
example/ # Shell scripts for starting services
framework/ # Research frameworks (with local patches)
deer_flow/ # ByteDance DeerFlow (patched)
open_deep_research/ # LangChain Open Deep Research (patched)
DeepResearch/ # Alibaba DeepResearch (patched)
simple_inference/ # Minimal inference adapter
prompts/ # Jinja2 prompt templates
tests/ # Test files
The framework/ directory contains third-party Deep Research frameworks with local patches:
llm.py for model forwarding, added mock Tavily search, JSON truncation for repeated fieldsdeep_researcher.py and utils.py for OpenAI wrapper integrationreact_agent.py and tool files for local model endpoint support@article{mei2026dr,
title={Deep Research as Rubric for Reinforcement Learning},
author={Mei, Wangyi and Gu, Zhouhong and Bai, Zhenhan and Cai, Yin and Zhang, Lefan and Ding, Zhenxin and Chen, Bo and Gao, Yan and Wu, Yi and Hu, Yao and Liang, Jiaqing and Yang, Deqing},
year={2026}
}
Apache License 2.0. See LICENSE.
Third-party frameworks in framework/ retain their original licenses:
12 followers · starred Jun 2026
Official code for the paper "Deep Research as Rubric for Reinforcement Learning".
A toolkit for synthesizing evaluation data from Deep Research agents. Given a set of queries, the pipeline orchestrates multiple Deep Research frameworks to produce research reports and generates evaluation rubrics from those reports.
The core idea: use Deep Research agents as a data generation engine for evaluation and rubric synthesis.
(query, research_report) pair and generates structured evaluation rubrics via an LLMquery CSV
-> src/rubric_generation.py (single sample)
-> unified_router_server -> framework (deer_flow / open_deep_research / ...)
-> final_report
-> openai_wrapper_server -> rubric
-> src/benchmark_evaluation_2modes.py (single benchmark batch)
-> predicted_answer + benchmark_eval + rubric_eval -> CSV
-> src/run_all_benchmarks.py (all benchmarks)
-> aggregate_summary
-> src/dr_as_rubric_sft/synthesize_sft_data.py
-> SFT training data -> RL training
The companion dataset is available on HuggingFace: miiikiik/dr-as-rubric-data
It contains:
The 8B model checkpoints at each step of the bootstrap loop (described in the paper) are available on HuggingFace:
pip install -r requirements.txt
cp config.yaml.example config.yaml
cp baselines.yaml.example baselines.yaml
cp .env.example .env
# Edit these files with your API keys and model endpoints
Key settings in config.yaml:
openai_wrapper_server: your LLM endpoint (vLLM, OpenAI API, etc.)tavily_search / zhipu_search: search API configurationbenchmark_oss_path: (optional) OSS path for benchmark databenchmarks: paths to benchmark data filesBenchmark datasets are not included. Download them from their respective sources:
| Benchmark | Source |
|---|---|
| ResearchQA | HuggingFace |
| GPQA | HuggingFace |
| MMLU | GitHub |
| MMLU-Pro | HuggingFace |
| DeepResearch Bench | GitHub |
| LocalSearchBench | HuggingFace |
Place each dataset under data/<benchmark_name>/ following the paths in config.yaml.example.
cd example
bash unified_router_start.sh
UNIFIED_ROUTER_CONFIG=config.yaml \
python src/rubric_generation.py \
--query-csv-path data/my_data/your_queries.csv \
--framework deer_flow \
--n-parallel-tasks 8 \
--batch-size 8 \
--output-folder-name my_rubrics
cd example
bash run_simple_all_benchmarks.sh /path/to/your/model
python src/dr_as_rubric_sft/synthesize_sft_data.py \
--input-dir output/my_rubrics \
--output-dir artifacts/sft_data
The synthesized data can be used for SFT training, followed by RL training to further improve model performance.
python scripts/bootstrap_loop.py --config scripts/bootstrap_config.yaml
The bootstrap loop operates across two separate directories on the same machine (or cluster):
| Workspace | Role | Key Contents |
|---|---|---|
dr-rubric repo (dr_rubric_repo) | Data synthesis and evaluation | This repository -- rubric generation, benchmark evaluation, SFT data synthesis |
Training workspace (training_workspace) | RL training | Training framework (e.g. verl), reward configs, training scripts, model checkpoints |
These are configured in scripts/bootstrap_config.yaml:
dr_rubric_repo: /path/to/this/repo # where rubric generation runs
training_workspace: /path/to/training-workspace # where RL training runs
Each bootstrap step alternates between the two workspaces:
dr-rubric Repo Training Workspace
────────────── ──────────────────
Step N:
1. Start vLLM with current model ─────────────> (model checkpoint lives here)
2. Start framework servers
3. Run rubric generation ─> output/rubric-bootstrap-*-step-N/
4. Repair missing rubrics
5. Merge to CSV ─> data/my_data/{model}/bootstrap-step-N.csv
6. Stop all servers
7. Generate reward config
8. Generate training script
9. Run RL training (verl)
10. Checkpoint ─> next step's model
The training workspace is not part of this repository. It must contain:
reward_config/ -- reward model configs and environment pluginsenv.sh -- shell environment setup sourced by generated training scriptsverl) must be available in $PATHSee scripts/bootstrap_config.yaml.example for the full configuration reference, including vLLM, rubric generation, and training parameters.
src/ # Core pipeline code
rubric_generation.py # Single-sample rubric generation workflow
benchmark_evaluation_2modes.py # Batch benchmark data generation
run_all_benchmarks.py # Multi-benchmark orchestrator
benchmark_loader.py # Benchmark dataset loaders
evaluation_handler.py # Evaluation dispatcher
config_loader.py # Configuration loading utilities
llm_handler.py # LLM call handler
openai_wrapper_server.py # LLM proxy with thinking removal
unified_router_server.py # Framework router
deer_flow_server.py # DeerFlow framework server
open_deep_research_server.py # Open Deep Research framework server
deep_research_server.py # DeepResearch framework server
simple_inference_server.py # Simple inference framework server
tavily_mock_server.py # Mock search server (uses LLM)
rubric_evaluation.py # Rubric-based evaluation
run_baselines.py # Baseline comparison runner
dr_as_rubric_sft/ # SFT data synthesis
scripts/
bootstrap_loop.py # Iterative self-improvement loop
bootstrap_config.yaml.example # Bootstrap configuration template
merge_rubric_batched_to_csv.py # Batch merging utility
repair_missing_rubrics.py # Repair missing rubric entries
example/ # Shell scripts for starting services
framework/ # Research frameworks (with local patches)
deer_flow/ # ByteDance DeerFlow (patched)
open_deep_research/ # LangChain Open Deep Research (patched)
DeepResearch/ # Alibaba DeepResearch (patched)
simple_inference/ # Minimal inference adapter
prompts/ # Jinja2 prompt templates
tests/ # Test files
The framework/ directory contains third-party Deep Research frameworks with local patches:
llm.py for model forwarding, added mock Tavily search, JSON truncation for repeated fieldsdeep_researcher.py and utils.py for OpenAI wrapper integrationreact_agent.py and tool files for local model endpoint support@article{mei2026dr,
title={Deep Research as Rubric for Reinforcement Learning},
author={Mei, Wangyi and Gu, Zhouhong and Bai, Zhenhan and Cai, Yin and Zhang, Lefan and Ding, Zhenxin and Chen, Bo and Gao, Yan and Wu, Yi and Hu, Yao and Liang, Jiaqing and Yang, Deqing},
year={2026}
}
Apache License 2.0. See LICENSE.
Third-party frameworks in framework/ retain their original licenses:
12 followers · starred Jun 2026