Concept

Order Effects & Debiasing

Position boosts, majority-label leaks, and recency pulls — the ordering biases in prompts and judges, and the habits that neutralize them.

Models care about order in ways your intuition undersells. Present options A through D and position itself carries weight: many models over-pick early options or a favored slot, independent of content. Run a pairwise comparison — 'which summary is better?' — then swap the order, and a disturbing fraction of verdicts flip. This is measurement noise wearing the costume of judgment, and it contaminates real systems: LLM judges in evals, A/B copy comparisons, ranked retrieval, multiple-choice grading. If you've never swapped orders and re-run, you don't yet know which of your system's 'preferences' are real.

Few-shot examples leak statistics beyond position. Majority-label bias: when four of five exemplars carry one label, predictions drift toward it — the model reads the base rate off your examples and applies it as a prior. Recency bias: the last exemplar's label tugs on the prediction disproportionately; end on 'negative' and borderline cases lean negative. Both are invisible in casual testing and vicious at scale, because they systematically warp exactly the borderline cases you built the classifier to handle. The exemplars you chose to demonstrate format are simultaneously teaching a distribution, whether you intended one or not.

Long contexts add primacy and recency effects of their own — material at the start and end of the window gets attention the middle doesn't, the lost-in-the-middle effect from Lesson 2. Phrasing carries anchors: a question that mentions a number ('would you estimate around 40%?') pulls estimates toward it, and a false-premise framing gets accepted and elaborated instead of challenged. None of this is exotic. These are the same bias-shaped grooves you'd guard against in a human survey, showing up in a system trained on human text — and the survey-design instincts transfer almost one to one.

The debiasing playbook. For comparisons: run both orders and accept only agreements — a flip means 'no reliable preference,' which is a finding, not a failure. For few-shot: balance the label distribution, shuffle instead of grouping, rotate which exemplar sits last. For multiple choice: randomize option order across runs, or require reasoning about every option before the pick. For estimates: strip anchor numbers from the question. Above all, measure: a permutation test — same content, shuffled orders, compare outcomes — takes twenty minutes and tells you how much of your system's 'judgment' is furniture arrangement. The next lesson gives that test a permanent home.

Check your understanding
Q1. Your LLM judge prefers Response A over B — but prefers B when you present it first. What's the correct handling?
Q2. You build a five-exemplar few-shot prompt: four labeled 'approve', one 'reject', with 'approve' last. Borderline cases now over-approve. Which two biases are compounding?
· Score 100% on the quiz.