Research · September 22, 2026
When Who You Are Can Change the Code You Get: A Study of Persona-Induced Bias in LLM Code Generation
Reported by arXiv cs.AI + cs.CL
In short
A large-scale study tested whether revealing user demographic details (nationality, gender, experience level) affects the quality of code generated by LLMs like Gemini 2.5 Pro and a 120B open-weight model. Across 35,000+ programs, demographic cues leaked into model reasoning and outputs up to 70% of the time, with measurable differences in correctness, maintainability, and security compared to a neutral baseline.
Why it matters
If LLMs quietly deliver lower-quality code based on who they think the user is, that is a serious fairness and reliability problem for anyone building or depending on AI coding tools.
Terms used in this story
Read the original reporting
arXiv cs.AI + cs.CL (opens in a new tab)AI Download summarizes and links to the news. We do not republish full articles.