Skip to content

RLinf/WideSeek-R1-Data

Repository files navigation

WideSeek-R1 Training Data Generation Pipeline

Unlike traditional QA datasets that target specific facts or short snippets, our dataset focuses on complex, multi-faceted queries, with ground truth answers in a structured Markdown format. Furthermore, our data generation process requires no human intervention and is constructed entirely by LLMs.

Our QA data structure:

  • Queries: Cover a broad range of topics derived from HybridQA;
  • Ground truth answers: Formatted as Markdown tables, typically containing 10–50 rows and 5–10 columns.

1. Prerequisites

a. Environment Setup

We use uv to create a virtual environment and manage dependencies.

# 1. Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Sync dependencies and create virtual environment in this directory
uv sync

# 3. Activate the virtual environment
source .venv/bin/activate

b. API Key Configuration

You must set the GEMINI_API_KEY environment variable.

export GEMINI_API_KEY="your_google_gemini_api_key"

c. Prepare Source Data

Clone the HybridQA repository to get the source data.

# Clone HybridQA into this directory
git clone https://github.com/wenhuchen/HybridQA.git

2. How to Run

Ensure your virtual environment is activated, then use the run.py script.

python run.py --start <START_INDEX> --end <END_INDEX> --workers <NUM_WORKERS> --out_dir <OUTPUT_DIR>

Arguments:

Argument Description Example
--start The starting index of the HybridQA dataset to process. 50000
--end The ending index of the HybridQA dataset to process. 50100
--workers Number of parallel threads/workers. 5
--out_dir Directory to save the outputs. ./output

Note:

  • The number of constructed samples is END_INDEX - START_INDEX.
  • The valid index range is 0 <= START_INDEX < END_INDEX <= 62682.

Example:

python run.py --start 50000 --end 50100 --workers 5 --out_dir ./output_test

3. Directory & Structure

a. Query Generation (generate_query/)

This folder handles the transformation from raw data to structured queries. The process is divided into 3 steps (orchestrated by pipeline_query_process.py):

  • Step 1 (generate_intent.py): Transforms the raw HybridQA question into a clear User Intent.
  • Step 2 (generate_query_hybrid.py): Generates a Query Instruction based on the User Intent.
  • Step 3 (canonicalize_queries.py): Refines the instruction into a Canonicalized Query (standardized format).

b. Answer Generation (generate_ground_truth/)

  • Step 4 (Ground Truth Table Generation):
    • Table Generation: generate_table/parallel_pipeline_ground_truth.py runs the table generation in parallel. We produce two sets of tables to check consistency.
  • Step 5 (Evaluation Criteria Generation):
    • Unique Columns: generate_unique_column/generate_unique_columns_parallel.py runs in parallel to identify unique columns (evaluation criteria).

c. QA Pair Filtering (check_result/)

  • Step 6 (Filtering & Merging):
    • Filter Low Consistency: check_result/compare_tables.py compares the two generated tables and filters out data with low consistency.
    • Filter Empty Data: check_result/post_processing.py filters out entries where query, ground_truth, or unique_column are empty.

Citation

If you use this dataset producer code in your research, please cite our paper:

@article{xu2026wideseek,
  title   = {WideSeek-R1: Exploring Width Scaling for Broad Information Seeking via Multi-Agent Reinforcement Learning},
  author  = {Xu, Zelai and Xu, Zhexuan and Zhang, Ruize and Zhu, Chunyang and Yu, Shi and Liu, Weilin and Zhang, Quanlu and Ding, Wenbo and Yu, Chao and Wang, Yu},
  journal = {arXiv preprint arXiv:2602.04634},
  year    = {2026},
}

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages