Procedural data generators for symbolic pre-training, also including RL environments
Project description
Reasoning Core ◉
reasoning-core is a suite of textual procedural data generators for language model pre-training and post-training. It is centered on expressive formal and algorithmic tasks, including full fledged first-order-logic, formal mathematics with TPTP, planning, and CFG syntax tasks.
We release pre-generated data scaled to more than 10B tokens
🤗 https://hf.co/collections/reasoning-core/datasets
Standalone
uv pip install reasoning-core
from reasoning_core import list_tasks, get_task, score_answer
T = get_task('arithmetics')()
x = T.generate_example()
assert score_answer(x.answer, x)==1
Task examples and task authoring guide
GALLERY (names link to task code)
planning · table_qa · table_conversion · equation_system · code_execution · diff_prediction · diff_patching · regex_following · regex_induction · graph_pathfinding · graph_node_centrality · graph_isomorphism · arithmetics · symbolic_arithmetics · sequential_induction · conjecture_entailment · proof_reconstruction · bayesian_association · bayesian_intervention · logic_nli · evidence_retrieval · parsability · parsing · continuation · set_intersection · set_missing_element · count_elements · set_equality
Parallel generation script
Run bash run_generate.sh for multi-threaded generation to json files (readable by Huggingface Datasets).
Integrations
Prime Environment Hub
#!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")
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()
Reasoning gym
We use a custom interface but compatible interface. Our tasks, which are mostly orthogonal to RG, can be imported in it.
import reasoning_gym, reasoning_core
from reasoning_gym.composite import DatasetSpec
reasoning_core.register_to_reasoning_gym() # registers RC tasks into RG
specs = [
DatasetSpec(name='leg_counting', weight=1, config={}), #from reasoning_gym 🏋
DatasetSpec(name='arithmetics', weight=1, config={}), #from reasoning_core ◉
]
D=reasoning_gym.create_dataset('composite', size=10, seed=42, datasets=specs)
And the other way around:
from reasoning_core import get_task
t=get_task('reasoning_gym')
t.generate_example(level=1, rg_task='lcm') #or unspecified for random task
Openreward
https://openreward.ai/dsileo/reasoning-core
Citation and paper
@article{reasoningcore2026,
title={Reasoning Core: A Scalable Procedural Data Generation Suite for Symbolic Pre-training and Post-Training},
author={Lacombe, Valentin and Quesnel, Valentin and Sileo, Damien},
journal={arXiv preprint arXiv:2603.02208},
year={2026},
url={https://arxiv.org/abs/2603.02208}
}
https://arxiv.org/abs/2603.02208
Contact: damien.sileo@inria.fr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reasoning_core-0.3.0.tar.gz.
File metadata
- Download URL: reasoning_core-0.3.0.tar.gz
- Upload date:
- Size: 265.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cecc89231f48e85ba4af618051ef561af20dcca6757b6aa8976706724a31376
|
|
| MD5 |
d3c22afe4912c1e8f651af4e142a73c0
|
|
| BLAKE2b-256 |
b8d29c760321240ca7046edd59df080003de9e8bbec63d8bbe29326b28134515
|
File details
Details for the file reasoning_core-0.3.0-py2.py3-none-any.whl.
File metadata
- Download URL: reasoning_core-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 272.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
488d5d7f028a071880a87c4fe9cedcd83742e6627986a67ed9cac7f38838250a
|
|
| MD5 |
ca934aa9d93a424e7397d7476e94c0ba
|
|
| BLAKE2b-256 |
6ea9d319e80f2e8214a10481289198f0aa15e9ef4e2f1a3ca5b5dbd32218673d
|