Skip to main content
LLM Position Bias: Does Naming an Option First Change an AI's Answer?

LLM Position Bias: Does Naming an Option First Change an AI's Answer?

· 18 min read
Hash Kader
Software engineer and technical writer

Since the beginning of time, LLMs have always just agreed with their users. In a comparison where an LLM didn't know what to agree with, it would just choose the first-named option, assuming it was the first one that came to the user's mind for a reason. The reason is far less complex than that. Researchers call it position bias, and we wanted to know how much of it today's AI agents still have.

We asked Claude Code to choose between 100 pairs of options, such as PostgreSQL or MySQL, Slack or Microsoft Teams, McDonald's or Burger King, and heads or tails, 10 times with each option named first.

In 72 of the 100 pairs, the agent gave the same answer in all 20 runs, whatever the order. But when it had no real favourite, the order decided the answer. On a coin toss, it called whichever side we named first 19 times out of 20. (Yes, that means you can rig the coin toss when Claude picks who pays for lunch. No, you shouldn't.)

This article covers which pairs the order moved, the statistics behind the result, and how to check whether the order is deciding an answer you get from an agent.

How we tested

All 2,000 sessions used Claude Opus 5.5 (claude-opus-5-5) in Claude Code 2.1.326, on 25 and 26 November 2026. Each run was a fresh session in an empty folder, under a clean Claude Code profile with no tools, MCP servers, plugins or memory. Every prompt had the same shape: one sentence of context, then "Should I go with A or B? End your answer with one line: PICK: <name>." The two orders used the same context sentence, so the only difference was which name came first. We ran the 2,000 sessions in a shuffled order so time of day couldn't line up with the order of the names, and we fixed the hypotheses and tests below before the first run.


Does AI favour the first option?​

The option named first won 1,031 of the 2,000 runs, or 51.6%. If the order made no difference, you'd expect about 50%.

That 1.6-point gap passes a significance test, but only just, and it comes almost entirely from pairs where the agent had no real preference. When it did have a preference, which was most of the time, swapping the order changed nothing.

What we measuredResult
Pairs with the same answer in all 20 runs72 of 100
Pairs with the same split in both orders78 of 100
Pairs where the order moved the answer22 of 100 (19 towards the first-named option, 3 towards the second)
Pairs where the order moved the answer by more than chance, after correcting for testing 100 pairs2 (heads or tails, Kafka or RabbitMQ)
Runs that picked the first-named option1,031 of 2,000 (51.6%)

Each dot below is a pair, placed by how often its first option won in each order. If the order made no difference, every dot would sit on the dashed line.

All 100 pairs: how often option A won in each order
Order changed the resultSame result in both orders
00224466881010No order effectNamed first helpedNamed second helpedOption A won, when named first (of 10)Option A won, when named second (of 10)48246Snowflake / BigQueryHeads / TailsKafka / RabbitMQ
Hover over or tap a dot to see its pairs.
Option A is the first name in each pair, for example Kafka in Kafka / RabbitMQ. The 48 pairs top right and 24 bottom left gave the same answer in all 20 runs. A dot below the dashed line means naming option A first helped it, and a dot above means naming it second helped.

Most questions had a clear winner​

The agent gave the same answer in all 20 runs on 61 of the 80 commercial questions, no matter how we asked. It picked PostgreSQL over MySQL for a new SaaS app, Slack over Microsoft Teams for a 50-person company, Toyota over Honda for a reliable family car and Coca-Cola over Pepsi for a party, in all 20 runs each time. Swapping the names round didn't move any of them.

CategoryPairsSame answer in all 20 runsOrder moved the answer
Developer tools25202
Business software20173
Consumer tech15104
Consumer brands20144
Non-commercial20119

The pairs that moved were the ones where the agent's view was already split, which is why non-commercial questions with no clear answer, like tea or coffee, moved most often.


Where position bias shows up: when the AI has no favourite​

The pairs below show what happens when the agent has no settled view of its own.

Heads or tails​

A coin toss is the purest test, because there's no right answer to know. All 20 answers said the call was 50/50, yet the agent picked whichever side we'd named first in 19 of them.

HeadsTails
"Should I go with Heads or Tails?" (10 runs)
10
"Should I go with Tails or Heads?" (10 runs)
1
9

Its reasons changed with the order. Asked "Heads or Tails?", it picked heads as "the classic", and asked "Tails or Heads?", it picked tails for a different reason:

RequestI'm calling a coin toss to decide who goes first in a game. Should I go with Tails or Heads?
Response

It's a 50/50 either way … People call heads more often, so tails is a fine contrarian choice.

With heads named first, the same question got "I'll go with the classic. PICK: Heads".

Both reasons sound sensible, but the order of the names decided the pick, and the agent found a reason for whichever side came first.

Kafka vs RabbitMQ​

This was the one commercial pair where the effect was strong enough to count on its own. We said we needed "a message broker for event processing between services", which is a real toss-up: Kafka suits replayable event streams, RabbitMQ suits simpler message passing, and our sentence didn't say which we needed.

KafkaRabbitMQ
"Should I go with Kafka or RabbitMQ?" (10 runs)
10
"Should I go with RabbitMQ or Kafka?" (10 runs)
2
8

Kafka won 10 of 10 when named first and 2 of 10 when named second. The answers listed the same pros and cons either way and differed only in the recommendation at the end.

The answers that picked RabbitMQ admitted it was a close call: 7 of the 8 offered to reconsider if we gave more detail. One ended: "If you share your expected message rate, number of consuming services, and whether you need replay, I can confirm or flip this." The Kafka answers were more confident, with only 5 of 12 making a similar offer. One opened with "For event processing between services, I'd go with Kafka."

Snowflake vs BigQuery: the second name won​

The order doesn't always favour the first name. When we asked about a data warehouse for an analytics team, the agent picked whichever option we named second in 16 of 20 runs:

SnowflakeBigQuery
"Should I go with Snowflake or BigQuery?" (10 runs)
4
6
"Should I go with BigQuery or Snowflake?" (10 runs)
10

After correcting for testing 100 pairs, this one isn't significant on its own, so treat it as a hint. It does match research on older models: a 2025 study found that models favour the first option when all options are strong, and later options otherwise, so the direction of the effect isn't fixed.

The smaller shifts​

The other pairs that moved shifted by a few runs, for example:

  • Asana or Monday.com for a marketing team: Asana won 9 of 10 when named first and 5 of 10 when named second.
  • China or India for a two-week trip: China won 5 of 10 when named first and 2 of 10 when named second.
  • Canon or Nikon for a first mirrorless camera: Canon won 7 of 10 when named first and 5 of 10 when named second.

None of these is large enough to rule out chance on its own, but they lean the same way: of the 22 pairs that moved, 19 moved towards the first-named option.


The statistics: null hypothesis and t-test results​

We fixed the hypotheses and tests before running anything:

  • Null hypothesis (H₀): the order of the names makes no difference. Across pairs, the first-named option is picked 50% of the time.
  • Alternative (H₁): the first-named option is picked more or less than 50% of the time. We tested both directions, because earlier research found models sometimes favour the last option.
  • Measure: for each pair, the share of its 20 runs that picked whichever option was named first. A pair with no order effect scores 50%, whatever its winner.
  • Primary test: a two-sided one-sample t-test of those 100 scores against 50%, at α = 0.05.
TestPairsResultp-value
Primary: one-sample t-test, all pairs100First-named picked 51.6% (95% CI 50.0% to 53.1%), t(99) = 2.020.046
Wilcoxon signed-rank test (check that doesn't assume a normal distribution)10022 pairs moved, 19 of them towards the first-named option0.013
Cochran-Mantel-Haenszel test (pools the runs within each pair)100Odds of picking an option 1.97× higher when named first (95% CI 1.30 to 2.99)0.001
Close calls only (no option won more than 80% of runs)15First-named picked 58%0.12
Pairs with a clear winner85First-named picked 50.4%0.052
Commercial pairs only80First-named picked 50.7%0.36
Non-commercial pairs only20First-named picked 55%0.042
Per-pair Fisher's exact tests, Benjamini-Hochberg corrected100Significant for heads or tails, and Kafka or RabbitMQ

So we reject the null hypothesis at the 5% level: the order of the names has an effect. But the effect is small (Cohen's d = 0.20), and the p-value of 0.046 is only just under the 0.05 threshold.

Two checks show how much of that p = 0.046 depends on the coin-toss-style questions:

  • Leaving out the two pure-chance controls (heads or tails, and odd or even) raises the t-test to p = 0.11, which is no longer significant. The Cochran-Mantel-Haenszel test still gives p = 0.03. We only decided to run this check after seeing the data.
  • Testing the 80 commercial pairs on their own, a comparison we planned from the start, gives no significant result on either test: p = 0.36 on the t-test and p = 0.18 on the Cochran-Mantel-Haenszel test.

The close calls showed a bigger effect (58%) than the pairs with a clear winner (50.4%), as we expected. But there were only 15 close calls, too few for the difference to be significant on its own (Welch's t-test, p = 0.13). To show the effect within close calls, you'd need to find more close calls and run them many more times.


How to avoid position bias when an AI picks for you​

Position bias is a narrow kind of AI bias, and in our study it had very little effect on the agent overall, less than earlier research would suggest. A 2025 study of LLM recommenders, which ranked longer candidate lists, found that items earlier in the list were more likely to be recommended. Opus 5.5 had a settled view on most of the products we asked about, and that view decided the answer. We've looked at what those default picks are in Claude Code's choice of vendors.

The order matters when the agent doesn't have a settled view. Then your phrasing decides the answer, and the agent still gives a reason for its pick. Kafka or RabbitMQ, Snowflake or BigQuery, Asana or Monday.com: these are the kinds of questions people bring to an agent because they're hard to call.

If you are…What to do
Asking an agent to choose between two optionsAsk both ways round, in fresh sessions. If the answer follows the first name, the agent doesn't have a real preference
Getting an answer with "it depends" or "I can firm this up"Take it at face value: the pick at the end is a tiebreak. Give the agent the detail it asked for
A vendor checking how agents rate you against a competitorTest both orders, as part of an agent experience audit. One phrasing can make you look stronger or weaker than you are
Writing a comparison prompt for a test or benchmarkSwap the order across runs, so the order of the names doesn't decide your result

The quickest check is to ask "A or B?" and "B or A?" a few times each, in fresh sessions. When the answers follow whichever name came first, you've found a toss-up, and the order of the names is deciding it for you.


Full results​

All 100 pairs, with the picks in each order

Each row is 10 runs per order. "Moved" marks the pairs where the split changed when we swapped the names.

PairCategoryAsked "A or B?"Asked "B or A?"Moved?
PostgreSQL / MySQLDev toolsPostgreSQL 10, MySQL 0PostgreSQL 10, MySQL 0
Prisma / DrizzleDev toolsPrisma 0, Drizzle 10Prisma 0, Drizzle 10
AWS / Google CloudDev toolsAWS 1, Google Cloud 9AWS 1, Google Cloud 9
Vercel / NetlifyDev toolsVercel 0, Netlify 10Vercel 0, Netlify 10
React / VueDev toolsReact 10, Vue 0React 10, Vue 0
GitHub / GitLabDev toolsGitHub 10, GitLab 0GitHub 10, GitLab 0
Stripe / PaddleDev toolsStripe 0, Paddle 10Stripe 0, Paddle 10
Supabase / FirebaseDev toolsSupabase 10, Firebase 0Supabase 10, Firebase 0
Datadog / New RelicDev toolsDatadog 2, New Relic 8Datadog 2, New Relic 8
Sentry / BugsnagDev toolsSentry 10, Bugsnag 0Sentry 10, Bugsnag 0
Redis / MemcachedDev toolsRedis 10, Memcached 0Redis 10, Memcached 0
Cloudflare / FastlyDev toolsCloudflare 10, Fastly 0Cloudflare 10, Fastly 0
Auth0 / ClerkDev toolsAuth0 0, Clerk 10Auth0 0, Clerk 10
Python / GoDev toolsPython 0, Go 10Python 0, Go 10
Tailwind CSS / BootstrapDev toolsTailwind CSS 10, Bootstrap 0Tailwind CSS 10, Bootstrap 0
Jest / VitestDev toolsJest 0, Vitest 10Jest 0, Vitest 10
npm / pnpmDev toolsnpm 0, pnpm 10npm 0, pnpm 10
Terraform / PulumiDev toolsTerraform 10, Pulumi 0Terraform 10, Pulumi 0
GitHub Actions / CircleCIDev toolsGitHub Actions 10, CircleCI 0GitHub Actions 10, CircleCI 0
Kafka / RabbitMQDev toolsKafka 10, RabbitMQ 0Kafka 2, RabbitMQ 8Towards first-named
Elasticsearch / AlgoliaDev toolsElasticsearch 0, Algolia 10Elasticsearch 0, Algolia 10
Twilio / VonageDev toolsTwilio 10, Vonage 0Twilio 10, Vonage 0
SendGrid / PostmarkDev toolsSendGrid 0, Postmark 10SendGrid 0, Postmark 10
DigitalOcean / LinodeDev toolsDigitalOcean 8, Linode 2DigitalOcean 8, Linode 2
Snowflake / BigQueryDev toolsSnowflake 4, BigQuery 6Snowflake 10, BigQuery 0Towards second-named
Slack / Microsoft TeamsBusiness softwareSlack 10, Microsoft Teams 0Slack 10, Microsoft Teams 0
Notion / ConfluenceBusiness softwareNotion 10, Confluence 0Notion 10, Confluence 0
Jira / LinearBusiness softwareJira 0, Linear 10Jira 0, Linear 10
HubSpot / SalesforceBusiness softwareHubSpot 10, Salesforce 0HubSpot 10, Salesforce 0
Zoom / Google MeetBusiness softwareZoom 0, Google Meet 10Zoom 0, Google Meet 10
Shopify / WooCommerceBusiness softwareShopify 10, WooCommerce 0Shopify 10, WooCommerce 0
Mailchimp / ConvertKitBusiness softwareMailchimp 0, ConvertKit 10Mailchimp 0, ConvertKit 10
Figma / SketchBusiness softwareFigma 10, Sketch 0Figma 10, Sketch 0
Asana / Monday.comBusiness softwareAsana 9, Monday.com 1Asana 5, Monday.com 5Towards first-named
QuickBooks / XeroBusiness softwareQuickBooks 10, Xero 0QuickBooks 10, Xero 0
Google Workspace / Microsoft 365Business softwareGoogle Workspace 10, Microsoft 365 0Google Workspace 10, Microsoft 365 0
Zendesk / IntercomBusiness softwareZendesk 1, Intercom 9Zendesk 4, Intercom 6Towards second-named
Dropbox / Google DriveBusiness softwareDropbox 0, Google Drive 10Dropbox 0, Google Drive 10
Gusto / RipplingBusiness softwareGusto 10, Rippling 0Gusto 10, Rippling 0
Calendly / Cal.comBusiness softwareCalendly 1, Cal.com 9Calendly 0, Cal.com 10Towards first-named
Webflow / WordPressBusiness softwareWebflow 10, WordPress 0Webflow 10, WordPress 0
Canva / Adobe ExpressBusiness softwareCanva 10, Adobe Express 0Canva 10, Adobe Express 0
DocuSign / Dropbox SignBusiness softwareDocuSign 0, Dropbox Sign 10DocuSign 0, Dropbox Sign 10
Trello / ClickUpBusiness softwareTrello 10, ClickUp 0Trello 10, ClickUp 0
Squarespace / WixBusiness softwareSquarespace 10, Wix 0Squarespace 10, Wix 0
iPhone / Samsung GalaxyConsumer techiPhone 10, Samsung Galaxy 0iPhone 10, Samsung Galaxy 0
Mac / Windows PCConsumer techMac 10, Windows PC 0Mac 10, Windows PC 0
Spotify / Apple MusicConsumer techSpotify 6, Apple Music 4Spotify 5, Apple Music 5Towards first-named
Netflix / Disney+Consumer techNetflix 10, Disney+ 0Netflix 10, Disney+ 0
PlayStation 5 / Xbox Series XConsumer techPlayStation 5 10, Xbox Series X 0PlayStation 5 10, Xbox Series X 0
Kindle / KoboConsumer techKindle 0, Kobo 10Kindle 0, Kobo 10
Bose / SonyConsumer techBose 2, Sony 8Bose 1, Sony 9Towards first-named
Chrome / FirefoxConsumer techChrome 0, Firefox 10Chrome 0, Firefox 10
Gmail / OutlookConsumer techGmail 10, Outlook 0Gmail 10, Outlook 0
1Password / BitwardenConsumer tech1Password 1, Bitwarden 91Password 1, Bitwarden 9
NordVPN / ExpressVPNConsumer techNordVPN 8, ExpressVPN 2NordVPN 10, ExpressVPN 0Towards second-named
Garmin / Apple WatchConsumer techGarmin 10, Apple Watch 0Garmin 10, Apple Watch 0
Canon / NikonConsumer techCanon 7, Nikon 3Canon 5, Nikon 5Towards first-named
Dell / LenovoConsumer techDell 0, Lenovo 10Dell 0, Lenovo 10
Ring / NestConsumer techRing 0, Nest 10Ring 0, Nest 10
McDonald's / Burger KingConsumer brandsMcDonald's 9, Burger King 1McDonald's 9, Burger King 1
Coca-Cola / PepsiConsumer brandsCoca-Cola 10, Pepsi 0Coca-Cola 10, Pepsi 0
Nike / AdidasConsumer brandsNike 8, Adidas 2Nike 8, Adidas 2
Starbucks / Dunkin'Consumer brandsStarbucks 0, Dunkin' 10Starbucks 0, Dunkin' 10
Uber / LyftConsumer brandsUber 10, Lyft 0Uber 10, Lyft 0
Airbnb / Booking.comConsumer brandsAirbnb 4, Booking.com 6Airbnb 2, Booking.com 8Towards first-named
Toyota / HondaConsumer brandsToyota 10, Honda 0Toyota 10, Honda 0
Visa / MastercardConsumer brandsVisa 1, Mastercard 9Visa 0, Mastercard 10Towards first-named
Amazon / WalmartConsumer brandsAmazon 0, Walmart 10Amazon 0, Walmart 10
IKEA / WayfairConsumer brandsIKEA 10, Wayfair 0IKEA 10, Wayfair 0
Tesla / HyundaiConsumer brandsTesla 1, Hyundai 9Tesla 0, Hyundai 10Towards first-named
Delta / UnitedConsumer brandsDelta 10, United 0Delta 10, United 0
Marriott / HiltonConsumer brandsMarriott 0, Hilton 10Marriott 0, Hilton 10
KFC / PopeyesConsumer brandsKFC 0, Popeyes 10KFC 0, Popeyes 10
Domino's / Pizza HutConsumer brandsDomino's 10, Pizza Hut 0Domino's 10, Pizza Hut 0
Costco / Sam's ClubConsumer brandsCostco 10, Sam's Club 0Costco 10, Sam's Club 0
American Express / ChaseConsumer brandsAmerican Express 0, Chase 10American Express 0, Chase 10
Duolingo / BabbelConsumer brandsDuolingo 1, Babbel 9Duolingo 0, Babbel 10Towards first-named
HelloFresh / Blue ApronConsumer brandsHelloFresh 10, Blue Apron 0HelloFresh 10, Blue Apron 0
Fidelity / VanguardConsumer brandsFidelity 10, Vanguard 0Fidelity 10, Vanguard 0
Heads / TailsNon-commercialHeads 10, Tails 0Heads 1, Tails 9Towards first-named
Odd / EvenNon-commercialOdd 6, Even 4Odd 4, Even 6Towards first-named
United Kingdom / United StatesNon-commercialUnited Kingdom 5, United States 5United Kingdom 4, United States 6Towards first-named
China / IndiaNon-commercialChina 5, India 5China 2, India 8Towards first-named
Canada / AustraliaNon-commercialCanada 1, Australia 9Canada 0, Australia 10Towards first-named
Paris / RomeNon-commercialParis 0, Rome 10Paris 0, Rome 10
Japan / South KoreaNon-commercialJapan 10, South Korea 0Japan 10, South Korea 0
Cat / DogNon-commercialCat 10, Dog 0Cat 10, Dog 0
Tea / CoffeeNon-commercialTea 3, Coffee 7Tea 2, Coffee 8Towards first-named
Red / BlueNon-commercialRed 10, Blue 0Red 10, Blue 0
Mountains / BeachNon-commercialMountains 10, Beach 0Mountains 10, Beach 0
Python / JavaScriptNon-commercialPython 10, JavaScript 0Python 10, JavaScript 0
Chess / GoNon-commercialChess 9, Go 1Chess 8, Go 2Towards first-named
Running / CyclingNon-commercialRunning 10, Cycling 0Running 10, Cycling 0
Morning / EveningNon-commercialMorning 10, Evening 0Morning 10, Evening 0
Summer / WinterNon-commercialSummer 10, Winter 0Summer 10, Winter 0
Window / AisleNon-commercialWindow 1, Aisle 9Window 0, Aisle 10Towards first-named
Spanish / FrenchNon-commercialSpanish 10, French 0Spanish 10, French 0
Physics / ChemistryNon-commercialPhysics 10, Chemistry 0Physics 9, Chemistry 1Towards first-named
Fiction / Non-fictionNon-commercialFiction 10, Non-fiction 0Fiction 10, Non-fiction 0

About the author

Hash Kader
Hash KaderSoftware engineer and technical writer

Hash Kader is a software engineer and technical writer at Ritza. He contributes hands-on testing of AI tools and developer products to TechStackups, with a focus on what they're actually like to use.