cadqa-rl-2000
收藏资源简介:
该数据集名为 CAD-QA RL Training Set (2000 samples),专为 CAD 几何推理领域的强化学习(RL)训练设计。数据集源自 CAD-QA 基准测试中的 release_10k 训练集拆分,并采用 cad_browsecomp 难度级别。每个样本是一个闭卷问题:包含一段 CadQuery 脚本以及一个关于该脚本生成几何形状的问题,答案通过精确匹配进行验证,适用于可验证奖励的 RL 训练。数据集共包含 2000 个训练样本和 98 个验证样本(验证样本来源于基准测试的评估切片,不参与训练)。每个样本包含以下字段:row_id(唯一标识符)、prompt(闭卷提示,包括 CadQuery 脚本和问题)、answer_format(答案格式,如 text、candidate_label、coordinate)、gold_answer(精确匹配的目标答案,JSON 编码,需使用 json.loads 解码)、difficulty_bucket(难度级别,固定为 cad_browsecomp)、logical_hop_count(推理跳数)、geometry_hop_count(几何跳数)、relation_families(关系系列列表)。奖励机制为:如果解析后的答案(根据 answer_format 解析)与 gold_answer 精确匹配,则得分为 1.0,否则为 0.0。数据由 CAD-QA 管线通过 AST/数据流图及 CadQuery 执行从公开的 CADEvolve 源语料库合成生成,不包含人工或个人数据。
This dataset is named CAD-QA RL Training Set (2000 samples), specifically designed for reinforcement learning (RL) training in the domain of CAD geometric reasoning. The dataset is derived from the release_10k training split of the CAD-QA benchmark, using the cad_browsecomp difficulty level. Each sample is a closed-book problem: it includes a CadQuery script and a question about the geometry generated by that script. Answers are verified by exact match, suitable for RL training with verifiable rewards. The dataset contains a total of 2000 training samples and 98 validation samples (validation samples come from the evaluation slice of the benchmark and are not used for training). Each sample includes the following fields: row_id (unique identifier), prompt (closed-book prompt including the CadQuery script and question), answer_format (answer format, e.g., text, candidate_label, coordinate), gold_answer (target answer for exact match, JSON-encoded, needs to be decoded using json.loads), difficulty_bucket (difficulty level, fixed as cad_browsecomp), logical_hop_count (number of logical hops), geometry_hop_count (number of geometry hops), relation_families (list of relation families). The reward mechanism is: if the parsed answer (parsed according to answer_format) exactly matches the gold_answer, the score is 1.0; otherwise, it is 0.0. The data is synthetically generated by the CAD-QA pipeline via AST/dataflow graphs and CadQuery execution from the public CADEvolve source corpus, containing no human or personal data.
CAD-QA RL 训练集(2000 样本)数据集概述
基本信息
- 语言:英语(en)
- 许可证:Apache 2.0
- 任务类型:问答(question-answering)、文本生成(text-generation)
- 标签:CAD、几何推理、强化学习(RL)、GRPO
数据集内容
该数据集来源于 CAD-QA 基准测试(release_10k 训练分割,cad_browsecomp 难度级别),包含 2000 条用于 CAD 几何推理的可验证奖励强化学习训练数据。每条数据为闭卷问题:包含一段 CadQuery 脚本及关于生成几何形状的问题,标准答案可通过精确匹配进行验证。
数据划分
- 训练集:2000 条
- 验证集:98 条(基准测试的评估切片;明确排除在训练之外,禁止使用该文件进行训练)
数据字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
row_id |
字符串 | 唯一行标识 |
prompt |
字符串 | 闭卷提示(CadQuery 脚本 + 问题) |
answer_format |
字符串 | text、candidate_label 或 coordinate |
gold_answer |
字符串 | 精确匹配目标,JSON 编码(如 "wp15"、"A"、"[1.0, 2.0, 3.0]"),需用 json.loads 解码后比较 |
difficulty_bucket |
字符串 | cad_browsecomp |
logical_hop_count |
整数 | 逻辑推理步数 |
geometry_hop_count |
整数 | 几何推理步数 |
relation_families |
列表 | 涉及的关系族 |
奖励机制
- 当且仅当
parse_answer(completion, answer_format) == gold_answer时得分为 1.0 text格式:原始字符串candidate_label格式:原始标记(A/B/C/…)coordinate格式:保留 6 位小数的浮点数三元组- 无法解析的输出得分为 0.0
数据配置(Configs)
数据集包含 5 个配置,每个配置均只有训练分割:
| 配置名 | 样本数 | 主要特征 |
|---|---|---|
sft_traces_v1 |
275 | 行ID、提示、轨迹、跳数、工具名、答案格式、标准答案、压缩标记 |
sft_traces_v2 |
308 | 在 v1 基础上增加提示/完成令牌数 |
v2_curriculum |
2100 | 提示、答案格式、标准答案、逻辑跳数 |
v3_curriculum |
1429 | 提示、答案格式、标准答案、逻辑跳数 |
v4_10k |
13014 | 提示、标准答案、答案格式、逻辑跳数、分割、来源ID/代码、几何跳数 |
数据来源
该数据集由 CAD-QA 流水线(AST/数据流图 + CadQuery 执行)从公开的 CADEvolve 源代码语料库合成生成。不包含任何人类数据或个人数据。
使用方式
python from datasets import load_dataset ds = load_dataset("MRiabov/cadqa-rl-2000") # 分割:train (2000),validation (98)




