RubberDuckBench: A Benchmark for AI Coding Assistants
The paper introduces RubberDuckBench, a multilingual benchmark derived from real-world GitHub pull requests to evaluate AI coding assistants, revealing that even state-of-the-art models struggle with consistency and correctness while frequently hallucinating, with no observed correlation between cost and performance.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a team of very smart, very fast robots that can write computer code for you. You ask them questions like, "Why does this part of the code act weird?" or "What happens if I change this number?" You expect them to look at the specific code you are working on and give you a perfect answer.
This paper, RubberDuckBench, is like a final exam for these robot assistants. The authors (researchers from Bryn Mawr College, Google, and Meta) wanted to see if these robots are actually good at answering questions about specific code, or if they are just guessing.
Here is the breakdown of their study using simple analogies:
1. The Problem: The "Out-of-Context" Trap
Before this study, most tests for AI coders were like asking a student to write a brand-new essay from scratch based on a prompt. But in real life, programmers don't just ask for new code; they ask questions about code that already exists in a specific project.
- The Old Tests: Like asking a chef, "How do you make a cake?"
- The Real World: Like a chef asking, "Why did my cake burn in the oven on the third rack?"
The researchers realized no one had built a good test for the second type of question.
2. Building the Exam: The "Rubber Duck" Method
Programmers often talk to "rubber ducks" (or their colleagues) to figure out code problems. The researchers looked at real conversations between developers on GitHub (a place where people share code).
- The Source: They found thousands of comments where developers were asking each other specific questions about their code.
- The Filter: Many comments were just suggestions like "fix this typo." The researchers used AI and humans to filter out the noise and turn the good questions into a clear, 15-question exam.
- The Grading Key: Because there isn't just one "right" way to explain code, they created detailed rubrics (grading sheets). Think of it like a teacher's guide that says, "If the student mentions the 'const' keyword, give them 2 points. If they lie about how the code works, take away 3 points."
3. The Test: 20 Robots Take the Exam
They put 20 different AI models (the "robots") through this exam. These included famous names like GPT-5, Claude Opus, Grok 4, and others. They asked them to answer the 15 questions based on the specific code provided.
4. The Results: The Robots Are Flawed
The results were surprising and a bit disappointing for the "super-smart" robots:
- No Clear Winners: The top robot, Grok 4, got about 69% of the questions right. The next best ones got around 68%. Statistically, they were all in the same "league." There was no clear champion.
- The "Perfect Score" Myth: Even the best robots rarely got a question completely right. The top robots only managed to answer 2 out of 15 questions perfectly across all their attempts. Most of their points came from "partial credit" (getting part of the answer right).
- The Lying Problem (Hallucinations): This was the biggest issue. On average, the robots lied or made up facts in 58% of their answers.
- Analogy: Imagine asking a tour guide about a specific street in your city. Half the time, they confidently tell you the street is a park when it's actually a bakery.
- Even the best models, like o3, lied in 67% of their answers.
- Python Struggles: The robots were much better at answering questions about Java and C++ code, but they stumbled significantly when the code was written in Python.
5. The Price Tag vs. Performance
The researchers also checked if paying more money or using a "bigger brain" (more parameters) made the robots smarter.
- Money doesn't buy genius: The most expensive models (like Claude Opus) cost a lot to run but didn't perform much better than cheaper ones. In fact, Grok 4 was the best performer but cost 12 times less than the expensive Claude models.
- Bigger isn't better: For open-source models, the biggest one (120 billion parameters) actually performed worse than a smaller one (20 billion parameters).
The Bottom Line
The paper concludes that while AI coding assistants are getting better, they are not yet trustworthy for answering complex questions about specific code. They often guess, they lie frequently, and the most expensive options aren't necessarily the smartest.
The authors built RubberDuckBench to be a target for future research, hoping to push developers to build AI assistants that are honest, accurate, and truly understand the code they are working with, rather than just making things up.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.