Date
Publisher
arXiv
Motivation: Students learning to program often reach states where they are
stuck and can make no forward progress. An automatically generated next-step
hint can help them make forward progress and support their learning. It is
important to know what makes a good hint or a bad hint, and how to generate
good hints automatically in novice programming tools, for example using Large
Language Models (LLMs).
Method and participants: We recruited 44 Java educators from around the world
to participate in an online study. We used a set of real student code states as
hint-generation scenarios. Participants used a technique known as comparative
judgement to rank a set of candidate next-step Java hints, which were generated
by Large Language Models (LLMs) and by five human experienced educators.
Participants ranked the hints without being told how they were generated.
Findings: We found that LLMs had considerable variation in generating high
quality next-step hints for programming novices, with GPT-4 outperforming other
models tested. When used with a well-designed prompt, GPT-4 outperformed human
experts in generating pedagogically valuable hints. A multi-stage prompt was
the most effective LLM prompt. We found that the two most important factors of
a good hint were length (80--160 words being best), and reading level (US grade
9 or below being best). Offering alternative approaches to solving the problem
was considered bad, and we found no effect of sentiment.
Conclusions: Automatic generation of these hints is immediately viable, given
that LLMs outperformed humans -- even when the students' task is unknown. The
fact that only the best prompts achieve this outcome suggests that students on
their own are unlikely to be able to produce the same benefit. The prompting
task, therefore, should be embedded in an expert-designed tool.
Study at a glance
- Question: How do AI-generated hints for beginning programming students compare to hints written by expert teachers?
- Setting and data: Online study with 44 global Java educators, real student code states, and hints from AI and five experienced educators.
- Method: Blind ranking of AI- and teacher-generated hints by expert educators (comparative judgement).
Why it matters
Students learning to program often get stuck and cannot make forward progress. To support student learning, it is important to know what makes a good or bad next-step hint, and how to generate good hints automatically.
Key findings
- Evaluated by 44 international Java educators, an advanced AI model with well-designed prompts outperformed experienced teachers in generating helpful next-step hints for novice programmers.
- Educators judged the most effective coding hints to be 80 to 160 words long and written at or below a ninth-grade reading level.
- Providing alternative problem-solving approaches made hints less effective according to educators, while the emotional tone of the hint had no impact.
Summary drafted with AI from the paper’s abstract and may contain errors. See the full paper for details.
What is the application?
Who age?
Why use AI?
Study design
