---
title: "StudentEval — paper by Babe et al. (2024) — summary and ideas"
description: "StudentEval tests how reliably code generators follow beginning programmers’ Python prompts and shows what a single success or failure can hide."
canonical: "https://research.elamur.ai/free/en/papers/babe-2024-studenteval-benchmark-student-written-prompts/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/babe-2024-studenteval-benchmark-student-written-prompts/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Code

# StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Code

Paper · 2024 · Hannah McLean Babe, Sydney Nguyen, Yangtian Zi et al.

**Authors:** [Hannah McLean Babe](https://md.research.elamur.ai/free/en/authors/hannah-mclean-babe/), [Sydney Nguyen](https://md.research.elamur.ai/free/en/authors/sydney-nguyen/), [Yangtian Zi](https://md.research.elamur.ai/free/en/authors/yangtian-zi/), [Arjun Guha](https://md.research.elamur.ai/free/en/authors/arjun-guha/), [Molly Q Feldman](https://md.research.elamur.ai/free/en/authors/molly-q-feldman/) and [Carolyn Jane Anderson](https://md.research.elamur.ai/free/en/authors/carolyn-jane-anderson/) · **Year:** 2024 · **Venue:** Findings of the Association for Computational Linguistics: ACL 2024 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Findings of the Association for Computational Linguistics: ACL 2024 · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2024.findings-acl.501/)
- [PDF](https://aclanthology.org/2024.findings-acl.501.pdf)
- [DOI 10.18653/v1/2024.findings-acl.501](https://doi.org/10.18653/v1/2024.findings-acl.501)

## Summary

A beginning programmer can understand what a Python function should do and still have trouble describing it to a code generator. Most established [code generation benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/) give the generator an expert’s wording, so they offer limited evidence about what will happen when a beginner asks for the same thing. StudentEval keeps the programming task fixed and varies the person’s description. It contains 1,749 English prompts from 80 university students for 48 introductory Python problems. Each problem has at least 14 prompts, which allows the authors to examine how differently worded requests fare against the same tests.

Students saw a function signature and examples of its expected behavior. They described the function in their own words, then saw the Python code generated by Codex and the results of running it. They could revise a failed description or move on. The authors use this history to distinguish successes and failures on the first submission from the outcomes of later, final submissions. For the benchmark evaluation, they generate code repeatedly from each selected prompt. That lets them estimate how frequently a fresh completion passes the tests and compare that estimate with what the student experienced during the session.

The authors evaluate 12 code generators. The Python-specialized [Code Llama](https://md.research.elamur.ai/free/en/papers/roziere-2024-code-llama-open-foundation-models/) variants lead on prompts that succeeded during collection. Code-Llama-Py-34B reaches a mean pass@1 of 73.51 on First Success and 64.65 on Last Success, on the percentage scale used in the results. The student-written prompts also reveal gaps that are less apparent on HumanEval. Phi-1 and Code-Llama-Py-34B score 51.22 and 53.29 on HumanEval, respectively, while they score 36.36 and 64.65 on StudentEval’s Last Success subset.

A test result tells a student what happened to the code they just received. Repeated generation shows how much more there is to learn about the prompt. Some descriptions that worked in the session rarely produce passing code when tried again. Some descriptions that failed turn out to yield passing code consistently for particular generators. The authors also find that a single description can elicit programs that behave differently on the same inputs, even when the description sounds clear to a person. For a beginner deciding whether to revise an explanation, the distinction matters. The feedback can lead them to keep wording that worked by chance or to complicate wording that already expressed the task well.

## Deep dive: StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Code

StudentEval tests how reliably code generators follow beginning programmers’ Python prompts and shows what a single success or failure can hide. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What an expert-written prompt measures

In the form of [programming](https://md.research.elamur.ai/free/en/topics/code-and-programming/) studied here, a person describes the behavior they want in ordinary language and receives code that attempts to implement it. This differs from starting with a piece of code and asking a system to extend it. A person can request a function by explaining what it should do with its inputs, even if they are unsure which Python construct they would use to implement it. The authors cite earlier research describing natural-language prompting as a popular and effective approach among experienced programmers. StudentEval asks how well the same interface works when the person describing the task has much less experience.

The established evaluation design is straightforward. A benchmark associates a description with a programming problem and tests the resulting code on inputs with known answers. A completion succeeds when it satisfies the checks. The authors identify [HumanEval](https://md.research.elamur.ai/free/en/papers/chen-2021-evaluating-large-language-models-trained/) and [MBPP](https://md.research.elamur.ai/free/en/papers/austin-2021-program-synthesis-large-language-models/) as widely used Python benchmarks in this tradition. The paper also notes work on [multilingual evaluation of code generation](https://md.research.elamur.ai/free/en/papers/athiwaratkun-2022-multi-lingual-evaluation-code-generation/), where problems are translated across programming languages, and evaluations involving several turns or asking for a docstring as the output. These formats vary what a generator is asked to do. StudentEval changes who writes the description and how many descriptions represent the same task.

With a single prompt, the ability to implement the intended function and the ability to understand a particular request are measured together. A failing completion may reflect a difficulty with the algorithm, an ambiguity in the request, or a failure to follow an instruction that a person would consider clear. Success on that prompt establishes that the phrasing worked in that trial. To investigate whether the same result holds for other ways of asking, an evaluator needs alternative descriptions attached to the same expected behavior.

The authors illustrate the point with a HumanEval task about cars traveling in opposite directions on a straight road. The situation sounds elaborate because the cars are described as continuing after a collision. Once the reader realizes that every car going one way will meet every car going the other way, the answer comes from counting those pairs. HumanEval also includes the much more direct task of finding a string’s length. Both belong in a broad evaluation, but they draw on different abilities. A benchmark result that averages them makes it difficult to locate a failure in the mathematical reasoning, the phrasing of the scenario, or the implementation.

#### Why use introductory exercises?

StudentEval starts from tasks that beginning Python students are expected to understand. The researchers choose exercises for which usable descriptions already exist, then gather fresh wording from students who have recently completed an introductory course. This makes the study about a particular interaction. Someone who can recognize the behavior shown in the examples must communicate that behavior to a generator that is capable of implementing it. The exercise itself can be familiar while the description is difficult to write or difficult for the generator to follow.

The paper treats this as a different way to focus a benchmark. Domain-specific benchmarks such as DS-1000 narrow the range of work being evaluated. StudentEval narrows the experience level of the person making the request. The problems still cover several kinds of introductory Python work, from manipulating strings to handling nested data. What the prompts share is their origin in a group with a broadly comparable classroom background. The paper also notes exceptions to expert authorship, including benchmarks assembled through crowdsourcing or from material found on the web. For StudentEval, the defining source is a recorded interaction in which beginning programmers write and, when they choose, revise descriptions of given tasks.

The researchers make explicit a concern that otherwise remains implicit in many evaluations. An expert who writes a prompt can draw on conventions for describing an interface, specifying a return value, and naming data structures. A beginner may recognize the same input and output but describe the task through an example or through a sequence of operations. Those forms can express the same intent. The benchmark tests how readily the generator turns each one into the intended behavior.

#### Understanding a task and communicating it

The authors connect the study to scalable oversight, the problem of directing or checking a system when the person overseeing it may have limited means to guide it. Here the gap arises in a relatively simple setting. The student has enough information to understand what the function should do, and the generator has the ability to produce a valid implementation under suitable instructions. The work left for the student is to bring those capabilities together through a description.

The paper distinguishes this communication problem from a student’s misunderstanding of the exercise. If a person describes a different task from the one represented by the examples, an implementation that follows their wording could correctly fail the benchmark’s tests. That outcome says something different from a failure to follow an accurate description. The authors address the distinction by having experts review failed prompts for evidence of task understanding. Their judgment is necessarily based on the text the student wrote. It gives the evaluation a narrower target while leaving room for uncertainty about what an individual participant meant.

Multiple prompts for a problem give the analysis its leverage. A collection can include a concise account of the required result, a longer account of the procedure, and an explanation based on worked examples. They face the same function interface and the same checks. There is also variation when the input text stays fixed. A generator can produce different programs from repeated submissions of the same description. StudentEval records both sources of variation: differences in how people ask and differences in what a generator returns when the request stays the same.

### The method, step by step

#### Choose the work the student will describe

The authors assembled 48 problems, most adapted from introductory course materials. They made light edits to some exercises to avoid publishing answers to assignments that were still in use. The collection covers 8 core concepts. These include lists, loops, strings, and conditionals, along with mathematics, nested data, sorting, and dictionaries. The authors wanted tasks appropriate to a shared level of preparation that would still give participants several kinds of behavior to describe.

A task has a function signature, a reference implementation, and a test suite. The signature is the line that names the function and its parameters. It tells the person writing the description how the function will be called. The reference implementation is the authors’ working solution. The tests supply particular inputs and specify what the function should return. The released task record also includes an expert-written prompt.

Students saw the signature and the input and output examples. This was a familiar way of presenting problems in their introductory courses. It also kept an expert’s prose from supplying a ready-made vocabulary for the description. The students had to infer what rule explained the examples and express it themselves. During data collection, the tests were available to the student, while Codex received the signature and the student’s description. At evaluation time the test suite again determined which generated programs would count as passing.

One example in the paper uses a function named `convert`, which takes a list of numbers. The examples indicate that numbers correspond to letters and that the `-1` value separates groups of letters. The intended result is a list of strings. A student has several decisions to communicate here. The number-to-letter mapping must be clear. The special value has to be handled without turning it into a letter. The function needs to preserve the resulting groups and return them in the right form. Two of the displayed descriptions address this same operation in different ways, which makes it possible to compare their outcomes without switching tasks.

#### Check that the description has work to do

A function name can be an instruction in its own right. If a familiar name is enough to elicit a working implementation consistently, the resulting score tells little about how well the generator followed the attached prose. To check this, the authors ran Codex using function signatures with the description omitted. The signature-only runs had a mean pass@1 of 0.0519 and a variance of 0.0364. The highest individual result was 0.925 for `exp`. The mean shows that signatures alone usually conveyed too little, while the maximum shows how informative a particular name could be.

The tests had to serve both as examples for students and as checks on generated code. The authors report that each problem has 3-4 tests providing 100% code coverage for its reference implementation. Coverage indicates that the tests exercise the reference code. A test can execute a piece of code and still miss an error in the result it produces under other conditions. The authors therefore also use mutation testing. They make small changes to a working implementation and check whether the tests catch the resulting changes in behavior.

The authors use MutPy to calculate mutation scores. They explain the scores below 90 as cases in which MutPy produced only trivial changes that preserved the reference solution’s behavior. Such a change gives the tests no incorrect output to catch. Mutation testing asks more of the examples than coverage alone, while keeping them short enough for a student to inspect. Both checks concern the adequacy of the test suite. The result for any generated function still depends on the particular inputs that the suite exercises.

#### Collect descriptions and keep their histories

The 80 participants were recruited from Northeastern University, Wellesley College, and Oberlin College. They had completed an introductory Python course and could be taking a subsequent course, provided they had yet to finish it. They took part through a purpose-built web application in sessions over Zoom. Data collection ran from November 2022 through May 2023. Participation was opt-in and outside class, with informed consent. The authors report that the researcher conducting a session was unaffiliated with the participant’s institution.

The study lasted roughly 75 minutes and included 3 tutorials, 8 benchmark problems, and an exit survey and interview. The tutorials were designed to familiarize participants with different outcomes. One demonstrated a working prompt. Another showed that the tool could fail. The remaining tutorial let the student try the full process with a problem they could readily describe. The main problems were drawn at random from the task collection. For the later set in the session, each problem had a time limit of 5 minutes. Participants could ask to retry a problem or continue to the next. They received a $50 gift card.

For each submission, the server put the student’s wording into a Python docstring, a text description associated with the function, alongside the function signature. Codex generated the body of the function. The platform ran it in an isolated environment and showed the solution and test results to the participant, highlighting failed tests. The next submission could therefore reflect several things at once: the student’s initial understanding, what the returned code seemed to do, and which examples the test results indicated it had failed.

From introductory exercises to repeatable prompt evaluation The steps in order.

The collection preserves variation people introduce naturally. A revision could alter a few words, append an explanation, or replace the approach altogether. The datasheet also notes that someone could submit the same description again without editing it, and that different participants could independently use identical wording. Each prompt is linked to the task it describes. A de-identified participant ID makes it possible to associate descriptions from the same person. The authors removed usernames, replaced them with randomly generated IDs, and manually reviewed the data for identifying details.

StudentEval is distributed through the Open Science Framework. The authors also make their evaluation and analysis code available through the StudentEval GitHub repository. The problems are part of the BigCode Evaluation Harness, and the dataset is available on the Hugging Face Hub. The release preserves the submitted text. The word-level processing used in the authors’ linguistic analysis is a separate procedure.

#### Identify what happened on the first and final attempts

The authors organize the main comparisons around First Failure, First Success, Last Failure, and Last Success. A first submission that fails goes into First Failure. A first submission that passes goes into First Success. When a student needs several attempts, the final one goes into Last Success if the generated function passes and Last Failure if the student moves on after it fails. If the student gives up immediately, that attempt remains in First Failure. A student who passed on the first attempt did not submit again for that problem, so the success is recorded in First Success.

These categories are disjoint for submissions, though a student’s attempt history can supply a prompt to First Failure and a later prompt to a Last category. Failed revisions between the first and final submissions are omitted from the four main comparisons. The paper reports that First Failure was the largest of the subsets. The Last groups are particularly informative about feedback because each of their prompts follows an earlier failure. They also reflect a decision to keep trying, followed in Last Failure by a decision to stop.

The distinction between a prompt’s category and its later benchmark result is central. A category records what the particular completion generated during the study did. The replay asks what a generator tends to do given that same text. It is therefore possible for a First Success prompt to have a low estimated chance of producing passing code, or for a Last Failure prompt to do well when sampled with a different generator. The labels preserve the students’ experience even when later evaluation gives a different picture.

#### Review failed descriptions

The researchers asked two experts with extensive experience teaching introductory computing to inspect the failure prompts independently. The reviewers first familiarized themselves with the task using its reference solution and tests. Their question was whether the prompt made it clear that the student understood the intended function. The paper reports removing 74 prompts, corresponding to 11% of the failure subsets, on this basis.

Consider the distinction in the `convert` example. A student could explain that a negative marker separates strings but leave the treatment of a group implicit. Another student could describe an operation with a different output type altogether. An evaluator needs to decide when the evidence in the prompt supports the intended task and when it suggests a misunderstanding. The filter is designed to keep the main failure comparison focused on descriptions that convey evidence of understanding. A retained prompt can still be difficult to follow or leave relevant behavior underspecified.

The datasheet gives no recommended training and test split. The four named subsets reflect the history of the collected prompts and organize the benchmark evaluation. The paper uses them to compare existing generators. It describes [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) on student wording and learning to classify prompts as possible uses of the data. The reported results come from evaluating generated completions, with no new training procedure in the study.

#### Estimate the chance of a passing completion

The evaluation uses pass@1, the estimated probability of getting a completion that passes every test when drawing a single response. For each prompt and generator, the authors estimate this probability from 200 sampled completions. The quantity at pass@1 can be expressed as the fraction of those completions that pass.

```
pass@1 = c ÷ n
```

Here `pass@1` is the estimated success probability for one draw. The name’s `1` indicates that the user receives one completion in the event being measured. The symbol `c` is the count of sampled completions that pass the entire test suite, and `n` is the total number of sampled completions for that prompt and generator. The symbol `÷` denotes division, and `=` identifies the fraction used as the estimate.

The averaging happens after the individual prompt scores are available. A subset mean summarizes the scores of prompts whose first or final submission had the indicated outcome during collection. Another view used by the paper groups prompts by programming problem before comparing the distributions. That view asks how repeatable generation is across tasks, given the student descriptions in a particular subset, and can show a pattern that a mean over the subset would obscure.

### Experiments and results

#### The benchmark and its point of comparison

The main evaluation covers 12 code generators across the four prompt subsets. The comparison includes GPT-3.5-Turbo-0301 and Phi-1, the Python-specialized Code Llama variants, and several sizes of StarCoderBase. It also includes Replit-Code-v1, SantaCoder, and StarChat-Alpha. The authors checked that StudentEval prompts did not appear in The Stack, the open training collection used by StarCoderBase and other generators. This check addresses whether those particular descriptions appeared in that collection. The tasks themselves were deliberately drawn from the kinds of programs students encounter in introductory courses.

The HumanEval column supplies the comparison with expert-authored instructions. A score there measures performance on a separate set of programs under that benchmark’s wording and tests. StudentEval pairs its own tasks with novice wording, including requests that were difficult during collection. Reading the benchmarks together shows which differences in performance become visible when the evaluation changes. The expert and student descriptions of StudentEval tasks would be needed for a within-task comparison of those two kinds of authorship.

The paper reports mean pass@1 values on a percentage scale in its main results table. Elsewhere, it writes the score of an individual prompt as a probability. The `convert` example shows this difference in scale and in scope. Its two illustrated descriptions have pass@1 estimates of 0.8 and 0.0, respectively. Both are results for individual prompts on the same task. The subset columns instead summarize many prompts.

#### Performance on descriptions that passed during the study

Code-Llama-Py-34B has the highest mean on both Success subsets. It scores 73.51 on First Success and 64.65 on Last Success. Code-Llama-Py-13B scores 70.22 and 62.26 on the same subsets, while Code-Llama-Py-7B reaches 66.88 and 55.36. The ranking within this family is consistent across the two columns. The scores also show a difference between the kinds of collection-time success. The formulations that passed after a failed attempt were generally less likely to pass again than the formulations that had worked immediately.

StudentEval First Success mean pass@1 by generator The Python-specialized Code Llama variants lead the comparison on prompts that passed on the first submission.

**The numbers**

| System or setting | mean pass@1 % |
| --- | --- |
| GPT-3.5-Turbo-0301 | 44.84 |
| Phi-1 | 59.16 |
| StarCoderBase (15.5B) | 65.28 |
| Code-Llama-Py-7B | 66.88 |
| Code-Llama-Py-13B | 70.22 |
| Code-Llama-Py-34B (this paper) | 73.51 |

First Success is a useful group for interpreting this gap because every prompt in it already yielded a passing completion during the study. The replay assesses how transferable and repeatable that success is. For instance, GPT-3.5-Turbo-0301 records 44.84 on First Success and 47.40 on Last Success. The direction for this generator differs from the pattern for the Python-specialized Code Llama variants and for Phi-1. It would therefore be misleading to treat a prompt’s position in an attempt sequence as a difficulty ranking that holds for every generator.

The Last Success group brings the role of revision into the comparison. These prompts worked after an earlier failure, so they contain descriptions written in response to some combination of code and test feedback. They include different ways of refining a request. The data allow those refinements to be studied as language, while their aggregate pass@1 results establish how well the revised prompts transfer. A comparison of Last Success with First Success draws on the observations collected in each group. To estimate the effect of a specific revision, one would need to compare the original and changed wording under comparable sampling conditions.

StudentEval Last Success mean pass@1 by generator Code-Llama-Py-34B leads on final prompts that passed after an earlier failure, and the StarCoderBase sizes span a wide range.

**The numbers**

| System or setting | mean pass@1 % |
| --- | --- |
| StarCoderBase-1B | 13.00 |
| StarCoderBase-3B | 32.20 |
| Phi-1 | 36.36 |
| StarCoderBase-7B | 46.42 |
| StarCoderBase (15.5B) | 51.74 |
| Code-Llama-Py-13B | 62.26 |
| Code-Llama-Py-34B (this paper) | 64.65 |

#### What the failure subsets add

The prompts that failed for students tend to have much lower means in replay. In the main table, Code-Llama-Py-34B scores 12.65 on First Failure and 11.68 on Last Failure. Phi-1 scores 12.59 and 9.64 on the same groups. GPT-3.5-Turbo-0301 records 11.76 on First Failure and 13.90 on Last Failure. The largest Code Llama variant leads on First Failure, while GPT-3.5-Turbo-0301 leads on Last Failure. The strong ranking of the Code Llama variants on the success groups thus applies to a particular set of prompts with observed collection-time success.

The failure results show why annotating for task understanding leaves a meaningful evaluation problem. Even after experts excluded descriptions that gave insufficient evidence that the student knew what to implement, the surviving groups were difficult. A student can understand the desired result and still leave a consequential detail implicit. The generator can also miss a detail that a human reader would have inferred. The test outcome captures the behavior of the resulting code. The annotation adds a judgment about how the prompt relates to the task.

The paper reports different failure means in its main and appendix tables. For Code-Llama-Py-34B, for instance, the appendix prints 11.40 on First Failure and 10.14 on Last Failure, alongside the same First and Last Success scores as in the main table. The appendix table has lower values in the failure columns and does not explain the basis for the discrepancy alongside those results. The comparisons of failure means here use the main results table. The Success and HumanEval comparisons use values shared by both tables.

#### Why the authors call StudentEval more discriminating

The clearest comparison is in the Last Success scores across StarCoderBase sizes. The 1B variant earns 13.00, while the 15.5B variant earns 51.74. On HumanEval, the corresponding scores are 15.17 and 30.40. The ordering is the same within this comparison, but the separation on StudentEval makes the relative performance on revised student descriptions more visible. The middle sizes also separate more strongly on Last Success. StarCoderBase-3B scores 32.20 and StarCoderBase-7B scores 46.42 there, compared with 21.46 and 28.37 on HumanEval.

The comparison of Phi-1 with Code-Llama-Py-34B points to a similar result across generator families. Their HumanEval scores, 51.22 and 53.29, are close. On First Success, Phi-1 reaches 59.16 and Code-Llama-Py-34B reaches 73.51. On Last Success, the scores are 36.36 and 64.65. A reader choosing only from the HumanEval column would have considerably less evidence about the difficulty of these student descriptions. The authors suggest that the textbook-oriented training described in [Textbooks Are All You Need](https://md.research.elamur.ai/free/en/papers/gunasekar-2023-textbooks-all-you-need/) could help explain Phi-1’s relative position on expert-authored prompts. The study does not vary that training data, so the proposed explanation remains a hypothesis.

StudentEval’s ability to reveal these differences is a result about the tested generators and subsets. The comparison changes the tasks, instructions, and test suites together. In particular, Last Success represents a kind of request that HumanEval’s aggregate score has no reason to capture directly: a beginner’s revised formulation after feedback from a failed attempt. The comparison shows what information such a benchmark adds to an expert-authored evaluation. It leaves the contributions of the different benchmark design choices open.

#### How often a single outcome is misleading

Mean pass@1 measures the typical success probability across prompts, but individual prompt histories can run against that tendency. The paper shows cumulative distributions of per-problem mean pass@1 for the four subsets. For a given position on the horizontal axis, the vertical axis gives the share of problems with a mean below that value. This shows whether low or high scores occur broadly across the problem set, instead of leaving readers to infer the shape of the distribution from an overall mean.

For individual prompts, the authors define an unreliable success as a description in First Success or Last Success with pass@1 below 0.2. It generated passing code for the student, yet passing completions are uncommon in the replay. They define a reliable failure as a prompt in First Failure or Last Failure with pass@1 above 0.8. It failed during collection despite being a description that the generator under evaluation typically follows successfully. The terminology combines a label from the collection session with a probability estimated later.

In the paper’s aggregate account, almost 10% of successful prompts were unreliable for small generators, compared with less than 3% for larger ones. The authors identify one reliable failure for GPT-3.5-Turbo-0301 and two for StarCoderBase. The counts have a different meaning from the percentage of unreliable successes because they refer to different subsets and thresholds. Both outcomes show why the session history and replay results are worth keeping side by side. Once the text is held fixed, a new completion can change the outcome the student sees.

The participant-level analysis adds another perspective. With StarCoderBase, some participants had mean pass@1 above 50%, while many participants had difficulty producing descriptions that worked reliably. A participant’s mean reflects the prompts they wrote for the problems they encountered, as evaluated by that generator. The figure records considerable variation in this interaction. It leaves open how much of a person’s result comes from task assignment, the wording strategies they used, or the generator’s familiarity with those strategies.

### What the ablations show

The paper does not present a conventional component ablation of a code generator. Instead, it uses a signature-only baseline, comparisons across attempt histories, statistical associations with wording, and analyses of prompt representations and generated behavior. Together these examine what information the description supplies, which features accompany better outcomes, and what kinds of variation remain when the prompt itself stays fixed.

#### What changes between early and late descriptions

The signature-only check is the comparison that most directly removes part of the input. Withholding the docstring asks how much Codex can infer from the function signature. The low mean reported for that condition shows that the prose generally has a job to do. The unusually high score for `exp` shows why the authors carried out the check at the task level. A name that identifies a familiar operation can sometimes do much of the work even if the rest of the task collection resists that shortcut.

The authors also examine how descriptions change after students see a failure. Final descriptions are longer than first descriptions, and the authors frequently observed people adding text to an existing explanation. A longer prompt may contain a detail that was previously missing. It can also contain several restatements as the student tries to make the requirement harder to miss. The prompt length analysis asks whether that extra text, in the range observed in StudentEval, accompanies a higher rate of passing completions.

Length was measured by the number of units identified by the paper’s tokenizer and scaled for the regression. The authors specify the scaling as follows.

```
L = t ÷ 100
```

Here `L` is the scaled prompt length entered into the analysis, `t` is the prompt’s raw token count, and `100` is the divisor used for scaling. The symbol `÷` denotes division, and `=` defines the value of `L`. A token is a unit of text recognized by the tokenizer, which can include a word or a meaningful piece of Python syntax.

The length coefficient for StarCoderBase pass@1 is 0.06, with a p-value of 0.008. This is an estimated positive association in the regression. Successful and unsuccessful first submissions had similar average lengths. The authors attribute much of the overall association to later submissions, where successful descriptions were longer on average. The distinction matters because later descriptions were written after feedback. The extra text may be recording a clarification learned from the failed code. Prompt position and the experience behind the revision are part of the setting in which the length result was observed.

#### Which words accompany better outcomes

To compare vocabulary, the authors treat each prompt as a short document. They use [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) adapted to prose that can contain Python expressions. A list, an indexing expression, or a comparison operator can carry meaning as a unit. Splitting a description exclusively at ordinary word boundaries could make such features harder to recognize. The preprocessing also groups references to functions and parameters under shared placeholders, and groups forms of `return`. It treats capitalized forms of names cautiously because capitalization can turn what looks like an identifier into an ordinary word at the start of a sentence.

The authors then use [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) to compare salient terms. This measure gives weight to terms used in a document while discounting ones broadly shared across the collection. The authors compute mean weights for the top 25 features in each subset and look for overlap. The prominent terms reflect a mixture of Python vocabulary and ordinary words about choices, sequence, and data types. This analysis identifies vocabulary worth examining more closely. A term can help distinguish a group of prompts even if its presence alone has little relationship with test outcomes.

The statistical comparison uses mixed-effects regression. StarCoderBase pass@1 for a prompt is the response being explained. A random intercept for each problem allows the expected score to start from a different level for different tasks. Otherwise a word used largely for easy problems could look beneficial merely because those problems are easy. For vocabulary features, the analysis codes whether the term occurs. The corresponding indicator is `1` when a prompt uses it and `0` when it does not. The paper reports fitting these analyses in R with lme4 and omitting random slopes because of the complexity of the fit.

The input and output vocabulary provides a concrete result. Mentioning `return` has an estimated coefficient of 0.07, with a p-value of 0.00002 in the main discussion. The authors observed cases in which wording about output left room for a function to print a value. A Python function can display the expected characters and still fail a test checking the value returned to its caller. The estimated association fits that explanation. In the appendix regression, the estimates for mentioning `input`, `print`, or `output` do not provide comparable evidence of an association. The distinction concerns this function interface and these tests.

There is also evidence that the vocabulary used to name a data structure matters. The main discussion reports a coefficient of 0.04 and a p-value of 0.02 for `list`. For `array`, it reports a coefficient of -0.07 and a p-value of 0.048, which the authors describe as a borderline negative result. Their interpretation is that StarCoderBase is sensitive to Python’s terminology. Those terms may also occur in descriptions that differ in other ways. The regression accounts for differences in the baseline difficulty of problems, but it does not exchange the words within matched prompts and rerun them.

The function name itself already appears in the signature. Repeating it in the description is associated with a coefficient of -0.07 and a p-value of 0.02. For parameter names, the appendix reports 0.01 with a p-value of 0.62, and the authors find no reliable relationship. This is a useful comparison because both kinds of names are visible to the student and supplied to the generator in the signature. The study establishes an association for the function name in the collected descriptions. It leaves open whether repeating the name contributes to the result or simply accompanies a kind of explanation that tends to be less effective.

#### What the prompt clusters reveal

The authors also look at patterns beyond individual words. To represent prompts numerically, they use attention weights from the final layer of StarCoderBase and Code Llama 34B. Attention weights reflect how parts of the input are related within the generator’s processing. The authors use t-SNE to project those representations into a plot where local groups can be inspected. The main illustrations use StarCoderBase, and the appendix reports similar patterns for Code Llama 34B. The clusters are exploratory evidence about what the representations group together.

For the `combine` task, prompts form distinct groups associated with different ways of explaining the operation. Some give a short instruction to combine corresponding material. Others spell out that the inputs contain lists, explain how to pair the items from the two inputs, and describe collecting the results. Both approaches sometimes generate passing functions. This example grounds the vocabulary study in whole descriptions. A brief request and a step-by-step procedure can communicate the same task through different amounts and kinds of detail.

In the `check_for_aspen` task, some groups expose specific mismatches. The authors identify descriptions that leave the return-versus-print distinction open. They also see descriptions using lower-case `aspen` where the tests expect `Aspen`. The latter difference is easy to overlook when reading the request as ordinary prose. It is consequential when the required behavior depends on the exact string. A cluster can draw attention to a family of related mistakes whose cause is clearer once the individual descriptions and tests are inspected together.

Another group contains prompts for several different tasks that mainly present input and output pairs. There are successful descriptions of this kind, but the authors report difficulty with examples involving nested lists or dictionaries. In the plotted representation, some descriptions of distinct tasks lie close together when they use this style. A pair of examples can be a useful way for a person to communicate what should happen. With more complex inputs, the description may also need to make explicit which parts of the example should change, in what order, and under which rule. The visual comparison shows where the generators had difficulty with this format in the study.

#### What changes when the words stay fixed

The semantic ambiguity analysis asks whether repeated completions implement the same behavior. Two programs can use different code while giving the same result on every input. Conversely, closely related implementations can differ on a case that matters. Generally, the authors point out, equivalence cannot be decided for arbitrary programs. Their comparison uses a test signature, which is the ordered collection of outputs an implementation produces on the test inputs.

```
S(f) = (f(x₁), …, f(xₘ))
```

Here `f` is a generated function and `S(f)` is its test signature. The symbol `x` denotes a test input, the subscripts `₁` and `ₘ` identify the first and final inputs, and `m` is the number of inputs in the sequence. Each expression of the form `f(x)` denotes the output of the function on that input. The parentheses and commas on the right group the outputs in test order, `…` represents the intervening outputs, and `=` defines the signature.

When two signatures differ, the tests have supplied an input on which the functions behave differently. When the signatures agree, the functions could still differ on inputs the authors did not try. The number of observed signatures is thus a lower bound on behavioral diversity among the completions. The method distinguishes programs by evidenced behavior, which is useful when many syntactic differences are irrelevant to the student’s request.

For StarCoderBase, the mean number of distinct functions observed per prompt was 2.2 for First Failure and 2.4 for Last Failure. For First Success it was 1.9, and for Last Success it was 2.2. The corresponding medians were 2.0 for First Failure, 2.0 for Last Failure, 1.0 for First Success, and 2.0 for Last Success. The standard deviations were 1.6 for each Failure subset and 1.3 for each Success subset. First-success descriptions usually produced fewer distinct observed behaviors, but even a prompt that passed immediately could elicit several kinds of program.

One such prompt concerns capitalization within words. The student wanted alternating letters capitalized, with the starting position depending on whether a word had an odd or even length. The prompt went into First Success because its study completion passed. In the ambiguity analysis, it produced 7 functions distinguishable by their test signatures. The example shows how a reader can recognize a clear general instruction while the generator still produces divergent code. Counting distinct behaviors tells the reader something beyond pass@1. The pass rate estimates how often the intended behavior appears, while the signature count shows whether the other samples converge on a single alternative or spread across several observed behaviors.

### Limitations

#### Limits the authors state

The participants represent a particular group of beginners. They had taken an introductory Python course at one of three selective institutions in the United States, and the tasks were aligned with that preparation. The authors caution that students elsewhere and non-expert programmers with different backgrounds may describe the same operations differently. The datasheet also notes that participants used a range of English dialects while leaving their representativeness of English-speaking students unmeasured. The results are evidence about the group and collection procedure studied.

All descriptions were in English, and all functions were in Python. The authors distinguish both constraints. Someone writing in another natural language might use different conventions to explain a computation. A different programming language might change what needs to be specified about the interface or data, along with how well generators can carry out the request. StudentEval establishes neither of those generalizations.

Collection-time interaction used one system, Codex. Every retry followed feedback from it, and every First or Last category records an outcome produced by it. The authors explicitly allow that students might write different revisions if another generator returned different code or failed different examples. They consequently give little emphasis to direct comparisons between Codex and the other generators. They cite established benchmark performance to explain the choice of Codex. That comparison establishes its relevance as a code completion system at the time of the study, while leaving the effect of its particular feedback history open.

The authors also discuss the implications of releasing student work. Participants consented to publication of anonymized data, and the study was designed to protect their autonomy outside normal classroom activity. The authors acknowledge that future users could generalize the results beyond the student population or use the dataset to develop educational automation they would consider harmful. The evaluation itself depended on access to generators and computing resources. The authors put the GPU time for their reported evaluation of 12 generators at about two weeks on an H100. They describe that resource requirement as part of the practical context for this research.

#### Limits of the tests and the study design

Test-based correctness is bounded by the examples used. The reference solution’s code coverage and the mutation checks give evidence that the suite exercises important behavior. A completion can still agree with it on the available inputs and differ elsewhere. The same issue applies to the test signatures used for the ambiguity analysis. Distinct signatures establish a behavioral difference, while shared signatures leave equivalence unresolved. The study measures repeatability and diversity at the resolution provided by the tests.

The examples shape the wording as well. Students infer a general rule from a finite set of input and output pairs. More than one rule can fit a finite set of observations, especially when an edge case is absent. The introductory classroom setting helps students recognize the intended conventions, and the expert review screens for apparent misunderstandings among failures. Still, the procedure can select for descriptions that reviewers find easy to recognize as explanations of the intended rule. The filter’s judgment involves what the student communicated on the page, which is only indirect evidence about their understanding.

The benchmark comparison also needs to be read at the level at which it was conducted. HumanEval and StudentEval use different tasks and tests as well as different prompt authors. Their score gaps show that the choice of benchmark affects what separates the tested generators. They cannot quantify how much of that change is due solely to student authorship. Similarly, the ordering across sizes in the StarCoderBase and Code Llama families is observed under the training and evaluation conditions of those systems. The paper does not isolate parameter count from the other factors affecting performance.

The wording analyses have a related limit. A person who says `return` may also explain the expected type more carefully. A person who writes `array` may use a different vocabulary throughout the prompt. The problem intercepts in the regression can account for differences in baseline difficulty among tasks, while the co-occurrence of wording choices within a prompt can still matter. The embeddings and their projections help locate groups to inspect, but they do not establish how the generator internally interpreted any individual instruction. The regression, plots, and examples support different levels of inference.

Finally, the educational implication follows from the feedback students received, rather than from a measured change in learning. A student may take a pass as evidence that their wording was precise, or take a failure as evidence that it needs more explanation. StudentEval shows that neither inference is warranted from the outcome of a single completion alone. It does not track subsequent programming competence or compare teaching interventions. Its evidence concerns the reliability of the signal available at the moment of revision.

### What came after

[A Survey on Large Language Models for Code Generation](https://md.research.elamur.ai/free/en/papers/jiang-2024-survey-large-language-models-code/) (2024) cites StudentEval in the context of a broad survey of code generation. The connection is to the scope of evaluation. StudentEval offers a benchmark in which several people can ask for the same function in their own words, making it possible to study performance under variations an expert-written prompt does not capture. The citation establishes that the survey discusses work in this area. It does not establish a new evaluation on the student prompts or a replication of the reported results.

[CodeGuard](https://md.research.elamur.ai/free/en/papers/raihan-2026-codeguard-improving-llm-guardrails-cs/) (2026) cites StudentEval in work on improving guardrails in computing education. The educational connection is specific. StudentEval examines what feedback a beginner receives from a generator and why passing or failing tests on one response can be a poor indication of how reliable the request is. CodeGuard addresses guardrails in that broader setting. The citation does not establish whether it reuses StudentEval’s prompts, adopts its attempt categories, or evaluates its approach through repeated generation.

## Cite

Cite as Hannah McLean Babe, Sydney Nguyen, Yangtian Zi, Arjun Guha, Molly Q Feldman and Carolyn Jane Anderson. 2024. StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Code. Findings of the Association for Computational Linguistics: ACL 2024.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2024.findings-acl.501](https://doi.org/10.18653/v1/2024.findings-acl.501)

```bibtex
@inproceedings{babe2024studenteval,
  title = {{StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Code}},
  author = {Hannah McLean Babe, Sydney Nguyen, Yangtian Zi, Arjun Guha, Molly Q Feldman and Carolyn Jane Anderson},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2024},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.501},
  url = {https://doi.org/10.18653/v1/2024.findings-acl.501}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
