AI Projects

A Name in the Prompt: How Entity Recognition Distorts Decision-Making Under Ambiguity (2026)

Introduction

Language models store factual associations about named entities, such as people, places, landmarks, songs, and other recognizable concepts, which can bias model responses. However, the mechanisms are not completely understood yet. Therefore, I analyze here how a named entity and its associations (i.e. Mary Mallon) impacts decision making in language models.

Methods

To answer these questions, Llama 3.1 8B Instruct was given a hypothetical outbreak scenario with various epidemiological variables and was asked whether the given information are sufficient to initiate public health actions, using p(YES) and log odds as readouts.

Borrowing from the microbiology toolbox, I used a factorial prompt design to study a dose->response pattern. More specifically, the epidemiological variables in the prompt resembled different levels of strength of evidence for or against public health actions, i.e. negative->unknown->positive lab results reflect an increasing strength of evidence in support of initiating actions. Using a factorial combination of four different epidemiological variables, allowed me then to analyze a dose->response pattern on a numerical output, i.e. p(YES) and log odds.

In a second step, I confirmed the Mallon-effect at geometry level, i.e. norm distances and cosine of the decision token vectors from the residual stream.

Results

I showed that in an unbiased baseline, the numerical output (in p(YES) and log odds) was associated with the strength of the epidemiological input variables: scenarios with a positive lab result produced a larger log odds than scenarios with negative lab results for example; these gradient-like associations held true across all variables.

As expect, when naming the suspected source of the outbreak “Mary Mallon” (aka Typhoid Mary), log odds shifted upwards notably compared to control names. What is more interesting is that this increase of log odds (the “Mallon-effect”) was not a numerically constant prior but notably differed by the epidemiological variables presented in the prompt.

Geometric analysis of the decision token vectors allowed more granular insights:

First I could confirm, at vector level, that the Mallon-effect indeed differed by epidemiological variable, which was shown in the differential divergence of norm distances as well as the cosine similarities between Mallon and control name representations. Importantly, the name controls showed no such epi variable-dependent separation.

Secondly, I could analyze the pattern of this variable-dependent modulation. And the data suggest two overlapping patterns whereby the presence of the Mallon name selectively amplified (1) along the epidemiological plausibility gradient, and (2) along narrative alignment with the original Mary Mallon story. However, to confirm those working hypotheses, more experiments are required.

A free-text exploration raised an even more fundamental question: the name “Mary Mallon” caused “isolation/quarantine” to jump to the top of the model’s listed public health actions regardless of lab results, suggesting that entity recognition may not just modulate confidence in the fixed YES-NO answer, but could reorganize what question the model is effectively answering.

Summary & Conclusion

Taken together, these findings suggest that Mary Mallon entity recognition in Llama 3.1 does act as context-dependent modulator that varies along recognizable gradients of epidemiological plausibility as well as narrative alignment with the entity’s known history. Furthermore, early evidence suggests that the retrieved associations could bias, which question the model is actually answering. These findings could help to further understand the mechanisms by which name-associated knowledge in LLMs modulates downstream responses, including in the context of name-induced biases. Additional research is however required to generalize these findings across models and scenarios.

Read more ->