Urgent.News

What's breaking now, across thousands of outlets.

AI

AI models catch bad code, then cry wolf on the good code

I wanted to know one thing. When an AI model reads a data-science tutorial, does it check the code or believe the caption? So I built Blog vs Bytecode , a Kaggle benchmark of 28 short data-science snippets. Each pairs a piece of code with a blog-style claim about it. Half the claims are honest and the method is sound. The other half hide a real mistake: a scaler fit before the train/test split, a…

I conducted a Kaggle benchmark called Blog vs Bytecode to explore how AI models handle data-science tutorials. Each pair featured a piece of code alongside a corresponding blog-style claim. Half of the claims were genuine, while the other half contained deliberate mistakes like improper scaler fitting, feature construction from the target variable, improper cross-validation on time-series data, quoting accuracy on highly imbalanced data, and threshold tuning on the test set.

The dataset was balanced at 15/13, meaning a model that simply flagged every example as problematic would achieve a 50% accuracy score. I tested various current models on Kaggle and observed that some models were excellent at identifying genuine flaws, but they also often flagged correct code as problematic. Conversely, other models tended to miss the flawed code.

I discovered that the issue stemmed from the harness used to run the models on Kaggle. The harness was lying about half the models it ran for you, leaving empty responses which were counted as wrong. When I fixed the harness by having it return the actual model output instead, the performance of the models improved significantly. For instance, DeepSeek-R1's error rate dropped from 17% to 100% when the harness was fixed.

While the strong models were near-perfect at flagging genuine flaws, they also tended to call sound code problematic. Small models, on the other hand, under-flagged flaws. Notably, models with reasoning capabilities scored better when reasoning was enabled, while those without reasoning saw a significant drop in performance. The benchmark, which includes all items, verdicts, and the grader, is publicly available on Kaggle for anyone to examine the models' outputs and identify any errors.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Hermeneutic turns your AI corrections into context for the next task

You ask a coding agent to review a function. It starts refactoring. You steer it back to the review you requested. That exchange contains useful information about your intended scope.

  • Hermeneutic transforms AI corrections into context for future tasks
  • Analyzes supported Claude Code, Codex, and OpenAI-format logs
  • Matches new prompts against earlier prompts using Ollama embeddings

More from Sunday 27 September →