Developer Tools

Your AI Coding Helper May Give You Worse Code Based on Who You Are

Researchers found AI writes slightly different code depending on your name and background.

Deep Dive

A team of researchers tested two coding assistants — Google's Gemini 2.5 Pro and a free, publicly available model called GPT-OSS-120B — to see whether it matters who the AI thinks it's helping. They created 18 fake users with different nationalities, genders, and experience levels, then asked each AI to write the same programs. In total, they produced more than 35,000 pieces of code and compared the results against a neutral version of the same requests with no personal details attached.

The details did not stay out of the way. The AIs mentioned the user's background in up to 70% of their internal reasoning and 65% of their written replies, even though none of it was relevant to the task at hand. Quality moved too. Gemini's code was slightly less accurate on average — about 1.5 percentage points worse — and one persona's code was 3.6% less likely to work correctly. Surprisingly, the free model did better with personas: its accuracy rose between 3.4% and 5.7%.

Other measures barely budged. Code cleanliness, formatting style, and security flaws showed no meaningful differences between the personas. So this is not a dramatic story about one group getting terrible code. But it is also not consistent — one model got worse, the other got better — which means the effect is unpredictable rather than a tidy pattern anyone could plan around.

Why should this matter if you don't write code yourself? Because the same AI helping your colleagues, your bank, or your doctor's office could quietly behave differently based on a name or a job title. Small gaps repeated across millions of users add up over time. For now, a sensible habit is to keep requests neutral, avoid handing AI tools personal details they don't need, and check the work you get back.

Key Points
  • Calling yourself a 'senior engineer' or a 'beginner' can nudge the AI toward different code, even for the same task
  • Personal details leaked into 70% of the AI's private reasoning and 65% of its answers, despite being irrelevant
  • Gemini's code got about 1.5 points less accurate on average; the free GPT-OSS model got 3.4-5.7% more accurate

Why It Matters

The AI tools writing software may quietly treat you differently based on your name, gender, or job title.

📬 Get the top 10 AI stories daily