Does AI get confused by long prompts in general, or specifically by where the key info sits within them?
Is position bias about context length or specifically about pivot location?
This explores whether language models favor certain positions because prompts are long and attention gets spread thin, or because of where the key piece of information sits in the prompt, regardless of length.
This explores whether position bias comes from prompt length, with models losing track as context grows, or from location, with models favoring certain spots no matter how long the input is. The corpus doesn't have a paper that tests length and location against each other directly. What it does have points toward location. In the clearest results, the prompt length stays fixed and only the arrangement changes, yet the effect is still large.
The sharpest example comes from in-context learning. Moving an identical block of demonstrations from the start of a prompt to the end changes accuracy by up to 20% and flips nearly half of the predictions How much does demo position alone affect in-context learning accuracy?. Nothing gets longer or shorter. The content is the same, and only its placement changes. AI shopping agents show the same pattern: they keep favoring products in certain list slots even in plain-text interfaces, even when told outright to ignore position Do AI shopping agents show persistent position bias in text interfaces?. Neither of these needs a long context to appear, so length can't be the whole story.
Why would location matter by itself? One possible mechanism is that a small number of huge, input-independent activations act as hidden bias terms, pulling attention toward particular tokens whatever those tokens say Do hidden massive activations act as attention bias terms?. If attention is already tilted toward certain positions before the model reads anything, then where you place information decides how much weight it gets. Where that tilt comes from matters too. Cognitive biases in models are set mostly during pretraining, and finetuning only nudges them Where do cognitive biases in language models come from?. That fits the shopping-agent finding that each model has its own position preferences, which reappear after every update.
Length still plays a part, just a different one. Research on long contexts suggests the real limit is the compute needed to turn a lot of context into usable internal state, not raw memory capacity Is long-context bottleneck really about memory or compute?. And transformers are much better than state-space models at retrieving from anywhere in their context, because they don't squeeze everything into a fixed-size state Can state-space models match transformers at copying and retrieval?. One reasonable reading is that length makes retrieval harder overall, while location decides which items win when attention is uneven. That reading is an inference across these papers, not a measured result.
The practical takeaway: if position bias is about location, telling the model to ignore order won't fix it, and the shopping-agent study shows exactly that. A more promising fix is training models to give the same answer to different versions of the same prompt Can models learn to ignore irrelevant prompt changes?. In principle, that could include versions where the same items appear in a different order.
Sources 7 notes
Repositioning an identical demo block from prompt start to end swaps up to 20% accuracy and flips nearly half of predictions. This spatial effect operates independently of demo content and spans multiple task types.
ACES found that AI agents exhibit strong, model-specific position biases even in headless text-only interfaces with explicit instructions to ignore position. The bias is a deep-seated model characteristic, not a superficial visual artifact, and recurs after each model update.
A very small number of input-agnostic activations with values up to 100,000× larger than others act as indispensable implicit bias terms and concentrate attention probability onto specific tokens. This phenomenon appears across model sizes and Vision Transformers.
A causal experiment using random-seed variation and cross-tuning showed that models sharing a pretrained backbone exhibit similar bias patterns regardless of finetuning data. Biases are planted during pretraining and merely swayed by instruction tuning.
Research shows the bottleneck is not memory capacity but the compute required to consolidate evicted context into fast weights during offline sleep phases. Performance improves with more consolidation passes, following a test-time scaling pattern on harder reasoning tasks.
Show all 7 sources
Two-layer transformers can copy exponentially long strings while state-space models are fundamentally limited by their fixed-size latent state. Empirically, transformers dramatically outperform SSMs at copying and context retrieval in both synthetic and pretrained settings.
Two methods—BCT (output-level) and ACT (activation-level)—train models to respond identically to clean and wrapped prompts by using the model's own clean responses as targets, eliminating specification and capability staleness inherent in standard SFT.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Planted in Pretraining, Swayed by Finetuning: A Case Study on the Origins of Cognitive Biases in LLMs
- It’s All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization
- What Is Your AI Agent Buying? Evaluation, Biases, Model Dependence, & Emerging Implications for Agentic E-Commerce
- Consistency Training Helps Stop Sycophancy and Jailbreaks
- Repeat After Me: Transformers are Better than State Space Models at Copying
- Vertical tacit collusion in AI-mediated markets
- Massive Activations in Large Language Models
- Recursive Language Models