llmango001: fruit

001: fruit

By now, most people know, or have at least heard, that LLMs are not quite random, even when you ask them to be. Even with high temperature1 settings, a large language model will still lean towards the most probable answer, as that’s how it is essentially built to be.

But can an LLM’s response meaningfully change when you prompt it in a different language, or when you present information to the model in a different manner? This experiment aims to answer this question.

table of contents

scope and experiment setup

As this experiment is partly set to analyse differences between the same prompts written in different languages, the first step is to settle on a language scope. I chose English, Polish and Japanese, simply because these are the languages that I can speak, and I did not want a translator in between me and the prompts.

Every prompt in this experiment asks for the same thing: here is a list of ten fruits, pick one at random. The ten fruits never change - apple, banana, orange, mango, grape, strawberry, watermelon, pineapple, lychee and pomegranate. What changes between questions is the order the fruits are shown in, and the structure the model has to use when answering.

I prompted a single model, gpt-5.6-luna from OpenAI, at temperature 1.0. Comparing models would be a perfectly good experiment, but I chose not to do it in this one. A second model is a second source of variance, and I wanted every difference to come from the setup alone.

The unit compared throughout is an arm: one pairing of a language and an output format inside one question. 001a is asked in three languages under one schema, so it has three arms. 001d is asked in three languages as well, but not every language gets every schema there, so it has eight arms. Combined with other questions, it makes seventeen arms, and each one is invoked 2 000 times. In total it amounts to 34 000 LLM outputs behind everything you are about to read.

prompts

  1. English prompt

    Randomly, pick one fruit from this list of fruits:
    
    mango, apple, banana, pomegranate, strawberry, orange, watermelon, grape, pineapple, lychee
  2. Polish prompt

    Losowo, wybierz jeden owoc z tej listy owoców:
    
    mango, jabłko, banan, granat, truskawka, pomarańcza, arbuz, winogrono, ananas, liczi
  3. Japanese prompt

    次の果物のリストから、ランダムに果物を1つ選んでください:
    
    マンゴー, りんご, バナナ, ザクロ, いちご, オレンジ, スイカ, ぶどう, パイナップル, ライチ

structured output

Structured output is a way of telling the model what shape its answer must take. Alongside the prompt, you can pass a schema, a small JSON2-formatted description of the fields you expect back, and the model’s reply is constrained to a JSON object matching it. In this experiment’s case, instead of a sentence that may or may not contain a fruit name, every output is a single field holding one string. This is the typical workflow for mass data generation: when you are collecting thousands of answers, you want each one to land in the same field of the same shape, so parsing becomes a dictionary lookup instead of a guessing game. The schema used here is deliberately minimal:

English schema

{
  "name": "FruitChoice",
  "schema": {
    "additionalProperties": false,
    "properties": {
      "fruit": { "title": "Fruit", "type": "string" }
    },
    "required": ["fruit"],
    "title": "FruitChoice",
    "type": "object"
  },
  "strict": true
}

questions

001a: same prompt in different languages

Question: When presented with the same set of choices that are in the same order, will an LLM shift its answer, if prompted in a different language?

TL;DR: yes.

Starting off with the first question: 001a. It has three arms, one for each language, each paired with the base English schema.

Chart 1.1: Answer distribution by language in 001a. Grouped columns over the fruits some language picked, one series per language. Six of the ten fruits on offer were never picked and are not drawn.
Data from questions: 001a
Numbers behind this chart
categoryenn = 2000jan = 2000pln = 2000
sharecount95% CIsharecount95% CIsharecount95% CI
grape0.05%10.01%–0.28%0.05%10.01%–0.28%0.00%00.00%–0.19%
pineapple0.15%30.05%–0.44%0.00%00.00%–0.19%5.60%1124.67%–6.70%
lychee98.40%196897.75%–98.86%1.55%311.09%–2.19%32.55%65130.53%–34.64%
pomegranate1.40%280.97%–2.02%98.40%196897.75%–98.86%61.85%123759.70%–63.95%

The first thing you see straight away is that six of the ten fruits were never chosen even once, and two of the four that were chosen are marginal. The model loves lychee when asked in English (98.4%), loves pomegranate when asked in Japanese (98.4%), and only Polish introduces any variety: pomegranate takes 61.9%, lychee is still there with a third of the Polish answers, and pineapple sneaks in at 5.6%.

Notice which fruits never appeared. Apple, banana and orange would probably be the obvious answers to give if you asked someone to “name any fruit”, but here it’s the opposite. Maybe that’s precisely the reason lychee, pomegranate and pineapple were chosen? To someone (or some model) with an American or European background, they are more “exotic”, or more “interesting” answers.

So is it safe to say that the model prefers lychee in English and pomegranate in Japanese? I mean, that is what this chart says. It is also, as the next two questions show, only half of what is going on.

001b: same fruits in a different fixed order

Question: When presented with a different order of the same set of choices, will an LLM shift its answer?

TL;DR: in English, the model is in fact choosing the fruit. In Polish and Japanese, it is choosing neither the fruit nor the position of the fruit.

001b’s setup is 001a with exactly one thing altered: a new fixed order of the presented fruits, again identical across all three languages and all 6 000 requests. The wording around that list did not change, and the structured output is still the base English schema.

Chart 1.2: Answer distribution by option order in 001a vs 001b. Two stacked panels, one per fixed option order, over the fruits some arm picked. Three columns per fruit in each panel, one per prompt language.
Data from questions: 001a, 001b
Numbers behind this chart
categoryen / 001a ordern = 2000en / 001b ordern = 2000ja / 001a ordern = 2000ja / 001b ordern = 2000pl / 001a ordern = 2000pl / 001b ordern = 2000
sharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CI
mango0.00%00.00%–0.19%8.35%1677.22%–9.64%0.00%00.00%–0.19%4.60%923.77%–5.61%0.00%00.00%–0.19%100.00%200099.81%–100.00%
grape0.05%10.01%–0.28%0.00%00.00%–0.19%0.05%10.01%–0.28%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%
pineapple0.15%30.05%–0.44%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%5.60%1124.67%–6.70%0.00%00.00%–0.19%
lychee98.40%196897.75%–98.86%91.60%183290.30%–92.74%1.55%311.09%–2.19%82.85%165781.14%–84.44%32.55%65130.53%–34.64%0.00%00.00%–0.19%
pomegranate1.40%280.97%–2.02%0.05%10.01%–0.28%98.40%196897.75%–98.86%12.55%25111.17%–14.07%61.85%123759.70%–63.95%0.00%00.00%–0.19%

Three things to pick up from chart 1.2: English barely budges, Japanese changes its answer completely, and… mango! In 001a, it is not chosen once by any of the languages, and suddenly the Polish 001b arm picks it 2 000 out of 2 000 times. Even the 8% for English and 5% for Japanese are high enough percentages to be considered an actual pick.

Based on charts 1.1 and 1.2 you may start to wonder which one of the two is more important: the fruit itself, or the position it holds in the given order of fruits?

When conveying information, an important aspect to consider is the order of the information you provide, no matter if the recipient is human or an LLM. Pieces of information are perceived differently depending on their order of presentation, especially if they are either first or last3.

With that in mind, mango was in the first position in 001a, and when 001b moved it, the Polish arm defaulted to it. But mango moved from the first position to the last, so shouldn’t that again impact the model’s choice? Well, maybe it did. Maybe the last position is the most important one.

But but but, lychee was in the last position, and now it isn’t. And only now did the Japanese arm mostly choose lychee, as if it were suddenly able to choose it. I think analysing just the position from these two charts might be the wrong approach. If the last position was the most important one, we would have seen more lychee in Polish and Japanese in 001a. So maybe this slot is important in Polish, but not so much in Japanese? Or maybe the combination of mango and the last position is what made it special?

One thing is undeniable: a reorder of the same ten fruits makes two of the three languages answer something else entirely. Whatever else is true, “the model prefers pomegranate in Japanese” has stopped being a safe sentence to write down.

001c: same fruits in shuffled order

Question: Across a large sample size, every order of choices presented to the LLM is shuffled. Does the answer get “more random”?

TL;DR: a little bit in English and Japanese, but not in Polish.

For this question, every LLM request had the order of fruits in its prompt randomly and independently shuffled.

Chart 1.3: Answer distribution by language in 001c. Grouped columns under a per-sample shuffle, one series per language, over the fruits some language picked.
Data from questions: 001c
Numbers behind this chart
categoryenn = 2000jan = 2000pln = 2000
sharecount95% CIsharecount95% CIsharecount95% CI
mango9.25%1858.06%–10.60%11.15%2239.84%–12.60%74.10%148272.14%–75.97%
pineapple0.45%90.24%–0.85%0.05%10.01%–0.28%1.10%220.73%–1.66%
lychee77.65%155375.77%–79.42%62.45%124960.31%–64.55%19.60%39217.92%–21.40%
pomegranate12.65%25311.26%–14.18%26.35%52724.47%–28.32%5.20%1044.31%–6.26%

Looking at chart 1.3, it turns out that mango is the favourite fruit when asked in Polish after all, and lychee wins for both English and Japanese. I still find the mango and Polish pair the most interesting: this arm picked this fruit 74% of the time, but in 001a it was zero picks out of two thousand. So now it looks like position number one is bad, but let’s see just how bad:

Chart 1.4: Answer distribution by position in 001c's shown list. Horizontal bars over the ten positions in the shown list, running down from first to last, one series per language, against a uniform reference.
Data from questions: 001c
Numbers behind this chart
positionenn = 2000jan = 2000pln = 2000
sharecount95% CIsharecount95% CIsharecount95% CI
10.00%00.00%–0.19%0.00%00.00%–0.19%0.20%40.08%–0.51%
26.25%1255.27%–7.40%5.25%1054.36%–6.32%3.15%632.47%–4.01%
313.50%27012.07%–15.07%16.05%32114.51%–17.72%11.70%23410.36%–13.18%
412.20%24410.84%–13.71%14.80%29613.31%–16.42%12.90%25811.50%–14.44%
510.40%2089.14%–11.81%11.00%2209.70%–12.45%12.40%24811.03%–13.92%
613.20%26411.79%–14.75%14.40%28812.93%–16.01%14.20%28412.74%–15.80%
711.20%2249.89%–12.66%11.50%23010.18%–12.97%12.45%24911.07%–13.97%
813.25%26511.83%–14.81%12.20%24410.84%–13.71%11.30%2269.99%–12.76%
911.30%2269.99%–12.76%10.15%2038.90%–11.55%10.55%2119.28%–11.97%
108.70%1747.54%–10.02%4.65%933.81%–5.66%11.15%2239.84%–12.60%

Turns out, very bad. It is picked only four times out of 6 000 requests, all of them in Polish! Three things stand out from this chart:

001d: structured output vs free-text output

Question: Does requiring structured output in LLMs change their answer?

TL;DR: the language you write the schema in barely matters, but whether there is a schema at all matters a lot.

The last variable left to move is the output format. This question has eight arms, the most of any question. Each language answers under the base English schema, under a schema written in its own language, and with no schema at all. For English the native schema is the base schema, so it gets one arm fewer than the other two languages. As in 001c, the order of the fruit list was shuffled independently for every request.

Asking the LLM without passing any desired structured output format does not guarantee an output which consists only of the fruit name. Outputs like these are sometimes referred to as “free text”. Because of that, I added two sentences to the prompt which act as guardrails. And since any tiny change to a prompt might change the model’s answer in an unpredictable way, the new, bigger prompts were also run with the base English schema and the native schema, even though these guardrails are redundant there. That way, I can compare the results with only one factor moving at a time.

  1. English prompt

    Randomly, pick one fruit from this list of fruits:
    
    watermelon, lychee, pomegranate, pineapple, strawberry, mango, apple, grape, banana, orange
    
    Write nothing but a single fruit name. Do not write any additional explanations.
  2. Polish prompt

    Losowo, wybierz jeden owoc z tej listy owoców:
    
    arbuz, liczi, granat, ananas, truskawka, mango, jabłko, winogrono, banan, pomarańcza
    
    Nie pisz nic poza jedną nazwą owocu. Nie pisz żadnych dodatkowych wyjaśnień.
  3. Japanese prompt

    次の果物のリストから、ランダムに果物を1つ選んでください:
    
    スイカ, ライチ, ザクロ, パイナップル, いちご, マンゴー, りんご, ぶどう, バナナ, オレンジ
    
    果物の名前を1つだけ書いてください。追加の説明は書かないでください。

English schema

{
  "name": "FruitChoice",
  "schema": {
    "additionalProperties": false,
    "properties": {
      "fruit": { "title": "Fruit", "type": "string" }
    },
    "required": ["fruit"],
    "title": "FruitChoice",
    "type": "object"
  },
  "strict": true
}

Polish schema

{
  "name": "WyborOwocu",
  "schema": {
    "additionalProperties": false,
    "properties": {
      "owoc": { "title": "Owoc", "type": "string" }
    },
    "required": ["owoc"],
    "title": "WyborOwocu",
    "type": "object"
  },
  "strict": true
}

Japanese schema

{
  "name": "KudamonoSentaku",
  "schema": {
    "additionalProperties": false,
    "properties": {
      "kudamono": { "title": "Kudamono", "type": "string" }
    },
    "required": ["kudamono"],
    "title": "KudamonoSentaku",
    "type": "object"
  },
  "strict": true
}
Chart 1.5: Answer distribution by schema in 001d. Three stacked panels: the English schema, the prompt language's own schema, and no schema at all, over the fruits each arm picked. Up to three columns per fruit in each panel, one per prompt language. The middle panel has no English column.
Data from questions: 001d
Numbers behind this chart
categoryen / en scheman = 2000en / no scheman = 2000ja / en scheman = 2000ja / native scheman = 2000ja / no scheman = 2000pl / en scheman = 2000pl / native scheman = 2000pl / no scheman = 2000
sharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CIsharecount95% CI
apple0.05%10.01%–0.28%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.05%10.01%–0.28%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%
banana0.05%10.01%–0.28%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%
mango18.85%37717.20%–20.62%3.95%793.18%–4.90%12.35%24710.98%–13.86%19.60%39217.92%–21.40%20.85%41719.13%–22.69%76.70%153474.80%–78.50%78.80%157676.95%–80.54%42.00%84039.85%–44.18%
grape0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.05%10.01%–0.28%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%
strawberry0.10%20.03%–0.36%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%
watermelon0.10%20.03%–0.36%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.00%00.00%–0.19%0.05%10.01%–0.28%0.00%00.00%–0.19%0.00%00.00%–0.19%
pineapple0.10%20.03%–0.36%1.65%331.18%–2.31%0.00%00.00%–0.19%0.00%00.00%–0.19%1.70%341.22%–2.37%1.20%240.81%–1.78%0.95%190.61%–1.48%0.60%120.34%–1.05%
lychee79.70%159477.88%–81.41%76.95%153975.05%–78.74%77.30%154675.41%–79.08%71.30%142669.28%–73.24%50.85%101748.66%–53.04%19.80%39618.11%–21.60%17.60%35215.99%–19.33%47.85%95745.67%–50.04%
pomegranate1.05%210.69%–1.60%17.45%34915.85%–19.18%10.35%2079.09%–11.76%9.10%1827.92%–10.44%26.50%53024.61%–28.48%2.25%451.69%–3.00%2.65%532.03%–3.45%9.55%1918.34%–10.92%

Reading the first panel against the second tells you what writing the schema in the prompt’s own language did. Reading the third panel tells you what removing the schema did. The first read is the boring one, which is good news.

Polish under native schema looks like Polish under English schema. Mango is at 78.8% against 76.7%, lychee at 17.6% against 19.8%. Only 2.5% of answers would have to change hands to turn one arm into the other. Japanese is not quite as flat: lychee drops from 77.3% to 71.3% and mango climbs from 12.3% to 19.6%. I write the conclusion here with relief: you can keep writing your schemas in English.

Taking the schema away is a different size of effect: it moves 18% of the English answers, 26% of the Japanese ones and 35% of the Polish ones. English keeps its winning lychee, but swaps its runner-up. But Japanese and Polish free-text arms get as close to an actual choice as this experiment gets. Now, three fruits each hold a real share in Japanese, and Polish has two main choices within 6% of each other.

There is one more thing 001d can be read for, and I was expecting a shift like this, but not of this size. 001d’s English schema arms are essentially 001c run again. It’s the same shuffled list, same schema, differing only by the two guardrail sentences. The Polish 001d arm agrees with its 001c counterpart, but the English and Japanese arms do not. They move by 12.0% and 16.1% respectively, creating margins that cannot be blamed on sampling. This shows something every LLM experiment of this nature should always carry as a disclaimer - you never know which additional word or sentence in your prompt, which you would swear should not have any effect on the outcome, does exactly that (has an effect on the outcome).

conclusion: how much randomness is actually in there?

TL;DR: not much, but you can do some things to improve it.

To quantify all of the “randomness” takes above, let’s ask of each arm whether there was ever a choice being made. The chart below converts each arm’s answer distribution into its effective number of choices - the exponential of its Shannon entropy4, i.e. how many equally likely options would produce the same spread. A hypothetical, perfectly fair ten-sided die would score 10, a perfectly fair coin flip would score 2, and a constant scores exactly 1.

Chart 1.6: How many of the 10 fruits each arm was choosing between. One row per arm, coloured by prompt language: a dot at how many of the ten fruits that arm behaved as though it was choosing between, sitting on the 95% interval around it. The axis starts at one, the score of an arm that always answers the same fruit.
Data from questions: 001a, 001b, 001c, 001d
Numbers behind this chart
armnumber of effective fruit choicesn = 2000
count95% CI
001a en1.091.07–1.12
001a ja1.091.06–1.11
001a pl2.282.22–2.34
001b en1.341.30–1.38
001b ja1.751.68–1.81
001b pl1.001.00–1.00
001c en2.021.94–2.10
001c ja2.452.38–2.51
001c pl2.112.03–2.19
001d en+en1.771.71–1.84
001d ja+en2.001.93–2.07
001d pl+en1.951.87–2.02
001d ja+ja2.182.10–2.25
001d pl+pl1.891.82–1.96
001d en+free2.021.94–2.09
001d ja+free3.012.93–3.08
001d pl+free2.652.58–2.71

This experiment had seventeen arms, and sixteen of them sit below 2.7. The one that does not is Japanese with a shuffled list and no schema at all, at 3.01. Across 34 000 explicit instructions to be random, that is the single arm that behaves as though it were choosing between as many as three of the ten fruits.

The other end of the chart also deserves some attention. 001b’s Polish arm scores exactly 1. All 2 000 of its 2 000 requests come back with mango, leaving no interval to draw. There, a fixed order makes the model deterministic.

The shuffled arms mostly score higher than the fixed ones. English goes 1.09 and 1.34 fixed against 2.02 shuffled, Japanese 1.09 and 1.75 against 2.45. The single arm that beats its own shuffle is Polish in 001a, 2.28 against 2.11.

Where the score does go up, it is tempting to read that as the shuffle “freeing up” the model, but that reading is wrong. Under a fixed order, every call sees an identical string, so the spread we measure is the model’s own spread. Under a shuffled order, every call sees a different string, and we are measuring a mixture of many peaked distributions, each locked onto whatever fruit that particular arrangement favoured. The shuffled numbers include randomness I injected, and that goes for all of 001d as well, since every one of its arms was shuffled too. The six fixed-prompt arms, 1.00 to 2.28, are the honest estimate of what the model brings on its own.

TL;DR of the entire article:

bonus round

Table 1.1: How many times was each fruit picked
fruittimes pickedshare of all answers
lychee1816053.4%
mango961128.3%
pomegranate594717.5%
pineapple2710.8%
grape30.01%
watermelon30.01%
apple20.01%
strawberry20.01%
banana10.003%
orange00.0%
Datasets: 001a, 001b, 001c, 001d

Clear winner: lychee, picked in more than half of total requests.

Clear loser: orange, not once picked across 34 000 answers.

code and data

The code and data behind this experiment are open-sourced. You can find the code and aggregated data on GitHub, and the raw data on HuggingFace:

footnotes

  1. Temperature scales how the model samples from its output distribution. Values below 1.0 sharpen the distribution towards the most probable tokens, while values above 1.0 flatten it towards the less probable ones. At 1.0 the distribution is used as the model produced it, neither sharpened nor flattened.

  2. JavaScript Object Notation (JSON) is a data format derived from JavaScript. It’s used to store and transport data, using key-value pairs.

  3. In psychology this is the serial-position effect: when people recall items from a list, the first and last ones are remembered best, known respectively as the primacy and recency effects. Whether an LLM’s position bias works by the same mechanism is not something this experiment can say. See Serial-position effect on Wikipedia.

  4. Shannon entropy measures the uncertainty in a probability distribution: H = −Σ pᵢ ln pᵢ, where pᵢ is the share of answers landing on option i. It is zero when one option always wins and highest when all options are equally likely. Taking eᴴ converts it back into a count of equally likely options, which is the number plotted here. H is not the raw sample estimate: entropy measured from a finite sample runs low, so it carries the Miller-Madow correction, which adds (k−1)/2n, where k is how many options the arm actually picked and n is how many times it was asked. At 2 000 samples that is worth under 0.004 of a choice - far smaller than any gap this chart is read for, though large enough to show in the second decimal of three arms. The corrected value is the one plotted. See Entropy (information theory) and Entropy estimation on Wikipedia.