TPTP axiom library
收藏数据集概述
基本信息
- 数据集名称: reasoning core ◉
- 核心功能: 基于文本的RLVR(强化学习与验证推理)用于LLM(大语言模型)推理训练
- 核心任务类型: 符号化任务,包括完整的一阶逻辑(FOL)、基于TPTP的形式数学、新型领域的正式规划以及语法任务
安装与使用
主要环境安装
python #!pip install uv #install uv if needed !uv tool install prime --with openai -q !uv tool run prime -- env install sileod/reasoning-core-env
from verifiers import load_environment import os; from openai import OpenAI
env = load_environment("reasoning-core-env")
os.environ["OPENROUTER_API_KEY"] = "" #✍️ write your key client = OpenAI( base_url="https://openrouter.ai/api/v1", api_key=os.getenv("OPENROUTER_API_KEY")) results = env.evaluate(client=client, model="gpt-4.1-mini", num_examples=20, rollouts_per_example=1) df=env.make_dataset(results).to_pandas()
独立安装方式
python pip install reasoning_core
from reasoning_core import list_tasks, get_task, score_answer
T = get_task(arith)() x = T.generate_example() assert score_answer(x.answer, x)==1
数据生成
- 生成方式: 运行
bash run_generate.sh进行多线程生成到json文件 - 兼容性: 生成的文件可由Huggingface Datasets读取
与Reasoning Gym集成
- 接口特性: 使用比reasoning-gym(RG)更精简的自定义接口
- 任务正交性: 所有任务与RG正交,但可导入到RG中使用
- 集成示例: python import reasoning_gym
from reasoning_core import register_to_reasoning_gym register_to_reasoning_gym()
specs = [ # here, leg_counting tasks will make up two thirds of tasks DatasetSpec(name=leg_counting, weight=2, config={}), #from reasoning_gym 🏋 DatasetSpec(name=arith, weight=2, config={}), #from reasoning_core ◉ ] D=reasoning_gym.create_dataset(composite, size=10, seed=42, datasets=specs)

- 1Saturation-Driven Dataset Generation for LLM Mathematical Reasoning in the TPTP Ecosystem法国里尔大学,Inria,CNRS,Centrale Lille,UMR 9189-CRIStAL · 2025年



