CoRT: Code-integrated Reasoning within Thinking
Chengpeng Li, Zhengyang Tang, Ziniu Li, Mingfeng Xue, Keqin Bao, Tian Ding, Ruoyu Sun, Benyou Wang, Xiang Wang, Junyang Lin, Dayiheng Liu

TL;DR
CoRT is a post-training framework that enhances large reasoning models' ability to perform complex mathematical reasoning by effectively integrating code interpreters through strategic hint-engineering and fine-tuning.
Contribution
The paper introduces CoRT, a novel post-training method that improves LRM performance on mathematical reasoning by synthesizing data with hints and fine-tuning models to better leverage code interpreters.
Findings
Models with Hint-Engineering improve accuracy by up to 8%.
Hint-Engineering reduces token usage by 30-50%.
Effective integration of code interpreters enhances reasoning performance.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Multimodal Machine Learning Applications · Artificial Intelligence in Games
