CoRT: Code-integrated Reasoning within Thinking
On the map: LLM reasoning → Mathematical reasoning
Abstract (arXiv)
Large Reasoning Models (LRMs) like o1 and DeepSeek-R1 have shown remarkable progress in natural language reasoning with long chain-of-thought (CoT), yet they remain inefficient or inaccurate when handling complex mathematical operations. Addressing these limitations through computational tools (e.g., computation libraries and symbolic solvers) is promising, but it introduces a technical challenge: Code Interpreter (CI) brings external knowledge beyond the model's internal text representations, thus the direct combination is not efficient. This paper introduces CoRT, a post-training framework for teaching LRMs to leverage CI effectively and efficiently. As a first step, we address the data scarcity issue by synthesizing code-integrated reasoning data through Hint-Engineering, which strategically inserts different hints at appropriate positions to optimize LRM-CI interaction. We manually create 30 high-quality samples, upon which we post-train models ranging from 1.5B to 32B parameters, with supervised fine-tuning, rejection fine-tuning and reinforcement learning. Our experimental results demonstrate that Hint-Engineering models achieve 4% and 8% absolute improvements on DeepSeek-R1-Distill-Qwen-32B and DeepSeek-R1-Distill-Qwen-1.5B respectively, across five challenging mathematical reasoning datasets. Furthermore, Hint-Engineering models use about 30% fewer tokens for the 32B model and 50% fewer tokens for the 1.5B model compared with the natural language models. The models and code are available at https://github.com/ChengpengLi1003/CoRT.
Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 47 of its 55 references that are in the map. First posted on arXiv 11 Jun 2025.
Builds on
47 of 55 references.
Closest ancestors · 9
Same direction, newest first
- 2025LIMO: Less is More for Reasoning5 Feb
- 2025rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinking8 Jan
- 2024TheoremLlama: Transforming General-Purpose LLMs into Lean4 Experts3 Jul
- 2024Iterative Reasoning Preference Optimization30 Apr
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models5 Feb
- 2023Llemma: An Open Language Model For Mathematics16 Oct
- 2023ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving29 Sep
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instruct18 Aug
- 2023Scaling Relationship on Learning Mathematical Reasoning with Large Language Models3 Aug
Other references · 38
- 2017Attention Is All You Needcited by 60,361
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2023Let's Verify Step by Stepcited by 3,789
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 2,057
- 2025Understanding R1-Zero-Like Training: A Critical Perspectivecited by 1,345
- 2025s1: Simple test-time scalingcited by 1,341
- 2025Kimi k1.5: Scaling Reinforcement Learning with LLMscited by 1,210
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
26 more
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Trainingcited by 1,053
- 2023Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotationscited by 928
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
- 2023RAFT: Reward rAnked FineTuning for Generative Foundation Model Alignmentcited by 686
- 2022PAL: Program-aided Language Modelscited by 652
- 2022Towards Reasoning in Large Language Models: A Surveycited by 596
- 2025SimpleRL-Zoo: Investigating and Taming Zero Reinforcement Learning for Open Base Models in the Wildcited by 511
- 2025Search-o1: Agentic Search-Enhanced Large Reasoning Modelscited by 433
- 2025ReTool: Reinforcement Learning for Strategic Tool Use in LLMscited by 392
- 2025R1-Searcher: Incentivizing the Search Capability in LLMs via Reinforcement Learningcited by 336
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 294
- 2025Towards Large Reasoning Models: A Survey of Reinforced Reasoning with Large Language Modelscited by 293
- 2024DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Datacited by 234
- 2024Tool Learning with Large Language Models: A Surveycited by 223
- 2024Chain of Agents: Large Language Models Collaborating on Long-Context Taskscited by 206
- 2024APIGen: Automated Pipeline for Generating Verifiable and Diverse Function-Calling Datasetscited by 198
- 2023ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Modelscited by 187
- 2024Multi-Step Reasoning with Large Language Models, a Surveycited by 143
- 2024o1-Coder: an o1 Replication for Codingcited by 78
- 2025An Empirical Study on Eliciting and Improving R1-like Reasoning Modelscited by 78
- 2024Preserving Diversity in Supervised Fine-Tuning of Large Language Modelscited by 70
- 2024A Comparative Study on Reasoning Patterns of OpenAI's o1 Modelcited by 63
- 2025Agent RL Scaling Law: Agent RL with Spontaneous Code Execution for Mathematical Problem Solvingcited by 62
- 2025START: Self-taught Reasoner with Toolscited by 47
- 2025Can Large Language Models Detect Errors in Long Chain-of-Thought Reasoning?cited by 44
Built on by
Citing papers per year: 2025: 9; 2026: 6.
15 papers.
Sort:
By area:
- 2025A Survey of Reinforcement Learning for Large Reasoning Modelscited by 180
- 2025Agentic Reinforced Policy Optimizationcited by 172
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025RECODE-H: A Benchmark for Research Code Development with Interactive Human Feedbackcited by 25
- 2025A Survey on Agentic Multimodal Large Language Modelscited by 23
- 2025Toward Effective Tool-Integrated Reasoning via Self-Evolved Preference Learningcited by 17
- 2025AgentMath: Empowering Mathematical Reasoning for Large Language Models via Tool-Augmented Agentcited by 17
- 2026NeuReasoner: Towards Explainable, Controllable, and Unified Reasoning via Mixture-of-Neuronscited by 14
- 2026Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verificationcited by 5
- 2026ET-Agent: Incentivizing Effective Tool-Integrated Reasoning Agent via Behavior Calibrationcited by 4
- 2025Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solvingcited by 3
- 2025CALM Before the STORM: Unlocking Native Reasoning for Optimization Modelingcited by 3
3 more
- 2026Teaching Thinking Models to Reason with Tools: A Full-Pipeline Recipe for Tool-Integrated Reasoningcited by 2
- 2026Contrastive Reinforced Policy Optimization via Privileged Self-Distillationcited by 1
- 2026Customer-Agent: Overcoming Context Limitations in Ultra-Long Shopping Trajectories via Tool-Augmented Agents and RLVRcited by 0
- 2026Contrastive Reinforced Policy Optimization via Privileged Self-Distillation30 Jul 2026
- 2026Customer-Agent: Overcoming Context Limitations in Ultra-Long Shopping Trajectories via Tool-Augmented Agents and RLVR6 Jun 2026
- 2026Teaching Thinking Models to Reason with Tools: A Full-Pipeline Recipe for Tool-Integrated Reasoning7 May 2026
- 2026NeuReasoner: Towards Explainable, Controllable, and Unified Reasoning via Mixture-of-Neurons3 Apr 2026
- 2026Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verification30 Jan 2026
- 2026ET-Agent: Incentivizing Effective Tool-Integrated Reasoning Agent via Behavior Calibration11 Jan 2026
- 2025AgentMath: Empowering Mathematical Reasoning for Large Language Models via Tool-Augmented Agent23 Dec 2025
- 2025A Survey on Agentic Multimodal Large Language Models13 Oct 2025
- 2025RECODE-H: A Benchmark for Research Code Development with Interactive Human Feedback7 Oct 2025
- 2025CALM Before the STORM: Unlocking Native Reasoning for Optimization Modeling5 Oct 2025
- 2025Toward Effective Tool-Integrated Reasoning via Self-Evolved Preference Learning27 Sep 2025
- 2025A Survey of Reinforcement Learning for Large Reasoning Models10 Sep 2025
3 more
- 2025Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solving12 Aug 2025
- 2025Agentic Reinforced Policy Optimization26 Jul 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025A Survey of Reinforcement Learning for Large Reasoning Modelscited by 180
- 2025Agentic Reinforced Policy Optimizationcited by 172
- 2025Toward Effective Tool-Integrated Reasoning via Self-Evolved Preference Learningcited by 17
- 2025AgentMath: Empowering Mathematical Reasoning for Large Language Models via Tool-Augmented Agentcited by 17
- 2026NeuReasoner: Towards Explainable, Controllable, and Unified Reasoning via Mixture-of-Neuronscited by 14
- 2026Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verificationcited by 5
- 2026ET-Agent: Incentivizing Effective Tool-Integrated Reasoning Agent via Behavior Calibrationcited by 4
- 2025Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solvingcited by 3
- 2025CALM Before the STORM: Unlocking Native Reasoning for Optimization Modelingcited by 3
- 2026Teaching Thinking Models to Reason with Tools: A Full-Pipeline Recipe for Tool-Integrated Reasoningcited by 2
- 2026Teaching Thinking Models to Reason with Tools: A Full-Pipeline Recipe for Tool-Integrated Reasoning7 May 2026
- 2026NeuReasoner: Towards Explainable, Controllable, and Unified Reasoning via Mixture-of-Neurons3 Apr 2026
- 2026Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verification30 Jan 2026
- 2026ET-Agent: Incentivizing Effective Tool-Integrated Reasoning Agent via Behavior Calibration11 Jan 2026
- 2025AgentMath: Empowering Mathematical Reasoning for Large Language Models via Tool-Augmented Agent23 Dec 2025
- 2025CALM Before the STORM: Unlocking Native Reasoning for Optimization Modeling5 Oct 2025
- 2025Toward Effective Tool-Integrated Reasoning via Self-Evolved Preference Learning27 Sep 2025
- 2025A Survey of Reinforcement Learning for Large Reasoning Models10 Sep 2025
- 2025Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solving12 Aug 2025
- 2025Agentic Reinforced Policy Optimization26 Jul 2025
- 2025A Survey on Agentic Multimodal Large Language Modelscited by 23
- 2025A Survey on Agentic Multimodal Large Language Models13 Oct 2025
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2025Teaching Language Models to Reason with Tools
- 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
- 2026Teaching Language Models to Think in Code
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Prediction
- 2025Code-enabled language models can outperform reasoning models on diverse tasks
- 2025R1-Code-Interpreter: LLMs Reason with Code via Supervised and Multi-stage Reinforcement Learning
- 2026HintMR: Eliciting Stronger Mathematical Reasoning in Small Language Models
- 2025Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning