The Invisible Hand: Unveiling Provider Bias in Large Language Models for Code Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have emerged as the new recommendation engines, surpassing traditional methods in both capability and scope, particularly in code generation. In this paper, we reveal a novel provider bias in LLMs: without explicit directives, these models show systematic preferences for services from specific providers in their recommendations (e.g., favoring Google Cloud over Microsoft Azure). To systematically investigate this bias, we develop an automated pipeline to construct the dataset, incorporating 6 distinct coding task categories and 30 real-world application scenarios. Leveraging this dataset, we conduct the first comprehensive empirical study of provider bias in LLM code generation across seven state-of-the-art LLMs, utilizing approximately 500 million tokens (equivalent to 5,000+ in computational costs). Our findings reveal that LLMs exhibit significant provider preferences, predominantly favoring services from Google and Amazon, and can autonomously modify input code to incorporate their preferred providers without users' requests. Such a bias holds far-reaching implications for market dynamics and societal equilibrium, potentially contributing to digital monopolies. It may also deceive users and violate their expectations, leading to various consequences. We call on the academic community to recognize this emerging issue and develop effective evaluation and mitigation methods to uphold AI security and fairness.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 27 of its 60 references that are in the map. First posted on arXiv 14 Jan 2025.
Builds on
27 of 60 references.
References · 27
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,093
- 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 683
- 2018Gender Bias in Coreference Resolution: Evaluation and Debiasing Methodscited by 657
- 2023Bias and Fairness in Large Language Models: A Surveycited by 626
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2022Prompting GPT-3 To Be Reliablecited by 258
- 2023Bias Runs Deep: Implicit Reasoning Biases in Persona-Assigned LLMscited by 191
- 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 94
- 2022Lost at C: A User Study on the Security Implications of Large Language Model Code Assistantscited by 87
15 more
- 2021Towards Long-term Fairness in Recommendationcited by 77
- 2020Fairness-Aware Explainable Recommendation over Knowledge Graphscited by 74
- 2021Collecting a Large-Scale Gender Bias Dataset for Coreference Resolution and Machine Translationcited by 62
- 2024Can Large Language Models be Good Emotional Supporter? Mitigating Preference Bias on Emotional Support Conversationcited by 55
- 2023BiasAsker: Measuring the Bias in Conversational AI Systemcited by 52
- 2024Prompting Techniques for Reducing Social Bias in LLMs through System 1 and System 2 Cognitive Processescited by 38
- 2021Improving Gender Fairness of Pre-Trained Language Models without Catastrophic Forgettingcited by 34
- 2024Understanding Biases in ChatGPT-based Recommender Systems: Provider Fairness, Temporal Stability, and Recencycited by 27
- 2024Exploring Safety-Utility Trade-Offs in Personalized Language Modelscited by 26
- 2023Are Large Language Models a Threat to Digital Public Goods? Evidence from Activity on Stack Overflowcited by 22
- 2024Can We Trust Large Language Models Generated Code? A Framework for In-Context Learning, Security Patterns, and Code Evaluations Across Diverse LLMscited by 17
- 2020FairMatch: A Graph-based Approach for Improving Aggregate Diversity in Recommender Systemscited by 15
- 2022ProFairRec: Provider Fairness-aware News Recommendationcited by 13
- 2022A Simple, Yet Effective Approach to Finding Biases in Code Generationcited by 8
- 2023Provider Fairness and Beyond-Accuracy Trade-offs in Recommender Systemscited by 6
Built on by
Citing papers per year: 2025: 5; 2026: 5.
10 papers.
- 2025A Study of LLMs' Preferences for Libraries and Programming Languagescited by 20
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2025BiasBusters: Uncovering and Mitigating Tool Selection Bias in Large Language Modelscited by 8
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
- 2026Nonstandard Errors in AI Agentscited by 0
- 2026Do LLMs Favor Their Providers? Measuring Vertical Integration Bias in Code Generationcited by 0
- 2026AI-driven Software Development: A Pragmatic Path to Agentic Development Processescited by 0
- 2026A Framework for Identifying, Categorizing, and Explaining Bias in AI-Generated Codecited by 0
- 2026CRJudgeBench: Can AI Detect Plausible but Invalid Code Reviews?cited by 0
- 2026CRJudgeBench: Can AI Detect Plausible but Invalid Code Reviews?29 Sep 2026
- 2026A Framework for Identifying, Categorizing, and Explaining Bias in AI-Generated Code25 Sep 2026
- 2026AI-driven Software Development: A Pragmatic Path to Agentic Development Processes13 Jun 2026
- 2026Do LLMs Favor Their Providers? Measuring Vertical Integration Bias in Code Generation27 May 2026
- 2026Nonstandard Errors in AI Agents17 Mar 2026
- 2025BiasBusters: Uncovering and Mitigating Tool Selection Bias in Large Language Models30 Sep 2025
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action16 Jun 2025
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025A Study of LLMs' Preferences for Libraries and Programming Languages21 Mar 2025