Code Soliloquies for Accurate Calculations in Large Language Models
Not on the map. Why?
Abstract (arXiv)
High-quality conversational datasets are crucial for the successful development of Intelligent Tutoring Systems (ITS) that utilize a Large Language Model (LLM) backend. Synthetic student-teacher dialogues, generated using advanced GPT-4 models, are a common strategy for creating these datasets. However, subjects like physics that entail complex calculations pose a challenge. While GPT-4 presents impressive language processing capabilities, its limitations in fundamental mathematical reasoning curtail its efficacy for such subjects. To tackle this limitation, we introduce in this paper an innovative stateful prompt design. Our design orchestrates a mock conversation where both student and tutorbot roles are simulated by GPT-4. Each student response triggers an internal monologue, or `code soliloquy' in the GPT-tutorbot, which assesses whether its subsequent response would necessitate calculations. If a calculation is deemed necessary, it scripts the relevant Python code and uses the Python output to construct a response to the student. Our approach notably enhances the quality of synthetic conversation datasets, especially for subjects that are calculation-intensive. Our preliminary Subject Matter Expert evaluations reveal that our Higgs model, a fine-tuned LLaMA model, effectively uses Python for computations, which significantly enhances the accuracy and computational reliability of Higgs' responses. Code, models, and datasets is available at https://github.com/luffycodes/Tutorbot-Spock-Phys.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 17 of its 59 references that are in the map. First posted on arXiv 21 Sep 2023.
Builds on
17 of 59 references.
References · 17
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2023Large Language Modelscited by 780
5 more
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 625
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
- 2023Solving Math Word Problems by Combining Language Models With Symbolic Solverscited by 124
- 2023CLASS: A Design Framework for building Intelligent Tutoring Systems based on Learning Science principlescited by 48
- 2020qDKT: Question-centric Deep Knowledge Tracingcited by 24
Built on by
Citing papers per year: 2023: 1; 2024: 7; 2025: 1.
9 papers.
- 2024Improving the Validity of Automatically Generated Feedback via Reinforcement Learningcited by 20
- 2024Pedagogical Alignment of Large Language Modelscited by 19
- 2023Novice Learner and Expert Tutor: Evaluating Math Reasoning Abilities of Large Language Models with Misconceptionscited by 15
- 2024Generative AI for Education (GAIED): Advances, Opportunities, and Challengescited by 13
- 2024Automated Long Answer Grading with RiceChem Datasetcited by 10
- 2024Automatic Generation of Question Hints for Mathematics Problems using Large Language Models in Educational Technologycited by 9
- 2024Evaluating the Impact of Data Augmentation on Predictive Model Performancecited by 3
- 2024Marking: Visual Grading with Highlighting Errors and Annotating Missing Bitscited by 1
- 2025The Imitation Game for Educational AIcited by 1
- 2025The Imitation Game for Educational AI21 Feb 2025
- 2024Evaluating the Impact of Data Augmentation on Predictive Model Performance3 Dec 2024
- 2024Automatic Generation of Question Hints for Mathematics Problems using Large Language Models in Educational Technology5 Nov 2024
- 2024Automated Long Answer Grading with RiceChem Dataset22 Apr 2024
- 2024Marking: Visual Grading with Highlighting Errors and Annotating Missing Bits22 Apr 2024
- 2024Improving the Validity of Automatically Generated Feedback via Reinforcement Learning2 Mar 2024
- 2024Pedagogical Alignment of Large Language Models7 Feb 2024
- 2024Generative AI for Education (GAIED): Advances, Opportunities, and Challenges2 Feb 2024
- 2023Novice Learner and Expert Tutor: Evaluating Math Reasoning Abilities of Large Language Models with Misconceptions3 Oct 2023
Similar, not cited
Close in wording, no citation either way
- 2024MIND: Math Informed syNthetic Dialogues for Pretraining LLMs
- 2023Assessing the Impact of Prompting Methods on ChatGPT's Mathematical Capabilities
- 2023Comparative Analysis of GPT-4 and Human Graders in Evaluating Praise Given to Students in Synthetic Dialogues
- 2024MathChat: Benchmarking Mathematical Reasoning and Instruction Following in Multi-Turn Interactions
- 2025Efficient RL for optimizing conversation level outcomes with an LLM-based tutor
- 2023MathChat: Converse to Tackle Challenging Math Problems with LLM Agents
- 2026Simulated Students in Tutoring Dialogues: Substance or Illusion?
- 2025CoDAE: Adapting Large Language Models for Education via Chain-of-Thought Data Augmentation