Developer Tools

AI Trained on Old Code Could Be Making Mistakes—Here's Why

AI Trained on Old Code Could Be Making Mistakes—Here's Why

⚡Your favorite coding assistant might be learning from outdated code, and it's costing you time.

Deep Dive

When companies train AI to write code, they often feed it the entire history of a software project—every change ever made. A new study shows this history is highly repetitive: a typical project contains the equivalent of 19 copies of its current code, and mature projects have 89 copies. That's because most edits change only a few lines, leaving the rest of the file the same. So even though each version is slightly different, they're mostly identical.

To reduce repetition, AI trainers use deduplication—a process that groups near-identical files and keeps just one. But the study found that in many tools, the version kept is often an old one, because the selection rule ignores dates. That means AI could learn from outdated code, leading to suggestions that are inefficient or even buggy. The fix: sort versions newest first before deduplicating, which is easy and cheap.

Another problem is benchmark contamination. Benchmarks like SWE-bench test AI on real bug fixes, but those fixes appear in many later versions of the files they changed. So if you train on history, you might accidentally include the answers, making the AI look smarter than it is. To avoid this, you need a separate step that checks every version for benchmark fixes.

The study's authors release a set of rules and tools for teams that train on code history. For everyday users, this means the AI coding assistants you use could be giving you outdated advice—but with these fixes, they can be more accurate and up-to-date.

Key Points
  • Code history is highly repetitive—a typical project has 19 copies of its current code.
  • Deduplication tools often keep old versions, so AI may learn outdated coding practices.
  • Benchmark answers persist in many versions, so testing AI requires careful checking.

Why It Matters

AI coding tools might suggest outdated code, wasting your time and causing bugs—but simple fixes can make them more reliable.

🔒 FREE VIP ACCESS

Read the full breakdown & get daily AI executive intelligence

Join like-minded builders, researchers, and AI professionals who read The Neural Feed daily. 100% free. No spam.

🔔 BREAKING RELEASE RADAR INSTANT ALERTS • 1-CLICK PAUSE

Get instant breaking AI release alerts by topic

Choose the AI labs, models, or chip tracks you follow. Receive fast alerts only when something major ships — plus our free daily morning briefing.

Includes full article unlock • Only major releases • Unsubscribe anytime
🎁 FREE EXECUTIVE DOWNLOAD ISSUE #21

Download This Week's 8-Page Executive AI Briefing (PDF)

Our curated executive intelligence packet: in-depth breakdowns of frontier models, market movements, plus full-color AI comics.

  • ✓ 8-page formatted executive PDF briefing
  • ✓ Frontier AI models & technical breakthroughs
  • ✓ Full-color satirical AI comic strips
Instant 1-click download • 100% free • Unsubscribe anytime
📬 Get the top 10 AI stories daily