SageMath lifts LLM agents' math performance by 9.7pp on average

Researchers integrated SageMath, a computer algebra system, into LLM agents and tested it on frontier models such as GPT-5.5. Every model tested improved, by 9.7pp on average. GPT-5.5 reaches a 75.2% solve rate on math problems, while Qwen 3.7-Max gains the most (+27.8pp). The takeaway: algebra systems inside LLM agents look like a promising route to automated discovery of new mathematical conjectures.

AI-processed from arXiv cs.AI; edited by Hamidun News
SageMath lifts LLM agents' math performance by 9.7pp on average
Source: arXiv cs.AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourcearXiv cs.AI ↗
Editor-in-Chief
Key metric #1ReAct architecture for step-by-step logical reasoning
Key metric #2SageMath for checking and executing algebraic operations
Key metric #3Context7 for access to up-to-date SageMath documentation

Researchers have proposed a method for integrating SageMath, a computer algebra system, with LLM agents to solve research-level math problems. The results show a consistent performance gain of +9.7pp on average, with a maximum gain of 27.8pp for the Qwen 3.7-Max model.

How the algebra system was built into the LLM

SageMath is free software for mathematical computation, covering symbolic algebra, number theory and visualization. The researchers embedded it in a ReAct-style agent, an architecture that lets an LLM reason step by step, calling tools and analyzing their results.

The integration includes:

  • ReAct architecture for step-by-step logical reasoning
  • SageMath for checking and executing algebraic operations
  • Context7 for access to up-to-date SageMath documentation
  • The RealMath benchmark of research-level math problems

This combination lets the LLM do more than "guess" answers: it can verify intermediate results and guarantee that computations are correct.

What results the models showed

In tests on frontier models, the system delivered a steady performance gain. GPT-5.5 leads in absolute performance: a 75.2% solve rate and the lowest token consumption of all tool-enabled configurations.

Qwen 3.7-Max got the largest relative gain: +27.8pp thanks to the SageMath integration. Improvements across all tested models ranged from 1.5pp to 27.8pp.

The researchers also proposed an improvement to the RealMath benchmark itself, adding multi-stage checking and validation so that the extracted problems are higher quality and more reliable.

Key figures:

  • Average improvement: +9.7pp
  • Gain range: 1.5pp – 27.8pp
  • GPT-5.5 reaches a 75.2% solve rate
  • Qwen 3.7-Max gets the largest gain from SageMath

Why mathematicians should care

Mathematicians and AI developers are looking for ways to automate the research process, the familiar "computation loop" in which a scientist formulates a hypothesis, checks the calculations, analyzes the results and moves on to the next idea.

CAS agents can speed up this loop considerably: they can check complex algebraic derivations in seconds, find patterns in numerical sequences, help formulate and test hypotheses, and avoid calculation errors.

The authors see this as a path toward automated discovery of new mathematical conjectures, an area where LLMs previously often made mistakes or needed a lot of human help.

What it means

The study points to a basic truth: choosing the right tool can qualitatively change an LLM's capacity for logical reasoning. SageMath is not the first algebra system, but this is the first major study of its integration into frontier LLMs at the performance level. The next step is to broaden the set of CAS systems (Mathematica, Maple) and optimize the integration for other types of problems in physics and engineering.

Story

Key Questions Answered

How the algebra system was built into the LLM?

SageMath is free software for mathematical computation, covering symbolic algebra, number theory and visualization. The researchers embedded it in a ReAct-style agent, an architecture that lets an LLM reason step by step, calling tools and analyzing their results. The integration includes: ReAct architecture for step-by-step logical reasoning SageMath for checking and executing algebraic operations Context7 for access to up-to-date SageMath documentation The RealMath benchmark of research-level math problems This combination lets the LLM do more than "guess" answers: it can

What results the models showed?

In tests on frontier models, the system delivered a steady performance gain. GPT-5.5 leads in absolute performance: a 75.2% solve rate and the lowest token consumption of all tool-enabled configurations. Qwen 3.7-Max got the largest relative gain: +27.8pp thanks to the SageMath integration. Improvements across all tested models ranged from 1.5pp to 27.8pp. The researchers also proposed an improvement to the RealMath benchmark itself, adding multi-stage checking and validation so that the extracted problems are higher quality and more reliable. Key figures: Average improveme

Why mathematicians should care?

Mathematicians and AI developers are looking for ways to automate the research process, the familiar "computation loop" in which a scientist formulates a hypothesis, checks the calculations, analyzes the results and moves on to the next idea. CAS agents can speed up this loop considerably: they can check complex algebraic derivations in seconds, find patterns in numerical sequences, help formulate and test hypotheses, and avoid calculation errors. The authors see this as a path toward automated discovery of new mathematical conjectures, an area where LLMs previously often m

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…