← Latest papers
🤖 machine learning

Where Do LLMs Still Struggle? An In-Depth Analysis of Code Generation Benchmarks

This paper analyzes code generation benchmarks to identify tasks where large language models consistently fail, revealing four recurring weakness patterns and common task complications that hinder performance.

Original authors: Amir Molzam Sharifloo, Maedeh Heydari, Parsa Kazerooni, Daniel Maninger, Mira Mezini

Published 2026-07-07
📖 5 min read🧠 Deep dive

Original authors: Amir Molzam Sharifloo, Maedeh Heydari, Parsa Kazerooni, Daniel Maninger, Mira Mezini

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 a group of highly intelligent, super-fast robots (Large Language Models, or LLMs) that have been trained to write computer code. They are like brilliant apprentices who have read almost every cookbook in the world and can now whip up a meal (a piece of code) just by hearing a description of what you want.

Researchers from Germany decided to put these robots through a series of rigorous cooking contests (benchmarks) to see how good they really are. Instead of just looking at who won the most medals, they wanted to find out why the robots kept burning the same specific dishes, even when they were supposed to be experts.

Here is what they found, broken down simply:

1. The Setup: The Cooking Contests

The researchers picked four famous "cooking competitions" (benchmarks) used to test these robots:

  • HumanEval & MBPP: These are like basic recipe tests. "Make a cake," "Chop some onions." They are short and simple.
  • LiveCodeBench & BigCodeBench (Hard): These are like high-stakes culinary challenges. "Create a 10-course meal that adapts to a guest's allergy, using ingredients you've never seen before, while the kitchen is on fire." These are much harder.

They tested six different "chefs" (AI models) on hundreds of these tasks.

2. The First Question: Is it just because the recipes are too hard?

The researchers wondered: Do the robots fail because the dishes are just too complicated to make?

To check this, they measured the "complexity" of the correct answers (the solution code). They looked at things like:

  • How many steps are in the recipe? (Code Length)
  • How many times do you have to make a decision? (Cyclomatic Complexity)
  • How deep are the nested instructions? (Nesting Depth)

The Surprise:
For the easy contests (HumanEval and MBPP), the difficulty of the recipe didn't matter much. The robots failed simple tasks just as often as hard ones. It wasn't that the math was too hard; something else was going wrong.

However, for the hardest contest (LiveCodeBench), there was a link: the more complex the recipe, the more likely the robot was to mess up. But even there, complexity wasn't the whole story.

3. The Second Question: Why do they actually fail?

The researchers looked closely at 114 specific tasks where every single robot failed. They found four recurring "bad habits" that the robots share:

  • The "Wrong Menu" Mistake (Wrong Problem Mapping):
    Imagine a customer asks for a "spicy soup," but the robot hears "spicy stew" and starts making a stew. The robot assumes the task belongs to a category it knows well, ignoring the specific details.

    • Example: A task asked for a specific type of bracket sequence, but the robot just used a standard "balanced bracket" recipe it had memorized, missing the unique twist.
  • The "Half-Baked" Recipe (Flawed Algorithm):
    The robot gets the general idea right but misses a crucial step. It's like knowing you need to bake a cake but forgetting to preheat the oven.

    • Example: A robot tried to predict sales trends but forgot to handle a scenario where sales go down instead of up.
  • The "Edge Case" Blindness:
    Robots are great at handling normal situations but terrible at weird, rare ones. It's like a driver who is perfect on a sunny highway but crashes the moment it starts raining or a squirrel runs across the road.

    • Example: A robot could organize files in a main folder but completely forgot to look inside the sub-folders.
  • The "Picky Eater" Mistake (Formatting):
    The robot cooked the perfect meal, but the judge rejected it because the food was on a blue plate instead of a white one. The logic was right, but the output format was slightly off.

    • Example: The task asked for a number as a word ("23"), but the robot gave just the number (23).

4. The Twist: Sometimes the "Dumb" Robot Wins

Here is the most interesting part. The researchers noticed that the "smarter" robots (like Claude Sonnet-4) sometimes failed tasks that a "simpler" robot (Llama-3.3-70B) solved.

Why?
The smart robots were over-thinking the task. They tried to be "practical" by adding assumptions that made sense in the real world but broke the strict rules of the test.

  • Analogy: If a test says "List every IP address," the smart robot might think, "Oh, I should skip the network addresses because that's standard practice," and it gets it wrong. The simpler robot just followed the instructions literally: "List every single one," and it got it right.

5. The Problem with the Tests Themselves

The researchers also found that sometimes the "cooking contests" themselves were flawed.

  • Vague Prompts: The instructions were sometimes so unclear that the robots had to guess what the judge wanted.
  • Hidden Rules: The tests sometimes expected the robots to guess specific details that weren't written down. If the robot guessed right, it passed; if it guessed wrong, it failed. This wasn't a failure of the robot's brain, but a failure of the test design.

The Bottom Line

This paper tells us that while AI code generators are amazing, they aren't perfect. They don't just fail because tasks are too hard. They fail because:

  1. They make assumptions based on what they've seen before.
  2. They miss rare, weird scenarios.
  3. They get tripped up by tiny formatting details.
  4. Sometimes, they are too smart for their own good, over-optimizing when they should just follow orders literally.

The researchers hope this analysis helps build better robots and better tests in the future, so we can stop burning the soup and start cooking perfect meals.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →