The LLM Wears Prada: Analysing Gender Bias and Stereotypes through Online Shopping Data

Massimiliano Luca, Ciro Beneduce, Bruno Lepri, Jacopo Staiano

Abstract

With the wide and cross-domain adoption of Large Language Models, it becomes crucial to assess to which extent the statistical correlations in training data, which underlie their impressive performance, hide subtle and potentially troubling biases. Gender bias in LLMs has been widely investigated from the perspectives of works, hobbies, and emotions typically associated with a specific gender. In this study, we introduce a novel perspective. We investigate whether LLMs can predict an individual's gender based solely on online shopping histories and whether these predictions are influenced by gender biases and stereotypes. Using a dataset of historical online purchases from users in the United States, we evaluate the ability of six LLMs to classify gender and we then analyze their reasoning and products-gender co-occurrences. Results indicate that while models can infer gender with moderate accuracy, their decisions are often rooted in stereotypical associations between product categories and gender. Furthermore, explicit instructions to avoid bias reduce the certainty of model predictions, but do not eliminate stereotypical patterns. Our findings highlight the persistent nature of gender biases in LLMs and emphasize the need for robust bias-mitigation strategies.

Introduction

As Large Language Models (LLMs) are increasingly integrated into e-commerce as recommendation engines and consumer behavior simulators, understanding how they handle behavioral data is critical. Most research on gender bias focuses on linguistic markers or professional associations. This study shifts the focus to consumer behavior, asking whether LLMs "understand" shopping patterns or simply project societal tropes onto digital shopping carts. For instance, if a woman purchases a vehicle lift kit, does the model correctly identify her, or does its internal statistical compass insist the buyer must be male based on stereotypical associations?

Methodology

The researchers developed a dual-approach experimental pipeline to test six state-of-the-art LLMs, including GPT-4o, Llama 3.3 70B, and Claude 3.5 Sonnet. The pipeline consists of two primary tasks:

  1. Product to User (Classification): Models were provided with a user's purchase history and asked to predict their gender. This was tested under "Standard" conditions and "Debiased" conditions, where the latter included explicit instructions to avoid stereotypes.
  2. User to Product (Recommendation): Models acted as shopping assistants, recommending product categories based on an assumed gender. This was tested both with minimal context and with a rich 30-item purchase history.
The dual-approach experimental pipeline showing 'Product to User' and 'User to Product' tasks.

To quantify bias, the study utilized Log Odds Ratios (OR) to identify "trigger" products for gender predictions and Jaccard Similarity to measure recommendation overlap when assumed gender changed. An "LLM-as-a-judge" (GPT-4.5) was also employed to categorize the models' open-ended reasoning.

Data Analysis

The study utilized a crowd-sourced dataset of historical Amazon purchases from 5,027 users in the United States, spanning 2018–2022. After filtering for individual accounts with binary gender identification, the final set included 1,781 females and 1,668 males. The dataset is characterized by high granularity, including order dates, prices, and specific product categories.

Sample of the historical Amazon purchase data used in the study.

Key Findings

Stereotypes as Heuristics

LLMs do not merely predict gender; they justify their decisions using classic tropes. In their explanations, models frequently cited "personal care" and "kitchen items" as female-coded, while "electronics" and "automotive" were strictly associated with male buyers.

Bias Amplification and Persistence

The models often proved more biased than the ground truth data. For example, items like "vehicle lift kits" and "DVD players" were purchased more frequently by females in the real dataset, yet LLMs consistently misclassified these users as male. Furthermore, the "Unbiased" prompt paradox revealed that telling a model "don't be biased" merely makes it more timid—increasing uncertainty and refusals—without fixing the underlying stereotypical logic when a prediction is actually made.

Asymmetric Recommendations

Recommendations for female-assumed profiles were significantly more "templated" and homogeneous than those for males. The between-gender Jaccard similarity was remarkably low (~0.19 to 0.22), meaning that simply changing the assumed gender of a user with an identical purchase history resulted in almost entirely different product recommendations.

Conclusion

While LLMs achieve moderate accuracy in gender classification (F1 scores of 0.66 to 0.70), their reliance on rigid stereotypes remains a significant hurdle for fair e-commerce applications. Future work should expand to intersectional biases—considering how gender interacts with race, age, or income—and move beyond simple prompting toward more robust structural interventions to mitigate these deep-seated associations.

Summary updated

Abstract

With the wide and cross-domain adoption of Large Language Models, it becomes crucial to assess to which extent the statistical correlations in training data, which underlie their impressive performance, hide subtle and potentially troubling biases. Gender bias in LLMs has been widely investigated from the perspectives of works, hobbies, and emotions typically associated with a specific gender. In this study, we introduce a novel perspective. We investigate whether LLMs can predict an individual's gender based solely on online shopping histories and whether these predictions are influenced by gender biases and stereotypes. Using a dataset of historical online purchases from users in the United States, we evaluate the ability of six LLMs to classify gender and we then analyze their reasoning and products-gender co-occurrences. Results indicate that while models can infer gender with moderate accuracy, their decisions are often rooted in stereotypical associations between product categories and gender. Furthermore, explicit instructions to avoid bias reduce the certainty of model predictions, but do not eliminate stereotypical patterns. Our findings highlight the persistent nature of gender biases in LLMs and emphasize the need for robust bias-mitigation strategies.
BibTeX
@misc{luca2025llm,
  author = {Massimiliano Luca and Ciro Beneduce and Bruno Lepri and Jacopo Staiano},
  title = {{The LLM Wears Prada: Analysing Gender Bias and Stereotypes through Online Shopping Data}},
  year = {2025},
  eprint = {2504.01951},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.01951},
}
Figure