View Article

  • Restraint Versus Depth: Evaluating Open and Proprietary Large Language Models as Socratic Programming Tutors, with a Privacy-Preserving Local Deployment

  • Department of Computer Science and Engineering, Kolhapur Institute of Technology’s College of Engineering (Empowered Autonomous), Kolhapur.

Abstract

Large language models (LLMs) are increasingly used as programming tutors, yet there is little agreement on how to judge whether a tutor’s question is pedagogically good, and the most capable tutors run on proprietary cloud services that receive students’ code. This study evaluates six systems on Socratic questioning for novice code debugging: three local variants of the open Mistral-7B-Instruct model (untrained, supervised fine-tuned, and further aligned with Direct Preference Optimization) and three proprietary models (GPT-4o, Claude and Gemini). Questions generated for 68 held-out dialogue turns of the Socratic Debugging Benchmark were assessed with eleven reference-based, diversity and rubric-based measures, including two independent LLM judges scoring seven pedagogical dimensions. The measures disagreed sharply. BERTScore F1 varied only from 0.881 to 0.892 across all six systems, and the system rankings produced by ROUGE-L, BLEU and BERTScore were unrelated to the judges’ ranking (Kendall’s ? between ?0.28 and 0.20), whereas the judges agreed with each other (Spearman ? = 0.72). The judges revealed two distinct profiles: proprietary models asked deeper questions (overall quality 3.75–4.03 on a 1–5 scale), while the preference-aligned local model was the least leading of all systems (non-leading score 4.35 against 3.67–3.92) but also the least varied. To make the local model usable by teachers, we built Socratic Studio, a browser-based application that serves the 4-bit model on a 16 GB laptop without any network connection; reusing the transformer’s key–value cache and stopping generation at the end of each question reduced the time for three candidate questions from 20–30 s to 4–7 s. The findings argue for multi-dimensional evaluation of AI tutors and show that a private, zero-cost local tutor is practical, with depth of questioning as its main remaining gap.

Keywords

Socratic questioning, intelligent tutoring systems, programming education, large language models, LLM-as-a-judge, evaluation metrics, on-device AI, educational technology

Introduction

× Popup Image

Learning to program is, to a large extent, learning to debug. Novices who are simply told where their error lies often fix the immediate problem without understanding why it occurred, whereas novices who are led to discover the error themselves build the habits of tracing, hypothesising and testing that transfer to new programs. Socratic questioning, in which a tutor asks a sequence of questions that bring the learner to the answer without stating it, is a long-standing way of producing such discovery [1]. Its limitation has always been cost: it requires a skilled tutor’s sustained one-to-one attention, which large classes and online courses cannot provide.

Large language models (LLMs) appear to remove this limitation, since they can converse about code at any hour and at scale [2]. In practice, however, LLM tutors tend to be over-helpful. When a student asks for help with a buggy function, a general-purpose model often names the faulty line, explains the bug or proposes the fix, which removes precisely the cognitive work that Socratic tutoring is meant to provoke [3,4]. Two practical questions follow for anyone who wants to deploy such a tutor in a course.

The first is how to tell a good Socratic question from a poor one at scale. Research on automatic question generation has relied heavily on reference-based metrics such as BLEU, ROUGE and BERTScore, which score a generated question by its similarity to a question written by a human tutor [5]. Whether such similarity reflects pedagogical value has been questioned [4] but rarely tested directly on Socratic debugging data. LLM-based judges offer a rubric-based alternative, but their reliability for pedagogical dimensions is itself uncertain [6,7].

The second is where the tutor runs. The strongest models are proprietary, charge per use and require each student’s code and conversation to be sent to an external provider. For many institutions, including resource-constrained colleges, per-use fees and data-protection obligations are real barriers. Small open models can run locally, but it is not obvious that they can be made fast enough for interactive use on ordinary hardware, or how their questions compare with those of frontier models.

This paper addresses both questions through a comparative evaluation and a working deployment. In a companion paper [8] we describe how an open 7-billion-parameter model was adapted for Socratic debugging with supervised fine-tuning and Direct Preference Optimization on a 16 GB laptop. Here we take that model as one of six systems and focus on evaluation and deployment. The study is guided by three research questions:

RQ1. Do reference-based similarity metrics and rubric-based LLM judges agree on how good the Socratic questions of different systems are?

RQ2. How do the pedagogical profiles of small local models and proprietary frontier models differ?

RQ3. Can a local 7B Socratic tutor be served interactively on a consumer laptop, and at what cost in speed relative to cloud models?

The paper makes four contributions. First, it reports an evaluation of six systems on all 68 unique held-out turns of the Socratic Debugging Benchmark with eleven measures, two independent judges and corrected significance tests. Second, it quantifies how far the measures disagree, at the level of both scores and system rankings. Third, it identifies a trade-off between restraint and depth that separates local and proprietary models. Fourth, it presents Socratic Studio, an offline application for teachers, and the inference optimisations that make it responsive on a laptop.

LITERATURE REVIEW:

Socratic questioning in programming education:

Socratic questioning asks learners to clarify their thinking, examine assumptions and consider consequences rather than receive answers [1]. In tutoring terms, it keeps the learner within the zone of proximal development, where a well-placed prompt allows the learner to complete a step they could not complete alone [9,10]. Meta-analytic evidence shows that human one-to-one tutoring and well-designed intelligent tutoring systems produce substantial learning gains [11], and dialogue-based systems such as AutoTutor demonstrated that natural-language questioning can be automated in constrained domains [12]. Programming debugging is a natural target because the tutor knows the bug and the fix, and the pedagogical task is to withhold them while guiding the learner towards them.

LLM-based Socratic tutors for programming:

Al-Hossami et al. [3] released the Socratic Debugging Benchmark, a collection of tutor–student dialogues in which tutors guide novices to find bugs in short Python functions, and reported that GPT-3.5 and GPT-4 frequently produced invalid questions: irrelevant, repetitive, or so direct that they revealed the bug. Subsequent work examined prompting strategies [13] and multi-turn planning with a question tree [14]. Ashok Kumar and Lan [5] generated invalid questions to create preference pairs and trained a 7B open model with Direct Preference Optimization [15], reporting gains on ROUGE-L. Preference-based training has also been applied to math tutors, with preferences derived from simulated student outcomes and rubric judges [16]. Across these works, evaluation is either reference-based or uses a single judging scheme, and deployment is assumed to take place on cloud or data-centre hardware.

Evaluating tutor responses:

Reference-based metrics compare a generated text with one or more references through n-gram overlap (BLEU[17], ROUGE[18]) or contextual embeddings (BERTScore[19], Sentence-BERT[20]). They are cheap and reproducible, but a pedagogically sound question can differ from every reference in wording and focus, and embedding-based scores occupy a narrow range for any pair of fluent English sentences. Diversity metrics such as Distinct-n [21] and Self-BLEU [22] capture whether a system repeats itself. Maurya et al. [4] proposed an eight-dimension taxonomy for tutor responses, including whether the answer is revealed and whether guidance is provided, and argued that reference metrics do not capture these values. The BEA 2025 shared task on pedagogical ability assessment showed that even the best automatic assessors reached only moderate agreement with human annotations on these dimensions [6]. LLM-as-a-judge evaluation [7] scales rubric scoring, but judges can favour outputs resembling their own [23].

Running language models locally:

Quantisation and parameter-efficient adaptation make 7B-class models usable on modest hardware: 4-bit weights reduce memory roughly fourfold, and low-rank adapters add only a small number of trainable parameters [24,25]. Apple’s MLX framework runs such models on the unified memory of Apple silicon laptops [26]. For interactive serving, the main cost of autoregressive generation is reprocessing long prompts; caching the attention keys and values of a shared prompt prefix avoids recomputation and is a standard technique in serving systems [27]. Its value for educational tools, whose prompts contain long, repeated problem descriptions and code, has received little attention.

Research gap:

Prior work has not (a) measured, on Socratic debugging data, how far reference-based metrics and rubric judges disagree across both local and frontier systems, (b) characterised the qualitative difference between the questions these two classes of model ask, or (c) shown a complete, offline Socratic tutor running interactively on a consumer laptop. This paper addresses all three.

MATERIALS AND METHODS:

Task and data:

Each test item is one turn of a tutoring dialogue. The input contains a problem statement with test cases, the student’s buggy code with numbered lines, a description of the bug, a description of the fix and the conversation so far, ending with the student’s latest message. The system must produce the tutor’s next question, which should help the student progress towards the bug without revealing it. Items come from the held-out test split of the Socratic Debugging Benchmark [3], which covers four problems and six buggy programs that do not occur in any training data used for the local models. Because a dialogue and its alternative conversational threads share their opening turns, turns with identical context were merged, giving 68 unique turns with on average 2.62 acceptable human reference questions each.

Systems compared:

Six systems were evaluated (Table 1). The three local systems share the same base model, Mistral-7B-Instruct v0.3 [28], quantised to 4 bits: the untrained model; a model trained by supervised fine-tuning (SFT) on 684 tutor questions; and a model further trained with Direct Preference Optimization (DPO) to prefer human tutor questions over automatically generated invalid ones. Training details are reported in the companion paper. The local models received the prompt template used in training and decoded greedily. The three proprietary models received the same information in a chat format with a system instruction to ask exactly one Socratic question that guides the student without revealing the bug or suggesting a fix; output was limited to 120 tokens at temperature 0 where the interface allowed it. For all systems only the first line of output was kept.

Table 1: Systems Compared

System Type Size Runs where Cost per question
Base Mistral-7B-Instruct v0.3, untrained 7B, 4-bit Local laptop None
SFT Base + supervised fine-tuning 7B, 4-bit Local laptop None
SFT+DPO SFT + Direct Preference Optimization 7B, 4-bit Local laptop None
GPT-4o Proprietary (gpt-4o) Undisclosed Cloud API Per-token fee
Claude Proprietary (claude-sonnet-5) Undisclosed Cloud API Per-token fee
Gemini Proprietary (gemini-3.8-flash) Undisclosed Cloud API Per-token fee

Evaluation framework:

Questions were assessed with five families of measures, summarised in Table 2. For the reference-based measures, each generated question was compared with every acceptable reference for its turn and the best match kept.

Table 2: Families of Evaluation Measures

Family Measures What it captures Needs a reference?
Lexical similarity ROUGE-1/2/L F1, BLEU Word and phrase overlap with tutor questions Yes
Semantic similarity BERTScore P/R/F1, Sentence-BERT cosine Closeness of meaning to tutor questions Yes
Diversity Distinct-1, Distinct-2, Self-BLEU Variety of a system’s questions across turns No
Socratic quality Seven rubric dimensions, two LLM judges Pedagogical qualities of each question No
Practicality Median latency, cost, data locality Feasibility of classroom deployment No

The rubric asked each judge to score a question from 1 to 5 on relevance (does it address the student’s actual problem), Socratic depth (does it probe understanding rather than surface features), open-endedness, critical thinking (does it require the student to reason), non-leading nature (does it avoid revealing the bug or prescribing a fix), clarity and novelty (does it add something beyond earlier turns). The overall score is the unweighted mean of the seven dimensions. Two judges were used independently, GPT-4o and Claude, with the same rubric and examples; their scores were averaged, and their agreement is reported as a check on reliability. Both judges returned valid scores for all 408 questions (68 turns × 6 systems).

Statistical analysis:

Per-turn differences between systems were tested with paired Wilcoxon signed-rank tests [29], with Holm–Bonferroni correction within each family of comparisons, and 95% bootstrap confidence intervals over the 68 turns (10,000 resamples) were computed for the main scores. Agreement between the two judges was measured with Spearman’s ρ over all 408 questions. To compare how the measures rank the six systems, Kendall’s τ was computed between each measure’s system ranking and the judges’ overall ranking. Because only six systems are ranked, these rank correlations are descriptive: with n = 6 only a near-perfect agreement can reach conventional significance.

SOCRATIC STUDIO: DESIGN AND IMPLEMENTATION:

Design requirements:

Socratic Studio was designed around three requirements derived from the deployment question. It must run entirely offline on one machine, so that no student code or conversation leaves it. It must use the model exactly as it was trained and evaluated, so that what teachers see corresponds to the measured performance: the application builds its prompt with the same template function used in training and evaluation, and it returns an error rather than a canned question when the model is unavailable. And it must be transparent, presenting the model’s measured strengths and weaknesses alongside its output.

Architecture:

The application has three tiers (Figure 1). Four static browser pages share a navigation bar: a home page, a Debugging Questions page, a Paragraph Questions page and a Model Performance page. A small server built on Python’s standard HTTP library serves these pages and the evaluation output files and exposes a single generation endpoint. The model tier holds the 4-bit Mistral-7B model with the SFT+DPO adapter, loaded through MLX once at start-up.

figure

Figure 1: Architecture of Socratic Studio

On the Debugging Questions page (Figure 2) a teacher enters the five inputs the model was trained on, or loads one of the six held-out buggy programs, and requests one, three or five candidate questions. The first candidate is decoded greedily, exactly as in the evaluation; the others are sampled at temperature 0.8 to offer alternatives. A “continue with this question” control appends the chosen question to the dialogue so that a whole tutoring conversation can be built turn by turn. Pasted code is numbered automatically because the model was trained on numbered code.

figure

Figure 2: The Debugging Questions Page with a Held-Out Problem Loaded

Making local generation interactive:

The first version took about 7–10 s per candidate question and 20–30 s for three. Profiling showed where the time went: reading a prompt of 550–965 tokens took 2.7–4.8 s and was repeated for every candidate although the prompt was identical; writing the 20–27 tokens of the question took about 1.3 s; and about 3.3 s more was spent generating text after the question, as the model continued with alternative questions and invented student turns, all of which was discarded. Four changes addressed these costs (Figure 3):

  • Early stopping. Generation is streamed and stopped at the first newline, alternative-question tag or end-of-conversation tag, which removes the wasted continuation.
  • Prompt cache reuse within a request. The key–value cache for the prompt is computed once and reused for every candidate; after each candidate the cache is rolled back to the end of the prompt.
  • Prompt cache reuse across requests. The cache is retained between requests and only the tokens that differ from the previous prompt are processed, so regenerating questions or continuing the same dialogue reuses the long problem and code section.
  • Model loading at start-up, so that the first request does not include loading time.

figure

Figure 3: Request Flow in Debugging Mode, Including Prompt Caching and Early Stopping

The application also removes a leading acknowledgement such as “Sure.” from displayed questions, a habit the model learned from its training references; this is a display step only and was not applied in the evaluation. A Paragraph Questions page applies the model, outside its training domain, to a paragraph of educational text and produces a three-stage sequence of clarification, probing and implication questions, filtered for relevance and padded from templates when the model falls short; the page states that this mode is a demonstration rather than an evaluated capability. The Model Performance page reads the evaluation output files directly and charts every measure for all six systems, whether or not it favours the local model.

RESULTS:

Reference-based similarity does not separate the systems:

Table 3 reports the reference-based and diversity measures. BERTScore F1 ranged only from 0.881 (Gemini) to 0.892 (GPT-4o) across all six systems, and none of the pairwise differences among the local models in BERTScore, ROUGE-L or Sentence-BERT similarity was significant, even before correction. The SFT+DPO model’s BERTScore F1 did not differ significantly from that of any proprietary model (Holm-adjusted p ≥ 0.16). By these measures the six systems, which include an untrained 7B model and three frontier models, are essentially indistinguishable.

Table 3: Reference-based and Diversity Measures on 68 Held-Out Turns (Best Match over References; BLEU and Self-BLEU on a 0–100 Scale)

Measure Base SFT SFT+DPO GPT-4o Claude Gemini
ROUGE-1 F1 0.300 0.300 0.281 0.333 0.316 0.285
ROUGE-2 F1 0.111 0.096 0.074 0.108 0.093 0.075
ROUGE-L F1 0.242 0.233 0.224 0.265 0.221 0.221
BLEU 9.2 11.1 6.8 12.1 10.3 11.7
BERTScore F1 0.884 0.885 0.884 0.892 0.884 0.881
Sentence-BERT 0.453 0.439 0.410 0.497 0.545 0.481
Distinct-1 0.172 0.126 0.116 0.155 0.180 0.200
Distinct-2 0.526 0.306 0.249 0.394 0.609 0.584
Self-BLEU (lower = more varied) 57.7 75.9 83.2 72.7 46.7 56.3

Rubric judges find large, consistent differences:

The two judges agreed well: over all 408 questions their overall scores had a Spearman correlation of 0.72, and 73% of score pairs were within one point. Claude was the stricter judge and scored every system lower than GPT-4o did, but the two judges ranked the systems similarly. Unlike the similarity measures, the judges separated the systems clearly (Table 4). All three proprietary models received higher overall scores than every local model (3.75–4.03 against 2.96–3.29; for SFT+DPO against each proprietary model, Holm-adjusted p < 0.001). Among the local models, the DPO-aligned model scored significantly higher than the SFT model (3.29 against 2.96, Holm-adjusted p = 0.013).

Table 4: Socratic Quality Scores (Mean of Two LLM Judges, 1–5 Scale; 95% Bootstrap CI for the Overall Score)

Dimension Base SFT SFT+DPO GPT-4o Claude Gemini
Relevance 3.85 3.09 3.32 4.78 4.89 4.57
Socratic depth 2.46 2.28 2.68 3.49 3.73 3.29
Open-endedness 2.75 2.96 3.41 3.62 3.60 3.33
Critical thinking 2.42 2.22 2.65 3.46 3.70 3.26
Non-leading nature 3.56 4.01 4.35 3.67 3.71 3.92
Clarity 4.24 3.75 3.94 4.84 4.75 4.31
Novelty 2.65 2.40 2.67 3.71 3.84 3.61
Overall 3.13 2.96 3.29 3.94 4.03 3.75
Overall, 95% CI [2.96, 3.30] [2.80, 3.12] [3.15, 3.42] [3.82, 4.05] [3.93, 4.13] [3.58, 3.92]
Overall, GPT-4o judge 3.46 3.33 3.74 4.25 4.27 3.99
Overall, Claude judge 2.80 2.59 2.84 3.62 3.79 3.52

The measures rank the systems differently:

Table 5 shows the rank each measure assigns to each system and the rank correlation of each measure with the judges’ overall ranking. ROUGE-L, BLEU and BERTScore produce rankings unrelated to the judges’ (Kendall’s τ = −0.28, 0.20 and −0.15). ROUGE-L, for example, ranks the untrained base model second and Claude joint last, the reverse of the judges’ view. Sentence-BERT similarity is the only reference-based measure whose ranking resembles the judges’ (τ = 0.73), although with six systems this falls just short of significance (p = 0.056). Of the judge dimensions, Socratic depth reproduces the overall ranking exactly (τ = 1.00), whereas non-leading nature is negatively associated with it (τ = −0.20): the systems the judges like most overall are not the most restrained.

Table 5: Rank of Each System Under Each Measure (1 = Best) and Kendall’s Τ with the Judges’ Overall Ranking

Measure Base SFT SFT+DPO GPT-4o Claude Gemini τ with judges
Judges, overall 5 6 4 2 1 3 —
ROUGE-L F1 2 3 4 1 5= 5= −0.28
BLEU 5 3 6 1 4 2 0.20
BERTScore F1 3= 2 3= 1 3= 6 −0.15
Sentence-BERT 4 5 6 2 1 3 0.73
Distinct-2 3 5 6 4 1 2 0.47
Judges, depth 5 6 4 2 1 3 1.00
Judges, non-leading 6 2 1 5 4 3 −0.20

“=” marks tied ranks. Rank correlations are descriptive (n = 6 systems).

Restraint versus depth:

Plotting the two dimensions that best distinguish the systems makes the pattern visible (Figure 4). The proprietary models occupy the upper left: they ask deep questions that require the student to reason, but they are judged more leading. The DPO-aligned local model occupies the lower right: it was judged significantly less leading than each proprietary model (4.35 against 3.67–3.92, Holm-adjusted p ≤ 0.003) but asks shallower questions. Supervised fine-tuning alone moved the model to the right (non-leading 3.56 to 4.01) and DPO moved it further right and slightly up. The BERTScore labels on the figure show that none of this structure is visible to the similarity metric.

figure

Figure 4: Restraint (Non-Leading Nature) Against Socratic Depth for the Six Systems; BERTScore F1 Shown in Brackets

Diversity follows the same split. The SFT+DPO model produced the least varied questions of all systems (Distinct-2 = 0.249; Self-BLEU = 83.2): 52 of its 68 questions ask the student to “walk me through” their code or steps. Claude and Gemini were the most varied (Distinct-2 = 0.609 and 0.584). The local model’s restraint therefore comes partly from converging on a safe, general opening question that it continues to ask later in a dialogue, where a human tutor would probe more specifically.

Qualitative comparison:

Two held-out examples illustrate the profiles (Tables 6 and 7). In the factorial problem the student’s loop multiplies by zero in its first iteration. All three proprietary models immediately ask what values the loop variable takes, which points the student at the bug in the first tutor turn. The human tutor instead asks the student to describe when the function fails, and the DPO-aligned model asks a similarly general question. In the integer-grouping problem the student’s code overwrites a dictionary value instead of appending to it; Claude’s question names line 4 and asks what happens to the existing value, which comes close to stating the bug, while the human tutor and the local models ask the student to explain the code line by line.

Table 6: Factorial Problem (Held-Out). Student: “Hi! I Implemented the Factorial Function but It Doesn’t Work and I Do Not Know Why. Can You Help?”

Source Generated question
Human tutor Sure. Can you tell me for what values of n it fails and what values it returns in those cases?
Base Of course! Let’s start by understanding the problem description and your code.
SFT Hi! Sure, let’s go through it step by step and see if we can find anything that is different about your code. Do you see a problem on line 1?
SFT+DPO Sure. Can you walk me through the steps you took to create the function?
GPT-4o What values does the variable i take during the iterations of your loop, and how does that affect the multiplication in line 6?
Claude What values does i actually take on during each iteration of your loop when you call, say, factorial(3), and how does that compare to the numbers you actually want to multiply together to get 3!?
Gemini If you trace the loop for n = 3, what values does i take in each iteration?

Table 7: Integer-grouping Problem (Held-Out). Student: The Code “Seems to Always Create Dictionary Values That Contain Only One Element”

Source Generated question
Human tutor Sure. Can you go through your code line by line and explain to me what each line is supposed to do?
Base Of course! Let’s take a look at your code and see if we can find the issue.
SFT Sure. Can you walk me through your code line by line?
SFT+DPO Sure. Can you walk me through the steps your code takes to create the dictionary?
GPT-4o What happens to the existing list of values for a key in your dictionary when you assign a new list to that key?
Claude On line 4, what happens to the existing value for key in result if that key has already appeared earlier in valList—does your code check for that before assigning?
Gemini What happens to the existing list for a key when your loop encounters that same key a second time?

Practicality of local deployment:

Table 8 and Figure 5 summarise the deployment results. In the batch evaluation, the local models took a median of 10–12 s per question on the 16 GB laptop while other applications were running, against 1–3 s for the cloud models. In Socratic Studio, the optimisations described above reduced the time for one question on a new problem to 3.3–5.4 s and for a repeated request on the same problem to 1.0–2.7 s, comparable with the cloud models. Three candidates for the next turn of an ongoing dialogue, the most common interaction, took 4.1 s instead of 20–30 s.

Table 8: Generation Time in Socratic Studio Before and After Optimisation (Apple M4, 16 GB)

Request Before After
One candidate, new problem about 7–10 s 3.3–5.4 s
One candidate, same problem again about 7–10 s 1.0–2.7 s
Three candidates, new problem about 20–30 s 7.0 s
Three candidates, same problem again about 20–30 s 6.0 s
Three candidates, next turn of the same dialogue about 20–30 s 4.1 s

figure

Figure 5: Response Time Before and After Optimisation (Bars: Midpoint of the Measured Range; Whiskers: Range)

DISCUSSION:

Why the measures disagree (RQ1):

Three factors explain much of the disagreement. First, the human references are often broad: 59 of the 178 reference questions open with an acknowledgement such as “Sure”, and many simply invite the student to explain their code. A system that imitates this style scores well on similarity, while a system that asks a pointed question about line 6 scores lower even if the judges rate it as deeper. Second, embedding-based measures such as BERTScore assign high scores to almost any pair of fluent English questions about the same code, compressing all systems into a band about 0.01 wide. Third, similarity measures resemblance, not quality: a question can be pedagogically excellent and still unlike every reference. The partial exception, Sentence-BERT, tracked the judges’ ranking more closely, possibly because it rewards topical closeness to the specific code under discussion, which the deeper questions also have. The practical conclusion is that reference-based scores alone, which remain the standard in this line of work, cannot support claims about the pedagogical quality of generated Socratic questions.

Two kinds of good question (RQ2):

The judges reward two qualities that pull in opposite directions. Depth and critical thinking favour questions that engage with the specific mechanism of the bug; non-leading nature favours questions that reveal nothing. The proprietary models, instructed explicitly not to reveal the bug, still tended to ask questions that point straight at it, consistent with reports that general-purpose LLMs often give away answers in tutoring [4]. The preference-aligned local model learned the opposite habit. Neither profile is correct at every turn: a broad question suits the opening of a dialogue, and a sharper one suits a student who has already described the symptom. A practical tutor therefore needs to adapt the specificity of its questions to the stage of the conversation, which none of the evaluated systems does deliberately.

Local deployment is practical (RQ3):

Simple inference engineering made a 7B tutor responsive on an ordinary laptop. The key observation is that Socratic tutoring prompts are long and highly repetitive across turns, because the problem and code remain the same, so prompt caching removes most of the work. With these changes the local tutor responds in a few seconds, incurs no per-use charge, works without network access and keeps students’ code on the machine. For institutions with limited budgets, intermittent connectivity or strict data-protection requirements, this makes a local tutor a realistic option, with the caveat that its questions are currently shallower than those of frontier models.

Recommendations for evaluating AI tutors:

The results suggest the following practice for researchers and educators assessing Socratic tutors:

1. Report reference-based metrics only together with rubric-based measures, and do not interpret small differences in BERTScore as differences in quality.

2. Score restraint and depth separately rather than as a single overall score, since they can trade off against each other.

3. Report diversity, because a tutor can achieve restraint by repeating one safe question.

4. Use more than one judge, report their agreement, and avoid letting a judge evaluate its own outputs without noting the risk of self-preference.

5. Validate judges against teacher ratings and, ultimately, against students’ learning outcomes.

LIMITATIONS:

The evaluation covers 68 turns from four problems in short Python programs; turns from the same dialogue are not independent and results may differ for other languages or larger programs. The judges are proprietary models, two of which are also among the systems evaluated, so self-preference cannot be excluded for the comparison with proprietary models; GPT-4o as a judge ranked Claude above itself, which suggests that self-preference does not dominate, but Claude’s top ranking by its own judge should be read with this caveat. The judges were not validated against human teachers, and no learning outcomes were measured. The proprietary models received a chat prompt rather than the local models’ training template, and one of them could not be run at a fixed temperature. The rank correlations in Table 5 are based on six systems and are descriptive. The local model’s preference training was limited by memory constraints, as discussed in the companion paper, and an improved model may shift its position in Figure 4. Latency was measured on a single laptop under normal background load.

CONCLUSION AND FUTURE WORK:

This study compared three local and three proprietary language models as Socratic programming tutors and found that the choice of evaluation measure largely determines the conclusion. Reference-based similarity could not tell any of the six systems apart and ranked them in ways unrelated to rubric judges, whose scores were consistent with each other and revealed a clear trade-off: frontier models ask deeper questions, and a small preference-aligned local model is more restrained. A locally served 7B tutor, made responsive by prompt caching and early stopping, provides private and cost-free Socratic questioning on a consumer laptop. Future work will validate the rubric judges against teacher ratings, conduct a classroom study measuring learning outcomes, adapt question specificity to the stage of the dialogue, and extend the evaluation to more problems and programming languages.

ACKNOWLEDGEMENT:

The authors thank Kolhapur Institute of Technology’s College of Engineering, Kolhapur, for library facilities and online resources that gave access to the literature, and the reviewers for their helpful comments.

AUTHORS’ CONTRIBUTIONS:

Muralidhar Parulekar planned the study, reviewed the literature, prepared the data, trained the local models, designed the evaluation scheme and rubric, ran the experiments, developed Socratic Studio and drafted the manuscript. Mamta Kalas supervised the work and revised the manuscript critically. Both authors read and approved the final version.

CONFLICT OF INTEREST:

The authors report no competing interests.

DATA AVAILABILITY:

The Socratic Debugging Benchmark used in this study is publicly available from its authors [3]. The questions generated by the six systems, the judge scores and the evaluation scripts are available from the corresponding author on reasonable request.

DECLARATION ON USE OF AI TOOLS:

Claude (Anthropic) was used to draft the manuscript text from the authors’ project report and to format the document according to the journal’s structure. Claude was also one of the systems evaluated and one of the two judges in this study, which is reported in the Materials and Methods section. The authors reviewed and verified all content and take full responsibility for the manuscript.

RELATED PUBLICATION:

The training of the local models evaluated here is described in a companion paper [8]. The present paper reports a distinct analysis (comparative evaluation, metric agreement and system deployment) and does not reuse that paper's text.

REFERENCES

  1. Paul R, Elder L. Critical thinking: The art of Socratic questioning. J Dev Educ 2007; 31 (1): 36-37.
  2. Kasneci E, Seßler K, Küchemann S, Bannert M, Dementieva D, Fischer F, et al. ChatGPT for good? On opportunities and challenges of large language models for education. Learn Individ Differ 2023; 103: 102274.
  3. Al-Hossami E, Bunescu R, Teehan R, Powell L, Mahajan K, Dorodchi M. Socratic questioning of novice debuggers: A benchmark dataset and preliminary evaluations. In: Proceedings of the 18th Workshop on Innovative Use of NLP for Building Educational Applications (BEA); 2023. p. 709-726.
  4. Maurya KK, Srivatsa KA, Petukhova K, Kochmar E. Unifying AI tutor evaluation: An evaluation taxonomy for pedagogical ability assessment of LLM-powered AI tutors. In: Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics (NAACL); 2025.
  5. Ashok Kumar N, Lan A. Improving Socratic question generation using data augmentation and preference optimization. In: Proceedings of the 19th Workshop on Innovative Use of NLP for Building Educational Applications (BEA); 2024. p. 108-118.
  6. Kochmar E, Maurya KK, Petukhova K, Srivatsa KA, Tack A, Vasselli J. Findings of the BEA 2025 shared task on pedagogical ability assessment of AI-powered tutors. In: Proceedings of the 20th Workshop on Innovative Use of NLP for Building Educational Applications (BEA); 2025. p. 1011-1033.
  7. Zheng L, Chiang WL, Sheng Y, Zhuang S, Wu Z, Zhuang Y, et al. Judging LLM-as-a-judge with MT-Bench and Chatbot Arena. Adv Neural Inf Process Syst 2023; 36.
  8. Parulekar M, Kalas M. Teaching an open 7B model to withhold the answer: Preference-optimized Socratic debugging questions trained on a 16 GB laptop. Under review.
  9. Vygotsky LS. Mind in society: The development of higher psychological processes. Cambridge (MA): Harvard University Press; 1978.
  10. Wood D, Bruner JS, Ross G. The role of tutoring in problem solving. J Child Psychol Psychiatry 1976; 17 (2): 89-100.
  11. VanLehn K. The relative effectiveness of human tutoring, intelligent tutoring systems, and other tutoring systems. Educ Psychol 2011; 46 (4): 197-221.
  12. Graesser AC, Chipman P, Haynes BC, Olney A. AutoTutor: An intelligent tutoring system with mixed-initiative dialogue. IEEE Trans Educ 2005; 48 (4): 612-618.
  13. Al-Hossami E, Bunescu R, et al. Can language models employ the Socratic method? Experiments with code debugging. In: Proceedings of the 55th ACM Technical Symposium on Computer Science Education (SIGCSE TS); 2024. doi:10.1145/3626252.3630799.
  14. Kargupta P, Agarwal I, Hakkani-Tür D, Han J. Instruct, not assist: LLM-based multi-turn planning and hierarchical questioning for Socratic code debugging. In: Findings of the Association for Computational Linguistics: EMNLP 2024; 2024. p. 9475-9495.
  15. Rafailov R, Sharma A, Mitchell E, Ermon S, Manning CD, Finn C. Direct preference optimization: Your language model is secretly a reward model. Adv Neural Inf Process Syst 2023; 36.
  16. Scarlatos A, Liu N, Lee J, Baraniuk R, Lan A. Training LLM-based tutors to improve student learning outcomes in dialogues. In: Proceedings of the International Conference on Artificial Intelligence in Education (AIED); 2025. arXiv:2503.06424.
  17. Papineni K, Roukos S, Ward T, Zhu WJ. BLEU: A method for automatic evaluation of machine translation. In: Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics; 2002. p. 311-318.
  18. Lin CY. ROUGE: A package for automatic evaluation of summaries. In: Text Summarization Branches Out: Proceedings of the ACL-04 Workshop; 2004. p. 74-81.
  19. Zhang T, Kishore V, Wu F, Weinberger KQ, Artzi Y. BERTScore: Evaluating text generation with BERT. In: International Conference on Learning Representations (ICLR); 2020.
  20. Reimers N, Gurevych I. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In: Proceedings of EMNLP-IJCNLP; 2019. p. 3982-3992.
  21. Li J, Galley M, Brockett C, Gao J, Dolan B. A diversity-promoting objective function for neural conversation models. In: Proceedings of NAACL-HLT; 2016. p. 110-119.
  22. Zhu Y, Lu S, Zheng L, Guo J, Zhang W, Wang J, Yu Y. Texygen: A benchmarking platform for text generation models. In: Proceedings of the 41st International ACM SIGIR Conference; 2018. p. 1097-1100.
  23. Panickssery A, Bowman SR, Feng S. LLM evaluators recognize and favor their own generations. Adv Neural Inf Process Syst 2024; 37.
  24. Dettmers T, Pagnoni A, Holtzman A, Zettlemoyer L. QLoRA: Efficient finetuning of quantized LLMs. Adv Neural Inf Process Syst 2023; 36.
  25. Hu EJ, Shen Y, Wallis P, Allen-Zhu Z, Li Y, Wang S, Wang L, Chen W. LoRA: Low-rank adaptation of large language models. In: International Conference on Learning Representations (ICLR); 2022.
  26. Hannun A, Digani J, Katharopoulos A, Collobert R. MLX: Efficient and flexible machine learning on Apple silicon [software]. 2023. Available from: https://github.com/ml-explore/mlx
  27. Kwon W, Li Z, Zhuang S, Sheng Y, Zheng L, Yu CH, Gonzalez JE, Zhang H, Stoica I. Efficient memory management for large language model serving with PagedAttention. In: Proceedings of the 29th ACM Symposium on Operating Systems Principles (SOSP); 2023. p. 611-626.
  28. Jiang AQ, Sablayrolles A, Mensch A, Bamford C, Chaplot DS, et al. Mistral 7B. arXiv:2310.06825. 2023.
  29. Wilcoxon F. Individual comparisons by ranking methods. Biometrics Bull 1945; 1 (6): 80-83.

Reference

  1. Paul R, Elder L. Critical thinking: The art of Socratic questioning. J Dev Educ 2007; 31 (1): 36-37.
  2. Kasneci E, Seßler K, Küchemann S, Bannert M, Dementieva D, Fischer F, et al. ChatGPT for good? On opportunities and challenges of large language models for education. Learn Individ Differ 2023; 103: 102274.
  3. Al-Hossami E, Bunescu R, Teehan R, Powell L, Mahajan K, Dorodchi M. Socratic questioning of novice debuggers: A benchmark dataset and preliminary evaluations. In: Proceedings of the 18th Workshop on Innovative Use of NLP for Building Educational Applications (BEA); 2023. p. 709-726.
  4. Maurya KK, Srivatsa KA, Petukhova K, Kochmar E. Unifying AI tutor evaluation: An evaluation taxonomy for pedagogical ability assessment of LLM-powered AI tutors. In: Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics (NAACL); 2025.
  5. Ashok Kumar N, Lan A. Improving Socratic question generation using data augmentation and preference optimization. In: Proceedings of the 19th Workshop on Innovative Use of NLP for Building Educational Applications (BEA); 2024. p. 108-118.
  6. Kochmar E, Maurya KK, Petukhova K, Srivatsa KA, Tack A, Vasselli J. Findings of the BEA 2025 shared task on pedagogical ability assessment of AI-powered tutors. In: Proceedings of the 20th Workshop on Innovative Use of NLP for Building Educational Applications (BEA); 2025. p. 1011-1033.
  7. Zheng L, Chiang WL, Sheng Y, Zhuang S, Wu Z, Zhuang Y, et al. Judging LLM-as-a-judge with MT-Bench and Chatbot Arena. Adv Neural Inf Process Syst 2023; 36.
  8. Parulekar M, Kalas M. Teaching an open 7B model to withhold the answer: Preference-optimized Socratic debugging questions trained on a 16 GB laptop. Under review.
  9. Vygotsky LS. Mind in society: The development of higher psychological processes. Cambridge (MA): Harvard University Press; 1978.
  10. Wood D, Bruner JS, Ross G. The role of tutoring in problem solving. J Child Psychol Psychiatry 1976; 17 (2): 89-100.
  11. VanLehn K. The relative effectiveness of human tutoring, intelligent tutoring systems, and other tutoring systems. Educ Psychol 2011; 46 (4): 197-221.
  12. Graesser AC, Chipman P, Haynes BC, Olney A. AutoTutor: An intelligent tutoring system with mixed-initiative dialogue. IEEE Trans Educ 2005; 48 (4): 612-618.
  13. Al-Hossami E, Bunescu R, et al. Can language models employ the Socratic method? Experiments with code debugging. In: Proceedings of the 55th ACM Technical Symposium on Computer Science Education (SIGCSE TS); 2024. doi:10.1145/3626252.3630799.
  14. Kargupta P, Agarwal I, Hakkani-Tür D, Han J. Instruct, not assist: LLM-based multi-turn planning and hierarchical questioning for Socratic code debugging. In: Findings of the Association for Computational Linguistics: EMNLP 2024; 2024. p. 9475-9495.
  15. Rafailov R, Sharma A, Mitchell E, Ermon S, Manning CD, Finn C. Direct preference optimization: Your language model is secretly a reward model. Adv Neural Inf Process Syst 2023; 36.
  16. Scarlatos A, Liu N, Lee J, Baraniuk R, Lan A. Training LLM-based tutors to improve student learning outcomes in dialogues. In: Proceedings of the International Conference on Artificial Intelligence in Education (AIED); 2025. arXiv:2503.06424.
  17. Papineni K, Roukos S, Ward T, Zhu WJ. BLEU: A method for automatic evaluation of machine translation. In: Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics; 2002. p. 311-318.
  18. Lin CY. ROUGE: A package for automatic evaluation of summaries. In: Text Summarization Branches Out: Proceedings of the ACL-04 Workshop; 2004. p. 74-81.
  19. Zhang T, Kishore V, Wu F, Weinberger KQ, Artzi Y. BERTScore: Evaluating text generation with BERT. In: International Conference on Learning Representations (ICLR); 2020.
  20. Reimers N, Gurevych I. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In: Proceedings of EMNLP-IJCNLP; 2019. p. 3982-3992.
  21. Li J, Galley M, Brockett C, Gao J, Dolan B. A diversity-promoting objective function for neural conversation models. In: Proceedings of NAACL-HLT; 2016. p. 110-119.
  22. Zhu Y, Lu S, Zheng L, Guo J, Zhang W, Wang J, Yu Y. Texygen: A benchmarking platform for text generation models. In: Proceedings of the 41st International ACM SIGIR Conference; 2018. p. 1097-1100.
  23. Panickssery A, Bowman SR, Feng S. LLM evaluators recognize and favor their own generations. Adv Neural Inf Process Syst 2024; 37.
  24. Dettmers T, Pagnoni A, Holtzman A, Zettlemoyer L. QLoRA: Efficient finetuning of quantized LLMs. Adv Neural Inf Process Syst 2023; 36.
  25. Hu EJ, Shen Y, Wallis P, Allen-Zhu Z, Li Y, Wang S, Wang L, Chen W. LoRA: Low-rank adaptation of large language models. In: International Conference on Learning Representations (ICLR); 2022.
  26. Hannun A, Digani J, Katharopoulos A, Collobert R. MLX: Efficient and flexible machine learning on Apple silicon [software]. 2023. Available from: https://github.com/ml-explore/mlx
  27. Kwon W, Li Z, Zhuang S, Sheng Y, Zheng L, Yu CH, Gonzalez JE, Zhang H, Stoica I. Efficient memory management for large language model serving with PagedAttention. In: Proceedings of the 29th ACM Symposium on Operating Systems Principles (SOSP); 2023. p. 611-626.
  28. Jiang AQ, Sablayrolles A, Mensch A, Bamford C, Chaplot DS, et al. Mistral 7B. arXiv:2310.06825. 2023.
  29. Wilcoxon F. Individual comparisons by ranking methods. Biometrics Bull 1945; 1 (6): 80-83.

Photo
Muralidhar Parulekar
Corresponding author

Department of Computer Science and Engineering, Kolhapur Institute of Technology’s College of Engineering (Empowered Autonomous), Kolhapur.

Photo
Mamta Kalas
Co-author

Department of Computer Science and Engineering, Kolhapur Institute of Technology’s College of Engineering (Empowered Autonomous), Kolhapur.

Muralidhar Parulekar, Dr. Mamta Kalas, Restraint Versus Depth: Evaluating Open and Proprietary Large Language Models as Socratic Programming Tutors, with a Privacy-Preserving Local Deployment, Int. J. Sci. R. Tech., 2026, 3 (11), 1114-1127. https://doi.org/10.5281/zenodo.24468354

More related articles
A Study On The Effectiveness Of Muscle Energy Tech...
Fairusa , Franklin Shaju M. K., Divya J. Pawani...
Aphaisia: A Comprehensive Language Disorder, Clini...
Pooja Rasal, Poonam Yadav, Granthali Shape...
The Influence of Meteorological Parameters on Groundwater Radon Concentration in...
Aremu Abraham Adewale, Oni Olatunde Michael, Oni Emmanuel Abiodun, Amodu Fuhke Roseline...
Intellectual Property Rights: A Comprehensive Review of Concepts, International ...
Saumitra Ambardekar, Pranjal Deore, Pranav Kulkarni, Amaan Shaikh...
Related Articles
Knowledge of Open Suctioning Techniques Among Intern Nurses Posted in Intensive ...
Eshika Santhosh, Ringkangmai Liangkiuwiliu, Jamiya Khatun...
Comparative AComparative Analysis of Underground Water Table Levels from the Sur...
John Adeyemi Eyinade, Segun Isaac Olonade, Joshua Ayodeji Oluwadare, Caleb Olutayo Oluwadare...