mlsanityData to 14 Oct 2026

When Do Program-of-Thoughts Work for Reasoning?

arXiv 2308.15452 ↗First posted 29 Aug 2023cs.CL cs.AI cs.LGcited by 19

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

In the realm of embodied artificial intelligence, the reasoning capabilities of Large Language Models (LLMs) play a pivotal role. Although there are effective methods like program-of-thought prompting for LLMs which uses programming language to tackle complex reasoning tasks, the specific impact of code data on the improvement of reasoning capabilities remains under-explored. To address this gap, we propose complexity-impacted reasoning score (CIRS), which combines structural and logical attributes, to measure the correlation between code and reasoning abilities. Specifically, we use the abstract syntax tree to encode the structural information and calculate logical complexity by considering the difficulty and the cyclomatic complexity. Through an empirical analysis, we find not all code data of complexity can be learned or understood by LLMs. Optimal level of complexity is critical to the improvement of reasoning abilities by program-aided prompting. Then we design an auto-synthesizing and stratifying algorithm, and apply it to instruction generation for mathematical reasoning and code data filtering for code generation tasks. Extensive results demonstrates the effectiveness of our proposed approach. Code will be integrated into the EasyInstruct framework at https://github.com/zjunlp/EasyInstruct.

Key facts. Cited by 19 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 39 of its 50 references that are in the map. First posted on arXiv 29 Aug 2023.

Builds on

39 of 50 references.

References · 39

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  6. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
  7. 2023A Survey of Large Language Modelscited by 2,576
  8. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
  9. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
  10. 2023PaLM 2 Technical Reportcited by 1,162
  11. 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,081
  12. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
27 more
  1. 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 878
  2. 2023VoxPoser: Composable 3D Value Maps for Robotic Manipulation with Language Modelscited by 750
  3. 2022PAL: Program-aided Language Modelscited by 652
  4. 2017Program Induction by Rationale Generation : Learning to Solve and Explain Algebraic Word Problemscited by 650
  5. 2022Towards Reasoning in Large Language Models: A Surveycited by 596
  6. 2023Scaling Relationship on Learning Mathematical Reasoning with Large Language Modelscited by 427
  7. 2022Complexity-Based Prompting for Multi-Step Reasoningcited by 388
  8. 2023Orca: Progressive Learning from Complex Explanation Traces of GPT-4cited by 379
  9. 2016Solving General Arithmetic Word Problemscited by 360
  10. 2021A Diverse Corpus for Evaluating and Developing English Math Word Problem Solverscited by 318
  11. 2022Reasoning with Language Model Prompting: A Surveycited by 252
  12. 2023Specializing Smaller Language Models towards Multi-Step Reasoningcited by 251
  13. 2023MathPrompter: Mathematical Reasoning using Large Language Modelscited by 236
  14. 2022Binding Language Models in Symbolic Languagescited by 228
  15. 2021KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extractioncited by 180
  16. 2020Measuring Association Between Labels and Free-Text Rationalescited by 160
  17. 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
  18. 2020The Right Tool for the Job: Matching Model and Instance Complexitiescited by 126
  19. 2023Why think step by step? Reasoning emerges from the locality of experiencecited by 103
  20. 2023Chain-of-Thought Hub: A Continuous Effort to Measure Large Language Models' Reasoning Performancecited by 102
  21. 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 68
  22. 2023CodeKGC: Code Language Model for Generative Knowledge Graph Constructioncited by 28
  23. 2022LogicSolver: Towards Interpretable Math Word Problem Solving with Logical Prompt-enhanced Learningcited by 24
  24. 2023The Magic of IF: Investigating Causal Reasoning Abilities in Large Language Models of Codecited by 21
  25. 2022Tele-Knowledge Pre-training for Fault Analysiscited by 18
  26. 2023Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large Language Modelscited by 16
  27. 2023Can NLP Models Correctly Reason Over Contexts that Break the Common Assumptions?cited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 9; 2024: 4; 2025: 5; 2026: 1.

19 papers.

Sort:

By area:

  1. 2025s1: Simple test-time scalingcited by 1,341
  2. 2023Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotationscited by 928
  3. 2023Cognitive Mirage: A Review of Hallucinations in Large Language Modelscited by 84
  4. 2023Igniting Language Intelligence: The Hitchhiker's Guide From Chain-of-Thought Reasoning to Language Agentscited by 72
  5. 2023Applying Large Language Models and Chain-of-Thought for Automatic Scoringcited by 69
  6. 2023Making Large Language Models Better Reasoners with Alignmentcited by 63
  7. 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
  8. 2025TreeRPO: Tree Relative Policy Optimizationcited by 46
  9. 2024LLM Critics Help Catch Bugs in Mathematics: Towards a Better Mathematical Verifier with Natural Language Feedbackcited by 41
  10. 2024Understanding Reasoning Ability of Language Models From the Perspective of Reasoning Paths Aggregationcited by 22
  11. 2023Large Knowledge Model: Perspectives and Challengescited by 12
  12. 2024A Theory for Length Generalization in Learning to Reasoncited by 11
7 more
  1. 2023Towards A Unified View of Answer Calibration for Multi-Step Reasoningcited by 8
  2. 2023R3-NL2GQL: A Model Coordination and Knowledge Graph Alignment Approach for NL2GQLcited by 7
  3. 2023Conditions for Length Generalization in Learning Reasoning Skillscited by 7
  4. 2025Pensez: Less Data, Better Reasoning -- Rethinking French LLMcited by 5
  5. 2025Formula-R1: Incentivizing LLM Reasoning over Complex Tables with Numerical Computation via Formula-Driven Reinforcement Learningcited by 3
  6. 2024EasyInstruct: An Easy-to-use Instruction Processing Framework for Large Language Modelscited by 0
  7. 2026When Financial Fine-tuning Fails: A Three-Level Detectability Analysis of Numerical Hallucination in Domain-Adapted Language Modelscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning
  2. 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
  3. 2025On Code-Induced Reasoning in LLMs
  4. 2025Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment
  5. 2024On the Empirical Complexity of Reasoning and Planning in LLMs
  6. 2025The Illusion of Thinking: Understanding the Strengths and Limitations of Reasoning Models via the Lens of Problem Complexity
  7. 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
  8. 2025Thinking Isn't an Illusion: Overcoming the Limitations of Reasoning Models via Tool Augmentations