[Paper Review] StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Code
StudentEval introduces a novel benchmark of 1,749 student-written prompts for code generation, collected from 80 introductory Python students interacting with Code LLMs. It demonstrates that student prompts vary widely in quality and ambiguity, and that current Code LLMs produce multiple semantically distinct functions even from clear prompts, making StudentEval a superior discriminator of model performance compared to expert-prompt benchmarks like HumanEval.
Code LLMs are being rapidly deployed and there is evidence that they can make professional programmers more productive. Current benchmarks for code generation measure whether models generate correct programs given an expert prompt. In this paper, we present a new benchmark containing multiple prompts per problem, written by a specific population of non-expert prompters: beginning programmers. StudentEval contains 1,749 prompts for 48 problems, written by 80 students who have only completed one semester of Python programming. Our students wrote these prompts while working interactively with a Code LLM, and we observed very mixed success rates. We use StudentEval to evaluate 5 Code LLMs and find that StudentEval is a better discriminator of model performance than existing benchmarks. We analyze the prompts and find significant variation in students' prompting techniques. We also find that nondeterministic LLM sampling could mislead students into thinking that their prompts are more (or less) effective than they actually are, which has implications for how to teach with Code LLMs.
Motivation & Objective
- To create a benchmark that reflects real-world, non-expert prompting behavior in introductory programming contexts.
- To evaluate how well Code LLMs handle ambiguous, varied, and low-skill-level prompts written by novice programmers.
- To investigate the reliability and consistency of Code LLMs when generating code from student-written descriptions.
- To analyze prompting strategies used by beginners and their impact on model output diversity and correctness.
- To assess the implications of model inconsistency for teaching with Code LLMs in educational settings.
Proposed method
- Collecting 1,749 prompts from 80 students who had completed only one semester of Python, written iteratively while interacting with OpenAI’s Codex.
- Structuring the benchmark around 48 problems, each with at least 14 prompts, representing multiple attempts and varying skill levels.
- Using expert-written test cases to evaluate code generation correctness and compute test signatures to assess semantic equivalence of generated functions.
- Classifying prompts into four subsets: success (first/last attempt) and failure (first/last attempt) to analyze performance trends.
- Applying clustering techniques to embeddings of prompts to identify common prompting styles and their model response patterns.
- Measuring the number of semantically distinct functions generated per prompt using test signature comparison.
Experimental results
Research questions
- RQ1How do Code LLMs perform when given prompts written by novice programmers rather than expert prompts?
- RQ2To what extent do student-written prompts lead to multiple semantically different code outputs, even when the prompt appears clear to humans?
- RQ3How does prompt quality, as measured by first-try success, correlate with model performance across different Code LLMs?
- RQ4What prompting strategies do beginner students use, and how effective are they in eliciting correct code from Code LLMs?
- RQ5How does nondeterministic sampling in LLMs affect student perception of prompt effectiveness?
Key findings
- StudentEval outperforms traditional benchmarks like HumanEval in discriminating between the performance of different Code LLMs, particularly in detecting differences in robustness.
- On average, prompts in the 'success (first attempt)' subset produced 1.9 functions per prompt (median 1.0), while 'failure (first attempt)' prompts produced 2.2 functions (median 2.0), indicating higher ambiguity and inconsistency in failed attempts.
- Even clear, human-understandable prompts—such as the one in Figure 7(b)—generated at least seven semantically distinct functions when processed by StarCoderBase, highlighting significant reliability issues.
- A substantial number of student prompts led to multiple semantically different programs, with some clusters of prompts from different problems producing similar embeddings and confusing the model.
- Nondeterministic sampling in LLMs can mislead students into believing their prompts are more effective than they are, due to random success on first attempts despite low overall reliability.
- The study reveals that prompting style significantly affects model behavior: for example, input/output example-based prompts work poorly for complex data structures like nested lists or dictionaries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.