Iterative In-Context Learning to Enhance LLMs Abstract Reasoning: The Case-Study of Algebraic Tasks
On the map: LLM reasoning → Mathematical reasoning
Abstract (arXiv)
LLMs face significant challenges in systematic generalization, particularly when dealing with reasoning tasks requiring compositional rules and handling out-of-distribution examples. To address these challenges, we introduce an in-context learning methodology that improves the generalization capabilities of general purpose LLMs. Our approach employs an iterative example selection strategy, which incrementally constructs a tailored set of few-shot examples optimized to enhance model's performance on a given task. As a proof of concept, we apply this methodology to the resolution of algebraic expressions involving non-standard simplification rules, according to which the priority of addition and multiplication is changed. Our findings indicate that LLMs exhibit limited proficiency in these mathematical tasks. We further demonstrate that LLMs reasoning benefits from our iterative shot selection prompting strategy integrated with explicit reasoning instructions. Crucially, our experiments reveal that some LLMs achieve better generalization performances when prompted with simpler few-shot examples rather than complex ones following the test data distribution.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 24 of its 28 references that are in the map. First posted on arXiv 1 Sep 2025.
Builds on
24 of 28 references.
Closest ancestors · 5
Same direction, newest first
- 2024Skywork-Math: Data Scaling Laws for Mathematical Reasoning in Large Language Models -- The Story Goes On11 Jul
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instruct18 Aug
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning models14 Mar
- 2022Solving Quantitative Reasoning Problems with Language Models29 Jun
- 2020Generative Language Modeling for Automated Theorem Proving7 Sep
Other references · 19
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
- 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,075
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
- 2025The Illusion of Thinking: Understanding the Strengths and Limitations of Reasoning Models via the Lens of Problem Complexitycited by 302
- 2019Deep Learning for Symbolic Mathematicscited by 270
- 2019Compositionality decomposed: how do neural networks generalise?cited by 265
- 2024DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Datacited by 234
- 2022HyperTree Proof Search for Neural Theorem Provingcited by 197
- 2018Learning to Perform Local Rewriting for Combinatorial Optimizationcited by 185
- 2023Active Prompting with Chain-of-Thought for Large Language Modelscited by 154
7 more
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
- 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
- 2018Memorize or generalize? Searching for a compositional RNN in a haystackcited by 41
- 2022JiuZhang: A Chinese Pre-trained Language Model for Mathematical Problem Understandingcited by 15
- 2023Interpretable Graph Networks Formulate Universal Algebra Conjecturescited by 4
- 2017Learning of Human-like Algebraic Reasoning Using Deep Feedforward Neural Networkscited by 3
- 2024A Neural Rewriting System to Solve Algorithmic Problemscited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis
- 2025Teaching LLMs According to Their Aptitude: Adaptive Reasoning for Mathematical Problem Solving
- 2024Benchmarking Large Language Models for Math Reasoning Tasks
- 2023Fewer is More: Boosting LLM Reasoning with Reinforced Context Pruning
- 2025Thinking Machines: Mathematical Reasoning in the Age of LLMs
- 2024Towards Learning to Reason: Comparing LLMs with Neuro-Symbolic on Arithmetic Relations in Abstract Reasoning
- 2025AbstRaL: Augmenting LLMs' Reasoning by Reinforcing Abstract Thinking
- 2023MinT: Boosting Generalization in Mathematical Reasoning via Multi-View Fine-Tuning