wikillm

Paper · 2023-12-24 · cs.AI, cs.IR, econ.EM, stat.AP

The Challenge of Using LLMs to Simulate Human Behavior: A Causal Inference Perspective

When LLMs play blinded subjects in a price experiment, the price also shifts unstated covariates, which confounds the simulated demand curve. Adding covariates to the prompt can cause focalism. Telling the model the randomization design (unblinding) lowers error against a human survey across GPT models, including after fine-tuning. All results are author-reported.

Causal inferencePrompt engineeringLLM simulated participantsllm-simulationcausal-inferenceprompt-designdemand-estimation

arXivPDFMarkdown9 min read

AI-compiled by claude-haiku-5-5 on 2026-10-31, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Researchers increasingly ask a language model to play the part of a customer, for example to predict what people would buy at different prices. The usual way to set this up copies a human experiment: each simulated customer sees one scenario and is not told that the scenario is part of a test. The paper shows that this habit breaks for language models. When the price changes, the model also quietly changes other details it invents about the shopper and the store, such as what they paid last time or what a rival product costs. The price effect then mixes with those invented details.

Adding those details to the prompt as explicit facts does not fix it cleanly, because the model then pays too much attention to them. The authors' fix is to tell the model how the experiment is designed: that the price is randomly drawn from a stated range and that the customer does not know this. The paper reports that this consistently improves agreement with a real human survey, for every model tested, and that it still helps after fine-tuning and when irrelevant extra data is mixed in.

TL;DR

  • Blinded LLM simulations of experiments treat the treatment (price) as correlated with unspecified variables, which breaks the unconfoundedness assumption §1, §2.
  • Controlling for covariates in the prompt can reduce that confounding but causes focalism, so error first falls and then rises as covariates are added §3, app. E.
  • Unblinded prompts, which state the randomization design, lower error against a human survey across GPT models, after fine-tuning, and with an irrelevant dataset mixed in §5.

Problem

Experiments with human subjects randomise treatments so that unseen variables stay balanced. A language model simulating subjects generates those variables on the fly from the prompt, so changing the treatment in the prompt can change them too §2, §5. The authors say this breaks unconfoundedness and produces implausible demand curves; in their pricing study the simulated curve is inverted-U, while the human curve slopes downward §2, fig. 2. The usual remedy, adding covariates to the prompt, can trade confounding for ecological validity §3.

The paper's scope is one demand-estimation setting (40 consumer packaged-goods products, one human survey) and one main model, gpt-4o-mini-2024-07-18, for the covariate analysis §2, §3. Model-level claims in §5 use other GPT models, listed only in a figure §5, fig. 6.

Method

The paper has two parts: a demand-estimation study that exposes the confounding, and an experimental fix, unblinding, that is tested on several models and in fine-tuning.

Study design. For each of 40 products the regular price is taken from Walmart.com around April 2024, and the price is swept from 0% to 200% of that price in 20% steps, giving 11 points §2, app. A. For each prompt and each product-price cell, the model is called independently 50 times at temperature 1, and the purchase probability is the share of purchase answers §2.

Diagnosing confounding. The model is asked to fill in unspecified variables (last price paid, competing price, expiry days, and others) given the randomized price. The resulting correlations with price are reported §2, fig. 1, app. B, app. C.

Human benchmark. A pre-registered survey gave purchase-intention questions for the same 40 products, with random prices. Each respondent answered all 40 questions §2.

Covariate control. Two approaches are tested. First, demographics are generated as 500 personas per product and used as covariates §3, app. D, fig. 3. Second, a sequence of twelve stages adds behavioural and psychological covariates from a public panel of consumers §3, app. E. Stage 1 has 14 demographic variables, and stage 12 has 30 variables in total app. E.

Unblinding (the proposed fix). The blinded system prompt tells the model it is a customer filling in a blank §5. The unblinded system prompt additionally says that the price is randomly and uniformly drawn between a minimum and a maximum, and that the customer sees only one price and does not know about the randomization §5. The two system prompts are the only versions given in the text; the user-message templates for these runs are not shown.

Fine-tuning test. Fine-tuning uses the human survey data in a 2 × 2 design, where the prompt type (blinded or unblinded) is chosen separately for the fine-tuning and evaluation stages §5. Evaluation is leave-one-category-group-out over four groups: beverages; refrigerated goods; snacks and bakery; household and pet supplies §5. A second round adds 10,000 observations from an observational Amazon browsing dataset, which record purchases only, to the fine-tuning data, using a separate prompt §5, app. G.

Theory. The authors define an ambiguous prompting strategy as one that maps two questions with different correct answers to the same prompt §4. They argue that no single model can answer both questions correctly under such a mapping §4, app. F.1. They also write the simulated data-generating process as mixing an unobserved-factor term that is correlated with price (observational) with one that is not (experimental) app. F.2.

Pseudocode
# Simulate purchase probability for one product across the price grid  [§2]
# Input:  prompt template, product, regular price
# Output: one purchase probability per relative price

def simulate_demand(template, product, regular_price):
    probabilities = []
    # Relative prices 0%, 20%, ..., 200% of the regular price  [§2, app. A]
    for relative_price in [0.0, 0.2, 0.4, 0.6, 0.8, 1.0,
                           1.2, 1.4, 1.6, 1.8, 2.0]:
        price = relative_price * regular_price
        prompt = fill(template, product, price)
        # 50 independent draws at temperature 1  [§2]
        answers = [ask_model(prompt, temperature=1.0)
                   for draw in range(50)]
        probabilities.append(share_of_purchase(answers))
    return probabilities
Pseudocode
# Mean absolute error of a model against the human survey  [§5, fig. 6]
# Input:  model, system prompt, (product, price, human_probability) cells
# Output: mean absolute error over the cells

def evaluate_mae(model, system_prompt, cells):
    errors = []
    for product, price, human_probability in cells:
        # Average over 50 draws at temperature 1  [§5]
        answers = [ask_model(model, system_prompt, product, price,
                             temperature=1.0)
                   for draw in range(50)]
        model_probability = share_of_purchase(answers)
        errors.append(abs(model_probability - human_probability))
    return mean(errors)

Hyperparameters

NameValueWhereNotes
Products40 (one per consumer packaged-goods category)§2 app. AWalmart.com regular prices, April 2024
Price grid0% to 200% of regular price, 20% steps (11 points)§2relative price −1 to +1 in the text's notation
Model (diagnosis, covariate study, unblinding study)gpt-4o-mini-2024-07-18, pinned§2 §3 §5model choice for the out-of-box and fine-tuning runs
Temperature (purchase cells)1§2 §5
Draws per cell50§2 §5averaged to a purchase probability
Survey respondents1,000 recruited, 9 excluded§2pre-registered; attention-filter exclusion; Prolific, US census-representative sample
Questions per respondent40 (one per product)§2prices randomly drawn; product order randomized
Personas per product500§3 app. D
Persona generation temperature1app. Ddemographics sampled with the price left blank
Persona purchase temperature0app. Done answer per persona at each price
Covariate stages12 (14 variables at stage 1, 30 at stage 12)app. Evariables added in stages 2 to 12 listed in app. E
Competing price in the focal example8.26 (Coca-Cola regular price)app. D.1fixed in the Coca-Cola example
Cross-validationleave-one-category-group-out, 4 groups§5group membership listed in §5
Amazon observations added10,000app. Gobservational; purchases only
Fine-tuning base modelgpt-4o-mini (exact snapshot not stated)§5
Fine-tuning epochs, learning rate, batch size, file formatnot stated—
Human survey price rangenot stated§2"randomly drawn for each product"; range not given
Unblinded min and max priceplaceholders {min_price}, {max_price}; values not stated§5
Models in the model-evolution figurenot listed in text§5, fig. 6text says GPT-3.5-Turbo to GPT-4.1

Results

Author-reported. Setup: demand estimation for 40 consumer packaged-goods products against a pre-registered Prolific survey (n = 991 after exclusions) §2; fine-tuning on the survey with leave-one-category-group-out evaluation and MAE on purchase probabilities §5.

Demand curves (out-of-box, blinded, averaged over products). Human curve is downward sloping; GPT curve is inverted-U, and stays so when the price-0 point is removed §2, fig. 2.

Covariate study (MAE of purchase probability, app. E table, stage numbers as listed):

StageTotal covariatesMAESource
1140.2250app. E
2150.0971app. E
3170.0989app. E
4180.1413app. E
5190.1478app. E
6200.1524app. E
7210.1714app. E
8220.1646app. E
9230.1700app. E
10240.1842app. E
11250.2025app. E
12300.1929app. E

Fine-tuning on the survey (MAE against human survey; rows are fine-tuning prompt):

ModelBlinded evaluationUnblinded evaluationSource
Out-of-box GPT-4o-mini0.5320.397tab. 1
Fine-tuned on survey (blinded)0.1340.128tab. 1
Fine-tuned on survey (unblinded)0.1300.113tab. 1

Fine-tuning on survey plus Amazon data:

ModelBlinded evaluationUnblinded evaluationSource
Out-of-box GPT-4o-mini0.5320.397tab. 2
Fine-tuned on survey + Amazon (blinded)0.2330.126tab. 2
Fine-tuned on survey + Amazon (unblinded)0.1450.120tab. 2

Unblinding across models. The text says unblinded prompts gave lower MAE than blinded prompts for every model tested, with relative improvements from about 1% to over 60% [§5, fig. 6]. The per-model values are only in the figure.

Headline claims. Fine-tuning with unblinded prompts cut MAE by about 15% against the best blinded model (0.134 to 0.113) §5, tab. 1; the table values give about 15.7%. With the Amazon data added, the blinded fine-tuned model degraded (0.134 to 0.233 under blinded evaluation) and unblinded fine-tuning stayed near its earlier error §5, tab. 1, tab. 2.

Paper vs code

No official code. The paper and its arXiv listing contain no repository link, and the TeX source has no code or data URL [raw source: main_v2_arxiv.tex]. A GitHub repository search for "unblinding llm simulation", "blinded unblinded llm survey" and the author name "toubia" returned no repository owned by the authors.

Pitfalls

  • Survey respondents vs API calls. Each human answered 40 product questions in one session, while the model received an independent call per question §2, footnote. The paper does not model this clustering; a reader should expect the human benchmark's uncertainty to be understated.
  • Survey price range is not stated. The paper says human prices were "randomly drawn for each product" §2, but the range is not given. The simulation sweep is 0–200% of the regular price §2, so the two may not cover the same support.
  • Target noise is not reported. The MAE targets are human purchase probabilities per (product, price) cell §5. The number of respondents per cell is not reported, so the noise in the target is unknown.
  • Unblinding prompt placeholders. The unblinded system prompt contains {min_price} and {max_price}, and the values used are not stated §5. Implementers must choose them. Setting them to the sweep range (0–200%) is an assumption, not the paper's stated choice.
  • Only system prompts are given. The blinded and unblinded system prompts are shown in §5, but the user-message templates used with them are not. The unblinded effect may depend on the user text as well.
  • Persona temperatures differ from the rest. Personas are generated at temperature 1, but purchase decisions for personas are elicited at temperature 0 app. D, while every other purchase cell uses temperature 1 with 50 draws §2, §5. Reproducing one protocol with the other temperature changes the output distribution.
  • Covariate pattern is not a clean threshold. The text says the error improves at first and then degrades beyond a threshold §3. The table shows the lowest MAE at stage 2 (0.0971), a rise through stage 11, and a fall at stage 12 (0.1929 below 0.2025) app. E. Stage 8 is also below stage 7. Do not implement the non-monotone shape as a single turning point.
  • One model for the covariate study. The covariate, persona and confounding diagnostics use gpt-4o-mini only §2, §3. The claim that the issue is general across LLMs rests on the theory §4, app. F.1 and on the unblinding figure §5, fig. 6; the model list is not in the text.
  • Theorem assumes a deterministic mapping. The impossibility argument treats the model as a function of the prompt app. F.1. The experiments sample at temperature 1 §2, §5, and the paper does not discuss how sampling changes the argument.
  • Fine-tuning recipe is missing. Epochs, learning rate, batch size, file format and the way survey responses become training examples are not stated §5, app. G. Results cannot be reproduced from the text alone.
  • Amazon data is not described beyond its use. The added dataset is observational and records purchases only §5. The paper gives no filtering rules beyond sampling 10,000 observations app. G.
  • Reported improvements are relative. "Up to over 60%" and "about 1%" are relative MAE changes read from a figure §5, fig. 6, not table values.

Lineage

  • Builds on: the consumer panel used for the covariate study is from toubia2025twin §2, §3 (cited, no card here).
  • Compared against: Argyle et al. ("silicon samples") and blinded between-prompt designs, which this paper treats as the standard it critiques §1, §3.
  • Superseded by: not known from content on this wiki.

Source and license

Adapted from “The Challenge of Using LLMs to Simulate Human Behavior: A Causal Inference Perspective” by George Gui, Olivier Toubia (arXiv:2312.15524), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.