Context Bias

Context bias is the undue pull of a prompt's wording, examples, order or tone on an LLM's output, which can skew AI-assisted screening or data extraction.

Status
Published, version 1.0.0
Last reviewed
10 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Context Bias in Prompts for Evidence Review

Context bias is the distortion that arises when the material around a question in a prompt, rather than the evidence the question is about, drives what a large language model answers. The wording of the task, a persona, the examples supplied and the order of the text can each move the output while the request means the same thing. In health technology assessment the same model, given the same abstract, can therefore include or exclude a study depending on how the prompt was built. NICE ECD20 (2026), the NICE framework on AI methods for evidence, lists context bias among the challenges of using AI and suggests prompt review and neutral wording as a mitigation.

How the surrounding text moves the answer

Zhao and colleagues showed with GPT-3 that the prompt format, the choice of few-shot examples and their order could swing accuracy on a classification task between near chance and near the best published results. In one sentiment task, reordering the same examples changed accuracy between 54% and 93%. They traced this to a majority label bias towards answers common among the examples, a recency bias towards answers near the end of the prompt, and a common token bias towards answers frequent in the pre-training data.

Sclar and colleagues changed only meaning-preserving formatting, such as separators, casing and spacing, and found accuracy differences of up to 76 points for one open model. In tests by Liu and colleagues, models used relevant information best at the start or end of a long input and worst in the middle, where GPT-3.5-Turbo scored below its own 56.1% accuracy with no documents at all.

NICE ECD20 (2026) describes prompting as a trade-off, since too little context leaves the model to fill gaps with assumptions and can increase hallucination, while too much can pull the answer towards the prompter's own position. Sharma and colleagues found that five AI assistants consistently gave feedback biased towards the user's stated views and repeated user errors, a behaviour known as sycophancy. Luz de Araujo and colleagues tested 9 models on 27 tasks and found that persona details irrelevant to the task, such as a name, could cut performance by almost 30 percentage points.

Where it enters screening, extraction and modelling

Title and abstract screening shows the effect most clearly, because its errors can be counted. Sanghera and colleagues tested six models on records from 23 Cochrane reviews with a neutral prompt and four prompts worded with progressively stronger bias towards inclusion. Recall changed significantly with the prompt, in the direction the wording implied, while precision tended to move the other way. With a heavily inclusion-leaning prompt, GPT-3.5 reached a sensitivity of 1.000 on the development set but a specificity of 0.393 and a positive predictive value of 0.458 on that balanced set of 800 records, falling to 0.004 on the full search results, where eligible records are rare. For a systematic review feeding a cost-effectiveness model, the prompt thus shapes which trials survive.

For screening, NICE ECD20 (2026) suggests that a short persona asking the model to act as a cautious reviewer who includes records when in doubt may reduce false negatives, but asks that such instructions be validated because they can change performance. It favours one validated prompt template for every record, optimised on held-out development data. It also notes that with smaller models the order of the abstract and the screening criteria inside the prompt can change performance.

In data extraction, questions sent together in one prompt become context for each other, and ECD20 notes that sending each question in a separate call reduces prompt ordering effects and interference between items. Long trial reports raise the position problem found by Liu and colleagues, and so does retrieval-augmented generation, where the selection and order of retrieved passages become part of the context.

For a health economic model, ECD20 limits AI to support with a human closely involved, for example suggesting parameter estimates that are not substituted into the model automatically. A request for a utility value that also states the value the analyst expects invites a sycophantic echo, which the analyst may then read as confirmation. LLM-as-a-Judge is exposed too. Zheng and colleagues found strong position bias in all three judge models they tested and proposed judging each pair twice with the order swapped.

Deliberate steering and unwanted bias

An instruction to include records when in doubt trades specificity for sensitivity, the usual priority in screening because an eligible record excluded at that stage is lost to the synthesis. Such an instruction is a design choice when its effect is measured and reported. The same shift becomes context bias when it is unintended or unmeasured, for example when few-shot examples happen to end with several exclusions.

ECD20 points to prompts reviewed by more than one person and written in neutral language, prompts and decision rules shared when they materially influence outputs, a prompt library, and re-validation when prompts, models or workflows change substantively. The model's own explanation is a poor detector. Turpin and colleagues reordered options in few-shot prompts so that every example's answer was (A), and models drifted towards that answer, with GPT-3.5 losing 18.7 percentage points of accuracy across 13 tasks, while their explanations under Chain-of-Thought Prompting almost never mentioned the cue.

Contextual calibration as a correction

Zhao and colleagues proposed contextual calibration for classification tasks. The model first receives the full prompt with a content-free input such as "N/A" in place of a real record. Any departure from equal probabilities across the answer labels measures the lean the context creates, and probabilities for real records are rescaled to remove it.

q^=softmax(Wp^+b),W=diag(p^cf)−1,b=0\hat{q} = \mathrm{softmax}(W\hat{p} + b), \quad W = \mathrm{diag}(\hat{p}_{cf})^{-1}, \quad b = 0

where q^\hat{q} is the corrected probability vector, p^\hat{p} is the vector of the model's probabilities for each answer label on a real record, renormalised to sum to one, p^cf\hat{p}_{cf} is the same vector for the content-free input, WW is a diagonal weight matrix and bb is a bias vector set to zero. The predicted label is the one with the largest value of Wp^+bW\hat{p} + b. Zhao and colleagues reported gains in average accuracy of up to 30.0 percentage points for GPT-3 and GPT-2. The method is unrelated to calibration of a health economic model to observed data, and it removes deliberate steering along with accidental bias.

Worked example with two screening prompts

All numbers in this example are illustrative. A team screens 1,000 abstracts for a review supplying the treatment effect for a cost-effectiveness model. Of these, 50 are truly relevant and 950 are not. The team compares a neutral prompt with one that adds a cautious-reviewer persona.

1. Neutral prompt. With sensitivity 0.90 the model includes 0.90 × 50 = 45 relevant records and misses 50 − 45 = 5. With specificity 0.94 it excludes 0.94 × 950 = 893 irrelevant records and includes 950 − 893 = 57. It passes 45 + 57 = 102 records to full-text review, a positive predictive value of 45 / 102 = 0.441.

2. Cautious persona. With sensitivity 0.98 the model includes 0.98 × 50 = 49 relevant records and misses 50 − 49 = 1. With specificity 0.80 it excludes 0.80 × 950 = 760 and includes 950 − 760 = 190. It passes 49 + 190 = 239 records on, a positive predictive value of 49 / 239 = 0.205.

3. Compare the prompts. The persona saves 5 − 1 = 4 relevant records at a cost of 239 − 102 = 137 extra full texts, or 137 / 4 = 34.25 extra full texts per relevant record saved.

4. Calibrate one record. Under the persona prompt the content-free input returns 0.70 for include and 0.30 for exclude. A borderline record returns 0.60 for include and 0.40 for exclude, so the uncorrected decision is include. Dividing by the content-free values gives 0.60 / 0.70 = 0.857 for include and 0.40 / 0.30 = 1.333 for exclude, so the calibrated decision is exclude.

5. Interpretation. Steps 1 to 3 describe a deliberate, reportable shift. Had the persona been added only for tone and never measured, the same numbers would describe an unrecognised context bias. Step 4 shows that calibration can undo an inclusion lean the team chose on purpose, lowering sensitivity.

Boundaries with nearby terms

Context bias lies in the model. Automation Bias is the human tendency to accept model output without independent checking, and the two compound when a reviewer sees an AI decision made under a skewed prompt. Hallucination (AI) is output unsupported by the evidence, which ECD20 links to giving too little context. Role Prompting and Few-Shot Prompting can introduce context bias, and ECD20 notes that errors in few-shot examples make it overlap with benchmark bias. Human parallels include anchoring bias in valuation surveys and the wider family of cognitive bias, though context bias comes from how a model weights its input.

Limits of the evidence and common misreadings

Most evidence on prompt sensitivity comes from general language benchmarks and from models that have since changed, and Sanghera and colleagues is one of few studies to vary prompt bias in systematic review screening. Lu and colleagues and Sclar and colleagues both found the bias persisting in larger models, and found that good orderings and formats transferred poorly between models, so a prompt validated on one model does not certify it on another. ECD20 accordingly advises considering re-validation when the model changes. A neutral-sounding prompt can still carry the bias through example order, formatting or position.

Sources

  • Liu NF, Lin K, Hewitt J, et al. Lost in the middle: how language models use long contexts. Transactions of the Association for Computational Linguistics. 2024;12:157-173. https://doi.org/10.1162/tacl_a_00638
  • Lu Y, Bartolo M, Moore A, Riedel S, Stenetorp P. Fantastically ordered prompts and where to find them: overcoming few-shot prompt order sensitivity. Proceedings of ACL 2022. 2022:8086-8098. https://doi.org/10.18653/v1/2022.acl-long.556
  • Luz de Araujo PH, Röttger P, Hovy D, Roth B. Principled personas: defining and measuring the intended effects of persona prompting on task performance. Proceedings of EMNLP 2025. 2025:26857-26886. https://doi.org/10.18653/v1/2025.emnlp-main.1364
  • National Institute for Health and Care Excellence. AI methods for evidence framework (ECD20). Published 9 November 2026. https://www.nice.org.uk/corporate/ecd20
  • Sanghera R, Thirunavukarasu AJ, El Khoury M, et al. High-performance automated abstract screening with large language model ensembles. Journal of the American Medical Informatics Association. 2025;32(5):893-904. https://doi.org/10.1093/jamia/ocaf050
  • Sclar M, Choi Y, Tsvetkov Y, Suhr A. Quantifying language models' sensitivity to spurious features in prompt design. ICLR 2024. https://arxiv.org/abs/2310.11324
  • Sharma M, Tong M, Korbak T, et al. Towards understanding sycophancy in language models. ICLR 2024. https://arxiv.org/abs/2310.13548
  • Turpin M, Michael J, Perez E, Bowman SR. Language models don't always say what they think: unfaithful explanations in chain-of-thought prompting. NeurIPS 2023. https://arxiv.org/abs/2305.04388
  • Zhao TZ, Wallace E, Feng S, Klein D, Singh S. Calibrate before use: improving few-shot performance of language models. Proceedings of ICML 2021, PMLR 139:12697-12706. https://proceedings.mlr.press/v139/zhao21c.html
  • Zheng L, Chiang WL, Sheng Y, et al. Judging LLM-as-a-judge with MT-Bench and Chatbot Arena. NeurIPS 2023 Datasets and Benchmarks Track. https://arxiv.org/abs/2306.05685

Frequently Asked Questions (6)

  • What is Context Bias?

    Context bias is the undue pull of a prompt's wording, examples, order or tone on an LLM's output, which can skew AI-assisted screening or data extraction.

    Source: NICE ECD20 (2026)

  • How does context bias affect AI-assisted title and abstract screening for a systematic review?

    Sanghera and colleagues tested six large language models on records from 23 Cochrane reviews, using a neutral prompt and four prompts worded with progressively stronger bias towards inclusion. Recall changed significantly with the prompt and moved in the direction the wording implied, while precision tended to move the other way. With a heavily inclusion-leaning prompt, GPT-3.5 reached a sensitivity of 1.000 on a balanced development set of 800 records but a specificity of 0.393. Its positive predictive value was 0.458 on that set but 0.004 on the full search results, where eligible records are rare. For a review feeding a cost-effectiveness model, prompt wording can therefore shape which trials survive screening.

    Source: Sanghera et al. 2025

  • What does NICE ECD20 advise to limit context bias when AI is used in evidence work?

    NICE ECD20 treats prompting as a balance between too little context, which leaves the model to fill gaps with assumptions and can raise hallucination, and too much, which can pull the answer towards the prompter's own position. It points to prompts reviewed by more than one person and written in neutral language as a mitigation. For screening it favours one validated prompt template for every record, optimised on held-out development data. For data extraction it notes that sending each question in a separate call reduces prompt ordering effects. It also advises considering re-validation when prompts, models or workflows change substantively.

    Source: NICE ECD20 (2026)

  • How can context bias enter a health economic model built with AI support?

    NICE ECD20 limits AI in health economic evaluation to a support role with a human closely involved, for example suggesting parameter estimates that are not substituted into the model automatically. Context bias can still enter at that stage through the wording of the request. Sharma and colleagues found that five AI assistants consistently gave feedback biased towards the user's stated views and repeated user errors, a behaviour known as sycophancy. A request for a utility value that also states the value the analyst expects therefore invites an echo, which the analyst may then read as independent confirmation.

    Source: Sharma et al. 2024

  • How does context bias differ from automation bias in AI-assisted evidence reviews?

    Context bias lies in the model, which lets the wording, examples, order or tone of a prompt move its answer more than the evidence does. Automation bias is the human tendency to accept model output without independent checking. The two compound when a reviewer sees an AI decision made under a skewed prompt, because the lean in the model output can then pass into the human decision unchecked. Hallucination is a separate problem, meaning output unsupported by the evidence, and NICE ECD20 links it to giving the model too little context.

    Source: NICE ECD20 (2026)

  • How does contextual calibration correct context bias in an LLM classification task such as abstract screening?

    Zhao and colleagues proposed contextual calibration for classification tasks with fixed answer labels, such as include or exclude. The model first receives the full prompt with a content-free input such as "N/A" in place of a real record, and any departure from equal probabilities across the labels measures the lean the context creates. Probabilities for each real record are then divided by the content-free values, and the label with the largest result is chosen. They reported gains in average accuracy of up to 30.0 percentage points for GPT-3 and GPT-2. The correction also removes any lean a team added on purpose, such as an instruction to include records when in doubt, so it can lower screening sensitivity.

    Source: Zhao et al. 2021

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 10 Nov 2026

Content version: 1.0.0

Canonical Identity

Term code
HS-HP-DH-076

Stable URI · Machine-readable · Resolvable · CC BY 4.0

This article is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/context-bias