SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.20342 · 2025

Teaching Language Models to Reason with Tools

Xiang Wang, Ziniu Li, Ruoyu Sun, Dayiheng Liu, Junyang Lin, Benyou Wang, Tian Ding, Keqin Bao, Mingfeng Xue, Chengpeng Li, Zhengyang Tang

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2510.20342.json · badge: /api/ran/2510.20342.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ChengpengLi1003/CoRT canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
all_error_output Ran
ran, violated the contract we drafted
ChengpengLi1003/CoRT/deepscaler/deepscaler/rewards/math_reward_hybrid.py
pointer only (licence: NONE) · get_code("197bafc8e36a5af9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_sequence_entropy Ran
ran, violated the contract we drafted
ChengpengLi1003/CoRT/evaluation/compute_metrics_dp.py
pointer only (licence: NONE) · get_code("7d89975b4585e1eb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

call_oai_grm Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/deepscaler/deepscaler/utils.py
pointer only (licence: NONE) · get_code("15fcb6b739c07dac")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

construct_prompt Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/utils.py
pointer only (licence: NONE) · get_code("ecdacf069c9d10db")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_answer Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/parser.py
pointer only (licence: NONE) · get_code("951c55f8667c735f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_program Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/parser.py
pointer only (licence: NONE) · get_code("1d961161c71cc153")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_programs_and_outputs Ran
ran, honoured the contract we drafted
ChengpengLi1003/CoRT/deepscaler/deepscaler/rewards/math_reward_hybrid.py
pointer only (licence: NONE) · get_code("d71007c81129b37f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_prompt Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/utils.py
pointer only (licence: NONE) · get_code("3bb02b5083de68fd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

lower_keys Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from QwenLM/Qwen2.5-Math, is pointer only (licence: NONE) · get_code("0af0b06d6cf22524")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_data Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/inference_vllm_dp_mj.py
pointer only (licence: NONE) · get_code("882dab4c9c62e8c0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

strip_string Ran
ran; our contract draft was wrong, not the code
ChengpengLi1003/CoRT/infer/parser.py
pointer only (licence: NONE) · get_code("06b04cb075356fb9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ChengpengLi1003/CoRT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 1 the same month, 1 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
extract_program 5 other papers
5 dated earlier
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
2403.13315 (2024-03)
PuzzleVQA: Diagnosing Multimodal Reasoning Challenges of Language Models with Abstract Visual Patterns
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
and 2 more not named here
lower_keys 5 other papers
2 dated earlier, 1 the same month, 1 later, 1 undated
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
2502.06773 (2025-02)
On the Emergence of Thinking in LLMs I: Searching for the Right Intuition
2510.06307 (2025-10)
Belief-Calibrated Multi-Agent Consensus Seeking for Complex NLP Tasks
and 2 more not named here
strip_string 4 other papers
4 dated earlier
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
2402.06925 (2024-02)
A Thorough Examination of Decoding Methods in the Era of LLMs
2410.15700 (2024-10)
InternLM2.5-StepProver: Advancing Automated Theorem Proving via Critic-Guided Search
and 1 more not named here
construct_prompt 1 other paper
1 dated earlier
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
extract_answer 1 other paper
1 dated earlier
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
load_prompt 1 other paper
1 dated earlier
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large reasoning models (LRMs) like OpenAI-o1 have shown impressive capabilities in natural language reasoning. However, these models frequently demonstrate inefficiencies or inaccuracies when tackling complex mathematical operations. While integrating computational tools such as Code Interpreters (CIs) offers a promising solution, it introduces a critical challenge: a conflict between the model's internal, probabilistic reasoning and the external, deterministic knowledge provided by the CI, which often leads models to unproductive deliberation. To overcome this, we introduce CoRT (Code-Optimized Reasoning Training), a post-training framework designed to teach LRMs to effectively utilize CIs. We propose Hint-Engineering, a new data synthesis strategy that strategically injects diverse hints at optimal points within reasoning paths. This approach generates high-quality, code-integrated reasoning data specifically tailored to optimize LRM-CI interaction. Using this method, we have synthesized 30 high-quality samples to post-train models ranging from 1.5B to 32B parameters through supervised fine-tuning. CoRT further refines the multi-round interleaving of external CI usage and internal thinking by employing rejection sampling and reinforcement learning. Our experimental evaluations demonstrate CoRT's effectiveness, yielding absolute improvements of 4% and 8% on DeepSeek-R1-Distill-Qwen-32B and DeepSeek-R1-Distill-Qwen-1.5B, respectively, across five challenging mathematical reasoning datasets. Moreover, CoRT significantly enhances efficiency, reducing token usage by approximately 30% for the 32B model and 50% for the 1.5B model compared to pure natural language reasoning baselines. The models and code are available at: https://github.com/ChengpengLi1003/CoRT.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2510.20342")
get_code_for_paper("2510.20342")
have("2510.20342")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2510.20342.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2510.20342.svg)](https://syntology.ai/paper/2510.20342)

Connect an agent — have() is free.