Semantic Bandits: In-Context Exploration-Exploitation is Biased by Semantic Priors
Organizations: McGill University · Mila – Quebec AI Institute · Skyfall AI · Canada CIFAR AI Chair, Mila
Abstract
Large language models (LLMs) are increasingly deployed as decision-making agents in settings that require sophisticated environmental exploration. However, existing work has raised questions about how LLMs actually balance exploration and exploitation. Unlike classical agents, LLM agents engage with tasks through natural language, exposing them to semantic information with no formal counterpart in the task structure. We introduce the semantic bandit, an extension of the multi-armed bandit setting that explicitly considers the textual labels assigned to actions, and use it to study how semantic priors --- inductive biases arising from associations between language and expected reward learned during pre-training, shape LLM exploration behaviour. We find that semantically informative action labels reduce exploration in favour of exploitation, improving performance when aligned with the reward structure and severely degrading it when misaligned. We further find that negative rewards trigger substantially more exploration than equivalent positive rewards, consistent with an expected-scale bias induced by reward conventions common in pre-training data. Overall, we argue that the use of language to define the environment and rewards introduces unavoidable biases derived from the fact that the model is trained on word co-occurence, with implications for the reliability and robustness of LLM agents in real-world decision-making settings.
Figures & tables
| Mean Reward | World Knowledge | Ordinal | Sentiment | Alphanumeric |
|---|---|---|---|---|
| 75 | Productive Grassland | Highest | Phenomenal | f4tjo5 |
| 50 | Rocky Hills | Intermediate | Typical | 88pdak |
| 25 | Arid Desert | Lowest | Repulsive | 4y11s9 |
| Bandit | Farm | Clothing | |||||
| Model | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| Qwen3-32B | Ordinal | 0.00 | 0.79 | 0.03 | 0.71 | 0.01 | 0.90 |
| World | – | – | 0.10 | 0.28 | 0.04 | 0.86 | |
| Sentiment | 0.09 | 0.29 | 0.14 | 0.29 | 0.10 | 0.34 | |
| Alphanumeric | 0.16 | – | 0.15 | – | 0.16 | – | |
| OLMo-3.1 32B | Ordinal | 0.04 | 0.79 | 0.03 | 0.91 | 0.00 | 1.00 |
Appendix figures & tables29 assets
Supplementary material from the paper’s appendix.
Appendix
| Domain | Task prompt |
|---|---|
| Farming | You are a farmer who owns 3 fields. Each action corresponds to planting your crop in a different field. Each field is associated with a Gaussian distribution with a fixed but unknown mean. At each time step, you will select a field and receive a reward drawn from the associated distribution. Your goal is to maximize your reward across all of your turns. |
| Clothing | You are a recommendation engine that chooses clothing items to display to users when they visit your webpage. You will be presented with 3 items and a user context. Selecting an item corresponds to recommending it to the user. Each item is associated with a Gaussian distribution with a fixed but unknown mean. At each time step, you will select an item and receive a reward drawn from the associated distribution. Your goal is to maximize your reward across all of your turns. |
| Abstract | You are faced with a 3-armed bandit problem. Each action corresponds to pulling a specific arm. Each arm is associated with a Gaussian distribution with a fixed but unknown mean. At each time step, you will select an arm and receive a reward drawn from the associated distribution. Your goal is to select which arm to pull in order to maximize your reward across all of your turns. |
| Type | High pool | Mid pool | Low pool |
|---|---|---|---|
| Ordinal | “Highest Reward” | “Intermediate Reward” | “Lowest Reward” |
| Sentiment | excellent, fabulous, | standard, typical, | awful, terrible, |
| outstanding | functional | deplorable | |
| World (Farm) | Productive Grassland | Rocky Hills | Arid Desert |
| World (Clothing) warm context | tank top, | midweight t-shirt, | flannel long-sleeve, |
| windbreaker | leather jacket | heavy parka |
| History | Nomenclature | Bandit Regret H | Bandit Regret M | Bandit Explor H | Bandit Explor M | Farm Regret H | Farm Regret M | Farm Explor H | Farm Explor M |
|---|---|---|---|---|---|---|---|---|---|
| Full | Ordinal | 0.01 | 1.00 | 1.20 | 1.00 | 0.01 | 0.95 | 1.10 | 1.10 |
| World | – | – | – | – | 0.07 | 0.82 | 1.80 | 1.40 | |
| Sentiment | 0.27 | 0.62 | 1.30 | 1.30 | 0.29 | 0.35 | 2.10 | 2.40 | |
| Alphanumeric | 0.23 | – | 2.20 | – | 0.38 | – | 2.00 | – | |
| Summarized | Ordinal | 0.00 | 0.79 | 1.00 | 1.70 | 0.03 | 0.71 | 1.60 | 2.10 |
| World | – | – | – | – | 0.10 | 0.28 | 2.50 | 2.90 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.04 | 0.79 | 0.03 | 0.91 | 0.00 | 1.00 |
| World | – | – | 0.01 | 0.97 | 0.07 | 0.91 | |
| Sentiment | 0.28 | 0.51 | 0.43 | 0.55 | 0.10 | 0.90 | |
| Alphanumeric | 0.29 | – | 0.47 | – | 0.47 | – | |
| L+ | Ordinal | 0.08 | 0.54 | 0.03 | 0.68 | 0.00 | 0.95 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.04 | 0.82 | 0.04 | 0.88 | 0.05 | 0.91 |
| World | – | – | 0.03 | 0.65 | 0.08 | 0.92 | |
| Sentiment | 0.23 | 0.44 | 0.44 | 0.56 | -0.00 | 0.76 | |
| Alphanumeric | 0.27 | – | 0.43 | – | 0.52 | – | |
| L+ | Ordinal | 0.07 | 0.62 | 0.03 | 0.60 | 0.00 | 0.92 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.02 | 0.89 | 0.01 | 0.94 | 0.05 | 0.94 |
| World | – | – | 0.04 | 0.98 | -0.01 | 0.80 | |
| Sentiment | 0.32 | 0.71 | 0.30 | 0.68 | 0.20 | 0.80 | |
| Alphanumeric | 0.36 | – | 0.41 | – | 0.45 | – | |
| L+ | Ordinal | 0.01 | 0.82 | 0.05 | 0.56 | 0.01 | 0.93 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.00 | 0.79 | 0.03 | 0.71 | 0.01 | 0.90 |
| World | – | – | 0.10 | 0.28 | 0.04 | 0.86 | |
| Sentiment | 0.09 | 0.29 | 0.14 | 0.29 | 0.10 | 0.34 | |
| Alphanumeric | 0.16 | – | 0.15 | – | 0.16 | – | |
| L+ | Ordinal | 0.00 | 0.42 | 0.02 | 0.45 | 0.01 | 0.35 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.00 | 0.88 | 0.03 | 0.70 | -0.01 | 0.89 |
| World | – | – | 0.11 | 0.26 | 0.04 | 0.81 | |
| Sentiment | 0.12 | 0.54 | 0.16 | 0.28 | 0.09 | 0.37 | |
| Alphanumeric | 0.21 | – | 0.13 | – | 0.25 | – | |
| L+ | Ordinal | 0.00 | 0.72 | 0.04 | 0.51 | 0.05 | 0.77 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.01 | 0.87 | 0.05 | 0.75 | -0.00 | 0.80 |
| World | – | – | 0.17 | 0.29 | 0.03 | 0.73 | |
| Sentiment | 0.19 | 0.37 | 0.14 | 0.32 | 0.13 | 0.40 | |
| Alphanumeric | 0.19 | – | 0.21 | – | 0.16 | – | |
| L+ | Ordinal | 0.02 | 0.43 | 0.01 | 0.39 | 0.06 | 0.57 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | 0.13 | 0.27 | 0.15 | 0.17 | 0.15 | 0.22 |
| World | – | – | 0.15 | 0.15 | 0.07 | 0.56 | |
| Sentiment | 0.15 | 0.15 | 0.15 | 0.15 | 0.15 | 0.15 | |
| Alphanumeric | 0.15 | – | 0.15 | – | 0.15 | – | |
| L+ | Ordinal | 0.15 | 0.20 | 0.15 | 0.16 | 0.15 | 0.15 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | – | – | – | – | 0.13 | 0.18 |
| World | – | – | – | – | 0.06 | 0.51 | |
| Sentiment | 0.14 | 0.14 | 0.15 | 0.14 | 0.14 | 0.18 | |
| Alphanumeric | – | – | – | – | 0.15 | – | |
| L+ | Ordinal | – | – | – | – | 0.14 | 0.16 |
| Bandit | Farm | Clothing | |||||
|---|---|---|---|---|---|---|---|
| Scale | Nomenclature | Helpful | Misleading | Helpful | Misleading | Helpful | Misleading |
| H+ | Ordinal | – | – | – | – | 0.12 | 0.23 |
| World | – | – | – | – | 0.06 | 0.53 | |
| Sentiment | 0.17 | 0.11 | 0.11 | 0.18 | 0.20 | 0.22 | |
| Alphanumeric | – | – | – | – | 0.16 | – | |
| L+ | Ordinal | – | – | – | – | 0.13 | 0.12 |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 1.0 | 1.6 | 1.5 | 1.5 | 1.3 | 1.5 | 1.1 | 1.1 | 1.0 | 1.0 | 1.0 | 1.0 |
| World | – | – | – | – | 1.0 | 1.1 | 1.0 | 1.1 | 1.1 | 1.2 | 1.0 | 1.2 | |
| Sentiment | 1.3 | 2.0 | 1.4 | 1.7 | 1.0 | 1.2 | 1.4 | 1.8 | 1.1 | 1.1 | 1.0 | 1.0 | |
| Alphanumeric | 1.6 | 2.5 | – | – | 1.2 | 1.4 | – | – | 1.1 | 1.2 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 1.6 | 1.9 | 1.4 | 1.4 | 1.3 | 1.3 | 1.0 | 1.3 | 1.0 | 1.0 | 1.1 | 1.2 |
| World | – | – | – | – | 1.1 | 1.4 | 1.3 | 2.0 | 1.1 | 1.5 | 1.1 | 1.4 | |
| Sentiment | 1.9 | 1.9 | 1.8 | 2.1 | 1.4 | 1.8 | 1.5 | 1.7 | 1.0 | 1.1 | 1.0 | 1.0 | |
| Alphanumeric | 1.8 | 2.2 | – | – | 1.3 | 1.8 | – | – | 1.0 | 1.0 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 1.6 | 1.7 | 1.3 | 1.4 | 1.2 | 1.2 | 1.0 | 1.2 | 1.0 | 1.1 | 1.1 | 1.3 |
| World | – | – | – | – | 1.0 | 1.3 | 1.0 | 1.2 | 1.0 | 1.3 | 1.2 | 1.5 | |
| Sentiment | 1.3 | 1.8 | 1.4 | 1.5 | 1.4 | 1.9 | 1.3 | 1.6 | 1.0 | 1.0 | 1.2 | 1.5 | |
| Alphanumeric | 1.8 | 2.6 | – | – | 1.2 | 1.9 | – | – | 1.0 | 1.1 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 1.0 | 1.0 | 1.1 | 1.7 | 1.0 | 1.6 | 1.2 | 2.1 | 1.2 | 1.2 | 1.1 | 1.3 |
| World | – | – | – | – | 1.9 | 2.5 | 2.0 | 2.9 | 1.3 | 1.7 | 1.2 | 1.4 | |
| Sentiment | 1.9 | 2.2 | 2.4 | 2.8 | 2.1 | 2.4 | 2.6 | 2.7 | 2.0 | 2.2 | 2.3 | 2.4 | |
| Alphanumeric | 2.8 | 3.0 | – | – | 2.7 | 3.0 | – | – | 2.6 | 3.0 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 1.2 | 1.3 | 1.1 | 1.5 | 1.3 | 1.5 | 1.4 | 1.8 | 1.2 | 1.3 | 1.2 | 1.4 |
| World | – | – | – | – | 1.9 | 2.4 | 2.2 | 2.8 | 1.3 | 1.5 | 1.2 | 1.5 | |
| Sentiment | 1.5 | 2.1 | 1.7 | 2.1 | 2.0 | 2.4 | 2.6 | 2.7 | 1.7 | 1.9 | 2.1 | 2.4 | |
| Alphanumeric | 2.5 | 2.7 | – | – | 3.0 | 3.0 | – | – | 2.4 | 2.7 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 1.1 | 1.5 | 1.4 | 1.4 | 1.2 | 1.8 | 1.2 | 1.8 | 1.1 | 1.2 | 1.3 | 1.4 |
| World | – | – | – | – | 2.0 | 2.7 | 2.0 | 3.0 | 1.1 | 1.5 | 1.6 | 1.7 | |
| Sentiment | 2.2 | 2.4 | 2.0 | 2.4 | 2.2 | 2.7 | 2.6 | 2.7 | 2.2 | 2.2 | 2.3 | 2.4 | |
| Alphanumeric | 2.2 | 2.7 | – | – | 2.7 | 2.9 | – | – | 2.6 | 2.8 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | 2.8 | 2.8 | 2.4 | 2.9 | 2.7 | 3.0 | 3.0 | 3.0 | 2.6 | 3.0 | 2.6 | 2.9 |
| World | – | – | – | – | 3.0 | 3.0 | 3.0 | 3.0 | 1.9 | 2.1 | 1.9 | 2.2 | |
| Sentiment | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | |
| Alphanumeric | 3.0 | 3.0 | – | – | 3.0 | 3.0 | – | – | 3.0 | 3.0 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | – | – | – | – | – | – | – | – | 2.8 | 3.0 | 2.7 | 3.0 |
| World | – | – | – | – | – | – | – | – | 1.9 | 2.0 | 2.0 | 2.2 | |
| Sentiment | 3.0 | 3.0 | 2.9 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 2.9 | 3.0 | 2.9 | 3.0 | |
| Alphanumeric | – | – | – | – | – | – | – | – | 3.0 | 3.0 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
| Helpful | Misleading | Helpful | Misleading | Helpful | Misleading | ||||||||
| Scale | Nomenclature | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 | @3 | @10 |
| H+ | Ordinal | – | – | – | – | – | – | – | – | 2.4 | 2.9 | 2.5 | 2.9 |
| World | – | – | – | – | – | – | – | – | 2.0 | 2.1 | 1.8 | 2.4 | |
| Sentiment | 2.9 | 3.0 | 2.9 | 3.0 | 3.0 | 3.0 | 2.9 | 3.0 | 2.9 | 3.0 | 3.0 | 3.0 | |
| Alphanumeric | – | – | – | – | – | – | – | – | 3.0 | 3.0 | – | – | |
| Bandit | Farm | Clothing | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Regret | Exploration | Regret | Exploration | Regret | Exploration | ||||||||
| Model | Nomenclature | H | M | H | M | H | M | H | M | H | M | H | M |
| Qwen3-8B | Ordinal | 0.01 | 0.95 | 1.10 | 1.10 | 0.00 | 1.00 | 1.00 | 1.00 | – | – | – | – |
| World | – | – | – | – | 0.01 | 0.78 | 1.10 | 1.50 | – | – | – | – | |
| Sentiment | 0.33 | 0.60 | 1.10 | 1.00 | 0.20 | 0.70 | 1.00 | 1.00 | – | – | – | – | |
| Alphanumeric | 0.40 | – | 1.60 | – | 0.34 | – | 1.60 | – | – | – | – | – | |
| Arms | Model | Nom. | Bandit Regret | Bandit Explor | Farm Regret | Farm Explor | Clothing Regret | Clothing Explor |
|---|---|---|---|---|---|---|---|---|
| 3 Arms | Qwen3-32B | Helpful | 0.00 | 1.00 | 0.03 | 1.60 | 0.01 | 1.20 |
| Mislead | 0.79 | 1.70 | 0.71 | 2.10 | 0.90 | 1.30 | ||
| Gemini 3.1 Flash Lite | Helpful | 0.13 | 2.80 | 0.15 | 3.00 | 0.15 | 3.00 | |
| Mislead | 0.27 | 2.90 | 0.17 | 3.00 | 0.22 | 2.90 | ||
| OLMo-3.1-32B | Helpful | 0.04 | 1.60 | 0.03 | 1.50 | 0.00 | 1.00 | |
| Mislead | 0.79 | 1.50 | 0.91 | 1.10 | 1.00 | 1.00 |