mlsanityData to 14 Oct 2026

Code Soliloquies for Accurate Calculations in Large Language Models

arXiv 2309.12161 ↗First posted 21 Sep 2023cs.CLcited by 9

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

  1. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  6. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  7. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  8. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  9. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  10. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
  11. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  12. 2023Large Language Modelscited by 780
5 more
  1. 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 625
  2. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
  3. 2023Solving Math Word Problems by Combining Language Models With Symbolic Solverscited by 124
  4. 2023CLASS: A Design Framework for building Intelligent Tutoring Systems based on Learning Science principlescited by 48
  5. 2020qDKT: Question-centric Deep Knowledge Tracingcited by 24

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 7; 2025: 1.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024MIND: Math Informed syNthetic Dialogues for Pretraining LLMs
  2. 2023Assessing the Impact of Prompting Methods on ChatGPT's Mathematical Capabilities
  3. 2023Comparative Analysis of GPT-4 and Human Graders in Evaluating Praise Given to Students in Synthetic Dialogues
  4. 2024MathChat: Benchmarking Mathematical Reasoning and Instruction Following in Multi-Turn Interactions
  5. 2025Efficient RL for optimizing conversation level outcomes with an LLM-based tutor
  6. 2023MathChat: Converse to Tackle Challenging Math Problems with LLM Agents
  7. 2026Simulated Students in Tutoring Dialogues: Substance or Illusion?
  8. 2025CoDAE: Adapting Large Language Models for Education via Chain-of-Thought Data Augmentation