Abstract
Large language models (LLMs) can transform education, but their optimization for direct question-answering often undermines effective pedagogy which requires strategically withholding answers. To mitigate this, we propose an online reinforcement learning (RL)-based alignment framework that can quickly adapt LLMs into effective tutors using simulated student-tutor interactions by emphasizing pedagogical quality and guided problem-solving over simply giving away answers. We use our method to train a 7B parameter tutor model without human annotations which reaches similar performance to larger proprietary models like LearnLM. We introduce a controllable reward weighting to balance pedagogical support and student solving accuracy, allowing us to trace the Pareto frontier between these two objectives. Our models better preserve reasoning capabilities than single-turn SFT baselines and can optionally enhance interpretability through thinking tags that expose the model's instructional planning.
Introduction: The Challenge of Pedagogical Alignment
Standard Large Language Models (LLMs) are typically fine-tuned to be "helpful assistants," a goal usually achieved by providing direct, correct answers as efficiently as possible. In an educational context, however, this behavior is counterproductive. Effective teaching requires scaffolding: the strategic withholding of answers in favor of hints, Socratic questioning, and guidance that allows a student to discover the solution independently.
Existing attempts to build LLM tutors often rely on Supervised Fine-Tuning (SFT) on static datasets. These methods frequently fail to capture the dynamic, multi-turn nature of tutoring—where a tutor must adapt to a student's specific misconceptions—and often suffer from "answer leakage," where the model prematurely provides the solution to be "helpful."
Methodology: Online RL for Scaffolding
To address these limitations, we propose an online reinforcement learning (RL) alignment framework using Group Relative Policy Optimization (GRPO). This approach utilizes a simulated environment where a Tutor model (initialized from Qwen-2.5-7B-Instruct) interacts with a fixed Student model (Llama-3.1-8B-Instruct) over multiple turns to solve math problems.
The Tutor is optimized based on a multi-objective reward calculated at the end of each interaction:
- Post-dialog Solve Rate: Measures if the student can solve the problem independently after the interaction.
- Pedagogical Quality: A panel of LLM "judges" penalizes the tutor for answer leakage or poor instructional guidance using a weight parameter ($\lambda$).
This framework also incorporates "Thinking Tags" (<think>), enabling the tutor to perform internal instructional planning before generating a response, which improves both performance and interpretability.
Results: Navigating the Pareto Frontier
Our RL-based approach allows for the precise control of the trade-off between student success and pedagogical integrity. By adjusting the penalty weight ($\lambda$), we can trace a Pareto frontier that outperforms standard baselines and matches the performance of significantly larger proprietary systems.
Key Findings
- Competitive Performance: Our 7B-parameter model achieves results comparable to specialized models like LearnLM-1.5 Pro and GPT-4o in tutoring scenarios. At $\lambda = 0.75$, the model reaches a "sweet spot" with a ~25% improvement in student solve rate and only ~10% answer leakage.
- Online vs. Offline Learning: Unlike SFT or offline DPO, our online RL approach allows the model to learn from its own real-time successes and failures, preventing the "context drift" common in static training.
- Reasoning Preservation: RL-based alignment preserves the model's base reasoning capabilities (e.g., MMLU, GSM8K) much more effectively than SFT. The internal "thinking" process required for tutoring may even slightly enhance standard math performance.
- Zero Human Labels: The entire pipeline is synthetic, demonstrating that high-level pedagogical alignment can be achieved without expensive, human-annotated preference data.
Limitations and Future Work
While promising, this framework currently relies on an LLM to simulate a student, which may not fully capture the diverse misconceptions or emotional states of human learners. Furthermore, the reward is currently tied to immediate problem-solving rather than long-term knowledge retention or transfer learning. Future research will focus on extending this methodology to more subjective disciplines, such as literature or history, where verifying "correctness" is more complex than in mathematics.
Summary updated