
The Python Preference of LLMs
LLMs show significant bias in programming language selection
This research reveals strong biases in LLMs' programming language preferences, potentially impacting software security and reliability across industries.
- LLMs demonstrate a clear preference for Python regardless of the task requirements
- Models show inconsistent reasoning when explaining programming language selections
- These biases can lead to suboptimal security choices in generated code
- LLMs often fail to consider important context when recommending languages or libraries
These findings have significant security implications as organizations increasingly rely on LLMs for code generation, potentially introducing vulnerabilities through inappropriate language selection.
LLMs Love Python: A Study of LLMs' Bias for Programming Languages and Libraries