The Librarian Who Refused to Code: Model-Dependent Identity Enactment in LLM Code Generation
Summary
This pre-registered study evaluates how detailed biographical personas in system prompts affect LLM code generation, finding model-dependent effects: one model showed strong persona effects on output length and identity enactment (including refusal to code from a librarian persona), while another showed weaker effects. Personas acted as behavioral-policy biases rather than universal quality improvements.
View Cached Full Text
Cached at: 07/21/26, 06:45 AM
# The Librarian Who Refused to Code: Model-Dependent Identity Enactment in LLM Code Generation
Source: [https://arxiv.org/html/2607.17420](https://arxiv.org/html/2607.17420)
###### Abstract
Biographical personas are widely used in system prompts, but their effects on code generation are rarely evaluated under controlled, pre\-registered conditions\. We tested four prompt conditions \(no persona, two engineer personas, and a research\-librarian persona\), 12 code\-generation tasks, two frontier models, and five runs per cell \(480 completions\)\. Persona effects differed between the two tested models\. Under the pre\-registered mixed\-effects analysis, the condition\-by\-model interaction was significant for provider\-reported output tokens; a post\-hoc visible\-character measure showed the same qualitative pattern\. Six GPT\-5\.5 completions were length\-capped and are reported separately\. On Claude Opus, the minimalist engineer persona reduced visible output by 30% \(33% in provider tokens\) without improving correctness, while the thorough engineer persona increased output without a correctness gain\. In an exploratory post\-hoc analysis, the librarian persona elicited in\-character disclaimers in 55 of 60 Opus responses and 12 genuine no\-code responses, lowering mean correctness from 0\.92 to 0\.67\. GPT\-5\.5 produced neither behavior in its 59 non\-truncated responses\. These results are consistent with personas acting as model\-dependent behavioral\-policy biases rather than universal quality interventions\. We release raw completions, derived scores, analysis artifacts, a pre\-registration document, and an execution gate log; end\-to\-end test\-based rescoring requires an unreleased task harness\.
## 1 Introduction
“You are a senior software engineer” is among the most widely reproduced lines in prompt libraries\. The premise is that assigning a model an identity improves its work\. This premise is rarely tested rigorously: most studies of persona and role prompting use thin personas \(a job title, a one\-line role, a demographic tag\), measure on tasks where ground truth is soft, and rarely pre\-register their analyses\. The result is a literature that is suggestive but easy to confound — when a label changes the output, it is hard to distinguish a model reasoning about a character from a model keying off a few loaded tokens\.
We ask a narrower, testable question\. Given biographically detailed personas — several paragraphs describing a person, containing no*imperative*instructions about how to write code — does a code\-generating model change its behavior, and if so, how? We hold the task, the grading, and the sampling fixed, vary only the system\-prompt persona, and pre\-register the hypotheses and decision rules before collecting data\.
Our contribution is threefold:
1. 1\.Apre\-registered demonstration that persona effects are model\-dependent: one frontier model responds strongly to personas across multiple measures \(correctness, output length, and identity enactment\); the other tested model shows weaker, task\-specific effects and no identity enactment\.
2. 2\.A reframing of personas asbehavioral\-policy biases\. On the responsive model, no persona improved correctness; personas shifted*style*\(length, structural consistency\), and whether a shift helped depended entirely on the task’s objective\.
3. 3\.An exploratory, behavior\-level instance ofidentity enactment / trait generalization\(observed and quantified post hoc, not pre\-registered\): a persona with zero behavioral instruction \(a research librarian\) induced role\-consistent hedging and refusal to code, behaviors stated nowhere in the prompt, on one model and not the other\.
We also document a methodology — signed external pre\-registration with hard execution gates — developed in response to repeated failures \(an under\-powered null, an unauthorized six\-model run, a biased dry\-run\) in earlier iterations of this work\. We believe the methodology is a reusable contribution for behavioral LLM experiments, and we describe it in Appendix D\.
We are explicit about scope\. Both frontier models saturate correctness on these tasks \(baseline≈0\.92\\approx 0\.92–0\.970\.97\), so the study speaks to*how*models write code under personas — style, length, role\-behavior — not to whether personas raise the ceiling on correctness\. The identity\-enactment result is, by construction, descriptive: we quantified it after observing it in the completions, not via a pre\-registered metric\. We mark confirmatory and exploratory claims throughout\.
## 2 Related work
Persona and role prompting\.Prior work establishes that persona framing changes model outputs, with mixed, model\- and task\-dependent effects on task performance and a recurring observation that*how*a persona is specified matters as much as*what*it specifies\[[1](https://arxiv.org/html/2607.17420#bib.bib1),[2](https://arxiv.org/html/2607.17420#bib.bib2),[5](https://arxiv.org/html/2607.17420#bib.bib5)\]\. Much of this literature studies persona prompting in social simulation, question answering, rationale generation, and general task performance — for example, persona prompting as a lens on social reasoning\[[3](https://arxiv.org/html/2607.17420#bib.bib3)\]and structured, multidimensional identity\-representation frameworks for agents\[[4](https://arxiv.org/html/2607.17420#bib.bib4)\]\. In contrast, we evaluate whether persona*narratives*act as behavioral policies in*code generation*, affecting not only style and accuracy but also task willingness and model\-dependent identity enactment\. Studies of persona/role effects also report that gains on one dimension can come with losses on another \(e\.g\., expertise framing improving alignment while damaging accuracy\)\[[5](https://arxiv.org/html/2607.17420#bib.bib5)\], consistent with our finding of no global quality gain and a clear style\-shift profile\.
Trait generalization\.Work assigning personality or sociodemographic profiles to LLMs reports that models produce outputs whose features align with the assigned profile, and that this alignment is sensitive to how the persona is formulated\[[2](https://arxiv.org/html/2607.17420#bib.bib2)\]\. Our librarian result is a strong, behavior\-level instance: the model generalizes from an identity \(“not a programmer”\) to an action \(hedging, declining\) never stated in the text\. Compared to profile\-based studies, our personas are thicker narratives and our dependent measure is a consequential behavior \(refusal to produce code\) rather than a stylistic signature\.
Length and style instructions\.A relevant alternative explanation for length effects is simple instruction\-following\. Recent evaluation shows that explicit length instructions are*not*reliably obeyed even by strong models\[[9](https://arxiv.org/html/2607.17420#bib.bib9)\]\. This is exactly why we cannot, from our data alone, attribute one engineer persona’s terseness purely to narrative rather than to an explicit style sentence in its text; we treat that specific contrast cautiously \(§6\)\.
Code generation and test\-driven evaluation\.We situate the study in work on LLM code generation\[[6](https://arxiv.org/html/2607.17420#bib.bib6)\]and its evaluation against executable tests, including test\-driven and interactive settings\[[7](https://arxiv.org/html/2607.17420#bib.bib7)\]; recent study designs also propose specification\-driven framings for code generation\[[8](https://arxiv.org/html/2607.17420#bib.bib8)\]\. Our tasks follow this test\-based evaluation tradition but vary only the system\-prompt persona\.
Steerability and model dependence\.Prompt\-steerability evaluations frame persona/steering effects distributionally and assume — and measure — variation across models\[[1](https://arxiv.org/html/2607.17420#bib.bib1)\]\. Our pre\-registered condition×\\timesmodel interaction provides a controlled, code\-domain data point for this model\-dependence\.
## 3 Method
### 3\.1 Design
A 4 \(condition\)×\\times12 \(task\)×\\times2 \(model\)×\\times5 \(run\) fully\-crossed design, 480 completions\. Conditions:
- •P0— no persona \(neutral system prompt\)\.
- •P\_A \(Maya\)— a structure\-oriented senior engineer\.
- •P\_B \(Ron\)— a pragmatic, minimalist startup engineer\.
- •P\_C \(Linnea\)— a research librarian; a length\-matched persona with no engineering content\.
Persona texts are biographical and contain no*imperative*instructions about output format or quality \(one persona, Ron, includes a descriptive remark that his own code tends to run short — an explicit style cue we treat as a confound in §6; the librarian persona contains no coding\- or task\-behavior content at all\)\. They were written as psychologically coherent individuals — with a personal history, working preferences, and minor internal tensions — rather than as role labels or job titles\. This is a deliberate design choice central to the study: a label \(“you are a librarian”\) invites keyword\-level reactions, whereas a fully realized person can only be responded to by inferring how such a person would behave — which is precisely the inference we aim to detect\. Full texts in Appendix A\.
### 3\.2 Tasks
Twelve code\-generation tasks across three categories \(refactor, debug, implement\) and two languages \(Python, TypeScript\), each with an automated test suite \(8–11 executable test cases: a core set of typical and edge scenarios, with the TypeScript tasks compiling to more assertions under the hardened harness\) and an explicit output contract appended to every prompt\. Task inventory and release scope are summarized in Appendix B; the exact user prompts are recoverable verbatim from the raw logs, while the executable task harness is not part of this release\.
### 3\.3 Models and sampling
claude\-opus\-4\-8andgpt\-5\.5, the current flagships of two families at run time\. Five runs per cell\. Temperature was omitted \(provider default\) for both models — see §6 and Appendix D for the pre\-registered amendment recording why the originally\-locked value could not be used\.max\_tokens=4096=4096for both\.
### 3\.4 Metrics
- •Q1 — correctness:fraction of test cases passed\.
- •E1 — output length:primary measure is the visible length of the returned text \(character count\), which is comparable across providers; provider\-reported completion tokens are retained as a secondary measure \(see §4\.2 and Appendix E on why they diverge for GPT\-5\.5\)\. The pre\-registration specified provider tokens as E1; we elevate visible characters to the primary measure post hoc, for cross\-provider comparability, and report both — flagging this as a deviation \(§6\)\.
- •C2 — structural consistency:mean pairwise AST similarity across the five runs of a cell\.
Correctness saturated near ceiling for both models \(§4\), so it serves as a saturated covariate; the live confirmatory outcomes are E1 and C2, plus the condition×\\timesmodel interaction across all three\. Codebook in Appendix C\.
### 3\.5 Analysis
Primary analysis is per\-model mixed\-effects regression with task as a random effect\[[11](https://arxiv.org/html/2607.17420#bib.bib11)\]; the pooled model adds a condition×\\timesmodel interaction term, which constitutes the test of model dependence\. Effect sizes are Cohen’sddwith 95% confidence intervals; significance uses Bonferroni\-correctedα=0\.0083\\alpha=0\.0083across the six within\-outcome contrasts\. Equivalence\-framed hypotheses judge the 95% CI on signedddagainst\[−0\.3,\+0\.3\]\[\-0\.3,\+0\.3\]\[[12](https://arxiv.org/html/2607.17420#bib.bib12)\]\. The full pre\-registered hypothesis set and decision rules are in Appendix C; the signed pre\-registration and gate log are in the supplement\.
### 3\.6 Pre\-registration and integrity
The pre\-registration is*recorded as externally signed*in the execution gate log \(a cryptographically signed commit, referenced by short commit identifiers\) at least 24 hours before the main run; the signature itself is not independently verifiable from this release alone, which we note as a transparency limitation \(Appendix E\)\. Data collection ran under hard gates that block execution until the pre\-registration is verifiably signed, the model set matches the locked set exactly, and tasks pass a difficulty check; these gates are designed to remove the researcher degrees of freedom that let post\-hoc flexibility manufacture significance\[[14](https://arxiv.org/html/2607.17420#bib.bib14)\]\. We pre\-register decisions rather than conducting a formal Registered Report\[[13](https://arxiv.org/html/2607.17420#bib.bib13)\]\. No response content was inspected during collection\. Two amendments \(reclassifying saturated correctness; recording the temperature setting\) were signed before the run\. The methodology and its motivation are detailed in Appendix D\.
## 4 Results
### 4\.1 Correctness is saturated
Baseline correctness is near ceiling: 0\.92 \(Opus\), 0\.97 \(GPT\-5\.5\)\. No persona raised correctness above baseline on either model\. The highest\-impact correctness effect was a*decrease*\(Linnea on Opus; §4\.4\)\. We therefore treat correctness as a saturated covariate and report it descriptively\.
### 4\.2 Persona effects are model\-dependent \(confirmatory\)
Our pre\-registered test of model dependence—the condition×\\timesmodel interaction—is significant on correctness \(Waldχ2\\chi^\{2\}, artifact\-correctedp=4\.1×10−8p=4\.1\\times 10^\{\-8\};p=4\.5×10−7p=4\.5\\times 10^\{\-7\}on the full pre\-registered data\) and on output length \(provider tokens, artifact\-correctedp=2\.9×10−5p=2\.9\\times 10^\{\-5\};p=0\.008p=0\.008before removal; the shared visible\-character measure givesp≈4\.5×10−22p\\approx 4\.5\\times 10^\{\-22\}\)\. The corrected values remove six truncation artifacts and change no verdict \(Appendix C\.2\)\. The pattern is consistent across the measures we can evaluate: Claude Opus shifts substantially across personas; GPT\-5\.5 is substantially less persona\-responsive, especially on identity\-enactment markers\.
Table 1:Mean visible output length \(characters\) and provider\-reported completion tokens, with correctness, by model×\\timescondition \(per model×\\timescondition aggregate,n=60n=60except where truncation artifacts were excluded; see §4\.2 and Appendix E\)\.\(Visible length is the character count of the returned text, a shared measure comparable across providers\. Provider tokens use different tokenizers and are not comparable in absolute terms across providers; they also count generation that need not appear in the returned text\. On taskI\-TS\-1, six GPT\-5\.5 completions returned empty text withstop\_reason = lengthand a maximal token count; these truncation artifacts are excluded from the affected cells, which is why the two length measures diverge most for GPT\-5\.5/Maya\. Within\-model percentage changes are the valid comparison\.\)
If one row of Table 1 is worth remembering, it is Opus under Linnea: correctness0\.92→0\.670\.92\\to 0\.67, the largest change in the table, driven by in\-character disclaimers and outright refusals to produce code \(§4\.4\) — while GPT\-5\.5 under the same persona barely moves \(0\.97→0\.950\.97\\to 0\.95\)\. The contrast between those two rows is the paper in miniature: one model enacts the persona to the point of declining the task, the other ignores it\.
### 4\.3 On the responsive model, personas bias style, not quality
On Opus, the engineer personas moved output length in the direction of their described working style \(confirmatory, E1\):
- •Ron \(minimalist\):dd=−1\.15=\-1\.15\(95% CI excludes 0;p=1\.6×10−20p=1\.6\\times 10^\{\-20\}on provider tokens;dd=−1\.15=\-1\.15on visible characters\)\. A 33% reduction in provider tokens \(30% in visible characters\), with only a small correctness decrease \(0\.92→0\.900\.92\\to 0\.90\); the pre\-registered equivalence criterion for “no correctness cost” was not met, so we report the observed decrease rather than claiming correctness was preserved\.
- •Maya \(thorough\):dd=\+0\.33=\+0\.33\(p=0\.002p=0\.002on provider tokens;dd=\+0\.53=\+0\.53on visible characters\)\. An 11% increase in provider tokens \(16% in visible characters\), with a small correctness*decrease*\(0\.92→0\.870\.92\\to 0\.87\)\.
On structural consistency \(C2\), Ron made Opus markedly more consistent run\-to\-run \(dd=\+1\.11=\+1\.11,p=3\.8×10−5p=3\.8\\times 10^\{\-5\}\); Maya did not move it \(dd=−0\.07=\-0\.07, n\.s\.\)\.
Two points follow\. First, we find no evidence that any persona improved correctness — but because baseline correctness is saturated \(§4\.1\), this is a bound, not a refutation: the design could not detect a positive correctness effect even if one existed, so the honest claim is “no improvement observed under saturated conditions,” not “personas cannot improve quality\.” Second, the personas produced a coherent*style*profile that fit the task objective to differing degrees\. Ron’s minimize\-and\-ship policy fits a “pass the tests, keep it short” objective: fewer tokens, higher structural consistency, and only a small correctness decrease \(0\.92→0\.900\.92\\to 0\.90; equivalence to baseline was not established, §4\.3\)\. Maya’s add\-structure policy spent more tokens without a correctness return under that same objective\. Neither is better in the abstract; their habits fit the objective differently\. We develop this in §5\.
On GPT\-5\.5, the engineer personas produced a real but smaller length effect in the same direction: on the shared visible\-character measure, Ron reduced output \(dd=−0\.67=\-0\.67;−25%\-25\\%in characters\) while Maya was essentially flat \(dd=−0\.06=\-0\.06\)\. \(On provider tokens Ron’s reduction persists \(dd=−0\.29=\-0\.29\) while Maya shows only a small apparent reduction \(dd=−0\.16=\-0\.16\) that is inflated by excluding her four truncated completions and nearly vanishes on the visible\-text measure; this is exactly why we treat visible length as primary\. All per\-contrast values here are the pre\-registered per\-model LMM, matchingresults\.csvfor Opus andmixed\_effects\_corrected\.jsonfor the corrected GPT\-5\.5 cells\.\) The Ron effect is substantially smaller than the corresponding Opus effect \(dd=−1\.15=\-1\.15\) — roughly a third to a half its standardized magnitude, not an order of magnitude — and, critically, GPT\-5\.5 showed none of the identity\-enactment markers \(§4\.4\)\. The model difference is therefore not “one model responds, the other does not” but “both shift output length under an explicit brevity cue, while only Opus enacts persona*identity*\.”
### 4\.4 Identity enactment: the librarian who declined to code \(exploratory\)
The Linnea condition was designed as a length\-and\-content control\. It instead produced the study’s most consequential behavior, which we quantified post hoc by inspecting completions\.
On Opus, Linnea drove correctness from 0\.92 to 0\.67 \(dd=−0\.81=\-0\.81,p=8\.1×10−12p=8\.1\\times 10^\{\-12\}\) — the largest correctness effect of any persona\. Reading the completions explains why:
- •Under a fixed textual operationalization \(defined post hoc; Appendix F\),55 of Opus’s 60 responses included an in\-character disclaimer\(typically at the opening\), e\.g\., “I should be upfront — I’m a research librarian, not a software developer\.” The pattern is robust across tasks: disclaimers are a majority in all 12 tasks, not concentrated in a few\.
- •12 of 60 contained no code at all\.Opus declined or deflected in character\. One example, verbatim: “I think you’ve got the wrong Linnea, or at least the wrong desk\. I’m a research librarian — I can find you three books and a database tutorial on data structures, but…” This response scored zero correctness because it contained no code; it was role\-appropriate, not erroneous\.
- •Within Linnea, responses containing a disclaimer scored markedly lower on correctness \(mean 0\.65,n=55n=55\) than those without \(0\.87,n=5n=5\), consistent with the drop being driven by role\-consistent hedging and declining rather than by degraded code per se\.
On GPT\-5\.5, the same persona producedzero in\-character disclaimers and zero genuine no\-code responses\(its single empty completion under this persona was a length\-truncation artifact, excluded as in Table 1 and Appendix F, not a refusal\)\. It read “research librarian” and wrote the code\.
The Linnea persona containsno explicit behavioral instruction— nothing about hedging, declining, or disclaiming, and no instruction to avoid coding\. The behavior is generalized from the identity alone\. This is the clearest instruction\-free evidence in our data for narrative\-driven identity enactment, precisely because there is no instruction to follow \(§6 contrasts this with the engineer personas, where an explicit style sentence confounds the interpretation\)\.
We note the engineer personas show the same enactment in milder, style\-level form: under Maya and Ron, Opus speaks in\-character within its responses \(e\.g\., “in my experience, files like this are usually mostly\-good”; “I don’t think it’s earning its keep yet”\), i\.e\., its outputs reproduce the persona’s register rather than merely satisfying the task instruction\. These voice markers appear in a notable minority of responses even though the length shift is universal, so we report them as corroborating rather than primary\.
## 5 Personas as behavioral policies \(task\-fit\)
Synthesizing §4\.3 and §4\.4: a persona did not make the model smarter; it switched on a set of habits, priorities, and heuristics — a behavioral policy\. Whether that policy helped depended on the task, the metric, and the model\.
In a setting graded on passing tests with concise code, Ron’s policy \(minimize, avoid premature abstraction, smallest change that works\) fit well: it cut a third of the tokens at a small correctness cost \(0\.92→0\.900\.92\\to 0\.90; equivalence to baseline not established\) and improved structural consistency\. Maya’s policy \(decompose, add structure, build for the long term\) cut against that particular objective: more output, no correctness return\. Linnea’s policy \(I am not the right person for this\) actively harmed it\. None of these is a statement about which persona is “good”; they are statements about fit between an activated policy and an objective\.
This motivates a reframing\. The useful question is not “which persona makes the model better?” but “which behaviors does a persona activate or suppress, and do those fit the objective I actually have?” The same task with a different objective — say, leaving a maintainable codebase rather than passing a test suite — could reverse the ranking\. The fictional identity matters less than the behaviors it licenses, reinforces, or suppresses\.
We are careful about the direction this data supports\. We observed the*risk*side of fit clearly: a mismatched persona reduced correctness\. We did*not*observe the*benefit*side, and — critically — could not have: baseline correctness was saturated, so no persona could demonstrate a correctness gain even in principle\. “Matching persona to objective improves performance” therefore remains a hypothesis our design cannot test, not a claim it refutes\.
### 5\.1 A persona is a soft instruction that can compete with default helpfulness
The Linnea result admits a framing with practical consequences\. A persona is, functionally, a soft instruction installed in the system prompt; the librarian persona quietly conflicts with the model’s default disposition to help by producing code\. On Opus, the persona wins often enough to suppress code generation in a fifth of cases and to inject disclaimers in the large majority; on GPT\-5\.5, the default disposition wins and the persona is effectively ignored\. We frame this as an*interpretation*, not a measured mechanism: our data show the behavioral outcome \(one model yields to the persona, the other does not\), not an internal policy hierarchy\. We did not measure how the two influences are arbitrated inside either model, and competing explanations — greater role\-play tuning, stronger instruction\-priority on persona content, more anthropomorphic priors — predict the same outcome\.
With that caveat, the framing matters for anyone deploying coding agents\. It implies a persona can act as a benign\-looking vector for behavior change: no malicious string, no explicit override, just an identity whose implied behavior diverges from the task\. In a multi\-step agent, a mis\-specified or adversarially supplied persona could induce*silent degradation*— an agent that hedges or declines rather than failing loudly — and because susceptibility is model\-dependent, the same persona\-bearing prompt may be inert on one model and disruptive on another in a multi\-model pipeline\. We flag this as a hypothesis for security\-oriented follow\-up, not a demonstrated attack; establishing it would require adversarially constructed personas and an explicit threat model, neither of which this study contains\. What we can state is that personas reliably change how a responsive model works, that the change is only sometimes aligned with a given objective, and that on a different model family it may not occur at all\.
## 6 Limitations
We state these plainly; several bound the claims above\.
The engineer\-persona length effect is confounded\.Ron’s persona text includes the sentence that his code is usually shorter than his teammates’\. We therefore cannot, from this design, separate narrative inference from explicit style\-instruction\-following for Ron’s terseness; both predict the same result\. Replicating the effect on additional models does not resolve this confound — multiple models may each be following the same explicit sentence\. The decomposition that would resolve it \(narrative\-without\-cue vs\. cue\-without\-narrative\) was not run\. We note that the Linnea result is free of this confound — her text contains no explicit instruction to hedge, refuse, or avoid coding — and it is the basis for the identity\-enactment claim\. The engineer personas corroborate via in\-character voice but are not relied upon for the central claim\.
Correctness is saturated\.Both frontier models pass≈0\.92\\approx 0\.92–0\.970\.97at baseline, leaving no headroom to detect a positive correctness effect of personas on these tasks\. Our claims concern style, length, and role\-behavior, not whether personas improve correct\-code rates on harder tasks\.
The identity\-enactment result is descriptive and post hoc\.The disclaimer and no\-code counts were defined after observing the behavior, not pre\-registered\. We report them as a quantified observation that motivates a pre\-registered replication, not as a confirmatory test\.
Robustness to the task\-level unit of inference\.Under an exploratory task\-clustered re\-analysis \(Appendix C\), the correctness interaction is not robust, and the provider\-token interaction passes the pre\-registered threshold only narrowly \(and not at all when one prompt\-contaminated task,R\-TS\-2, is excluded\); the strongest surviving interaction is on visible characters, a measure elevated to primary post hoc\.
Scope of generalization\.Identity enactment is shown for one non\-engineering persona on one model family\. Whether it holds across other non\-professional personas and other models is open\. Two models is sufficient for a controlled interaction test but is a floor, not a ceiling, for claims about model “families\.”
Temperature\.Both models rejected the originally\-locked sampling temperature; the run used provider defaults for both \(a pre\-registered amendment\)\. Provider defaults may differ, which is a documented caveat for cross\-model comparison; however, the interaction we report is a condition×\\timesmodel interaction, which a constant per\-model temperature difference does not straightforwardly explain, and the largest interaction effect \(Linnea collapsing Opus correctness via refusal\) is implausible as a temperature artifact\.
Tokenizer non\-comparability\.Absolute token counts differ across providers’ tokenizers; only within\-model percentage changes are interpreted\.
## 7 Conclusion
Persona prompting, tested under controlled and pre\-registered conditions on code generation, is — at least on tractable tasks where frontier models already saturate correctness — not a quality lever and not a universal technique\. On a responsive model it acts as a behavioral\-policy bias that shifts style and, when the persona’s identity conflicts with the task, behavior — to the point that a non\-programmer persona led a frontier model to hedge and decline to code, a behavior present nowhere in its prompt\. A comparably capable model from another family showed almost none of this\. For practitioners, the implication is that assigning an identity hands the model a character to reproduce, including parts the prompt author never explicitly specified; the persona should be chosen for the behaviors it activates, and verified to have any effect at all on the target model\. For researchers, the librarian result is a behavior\-level instance of narrative\-driven identity enactment — exploratory here — that we believe merits a pre\-registered, multi\-persona, multi\-model replication\.
Future work\.The natural next study makes identity enactment confirmatory rather than observed\. It would \(i\) pre\-register the disclaimer/refusal operationalization of Appendix F before data collection; \(ii\) span several non\-professional personas \(not only a librarian\) to test whether the effect generalizes across non\-coding identities; \(iii\) span several models per family to turn the two\-model interaction into a claim about families; and \(iv\) include a narrative\-vs\-cue decomposition \(a persona’s behavioral sentence present vs\. removed\) to close the confound that remains open for the engineer personas \(§6\)\. Separately — and only as a hypothesis this study motivates rather than tests — the “persona as soft instruction competing with default helpfulness” framing \(§5\.1\) suggests a security\-oriented design: personas supplied through untrusted channels \(e\.g\., a simulated teammate in a shared workspace\), with an explicit threat model distinguishing silent refusal from covertly altered output\. We state plainly that the present work demonstrates neither; it establishes only that a benign, instruction\-free identity can shift a model’s behavior, model\-dependently, in ways the prompt never stated\.
## Data and code availability
We release, as a partial\-reproducibility package: the four persona texts \(verbatim, with SHA\-256 hashes\); the two raw completion logs \(480 records, verbatim\); the derived per\-response scores and per\-cell consistency; the contrast/interaction results; the identity\-enactment classification script \(Appendix F\), which is self\-contained and reproduces the Appendix F counts from the logs; and the signed pre\-registration, gate log, and checksum manifests\. The top\-level scoring/analysis scripts are included for reference but depend on project modules and the task\-specification harness that are*not*part of this release; end\-to\-end re\-execution of test\-based scoring from raw prompts therefore requires those additional files, which we can provide on request\. The supplement additionally ships its ownREADME\.mdandMANIFEST\.md\(so the ancillary archive is self\-describing\),requirements\.txtwith pinned analysis dependencies, and an explicit license \(MIT for code; CC BY 4\.0 for data and text artifacts\)\. See the appendices and the supplement manifest \(Appendix E\)\.
## Appendix APersona texts \(verbatim\)
The neutral baseline \(P0\) and three persona system prompts, exactly as transmitted, are reproduced in the supplement underpersonas/, with per\-file SHA\-256 hashes matching thesystem\_prompt\_shafield in every completion record\. Summaries:P\_A \(Maya\)—∼\\sim7 years on long\-lived backend systems, on\-call experience, decomposes large functions, prefers explicit interfaces; no output\-format or length instruction\.P\_B \(Ron\)—∼\\sim6 years at small startups, minimalist, skeptical of abstraction; contains the explicit style sentences “The code you write is usually shorter than your teammates’\.” and “Your review comments are also short” \(the cues discussed in §6\)\.P\_C \(Linnea\)— research librarian, library\-science background; contains no statement about code, output length, formatting, hedging, or declining — the basis for the §4\.4 claim\.
## Appendix BTask specifications
Twelve tasks; identifiers encode category and language \(e\.g\.,R\-PY\-1= refactor, Python, \#1\)\. Each task provides a problem statement, a required interface,≥\\geq3 documented ambiguities with their resolution, and 8–11 executable test cases \(a core set of typical and edge scenarios; the TypeScript tasks compile to more assertions under the hardened harness, so the executable count per task ranges from 8 to 11\) with pass criteria\. Every user prompt had the following output contract appended verbatim: “Provide the code as a complete code block in the appropriate language\. You may include other content before or after the code block\.” The exact user prompts as transmitted are recoverable verbatim from theuser\_prompt\_textfield of every record in the released completion logs; the separate task\-specification harness \(interfaces and executable test suites\) is not part of this release and is available on request\.
Table 2:Task inventory\.Difficulty calibration\.Tasks were piloted before the main run\. Because both flagship models passed near\-ceiling on fair tasks \(the saturation reported in §4\.1\), a difficulty band could not be achieved without making tasks artificially adversarial; this was recorded as a signed amendment, reclassifying correctness as a saturated covariate rather than a primary discriminating outcome \(Appendix D\)\.
## Appendix CMetrics codebook and pre\-registered hypotheses
### C\.1 Metric definitions
Q1 \(correctness\):passed test cases / total, per response; the harness executes the extracted code block against the suite in isolation\. If no code block is present, the response scores 0 — this is how genuine role\-consistent refusals \(stop\_reason = end\_turn\) enter the correctness statistic \(see §4\.4\); length\-truncation artifacts \(empty text,stop\_reason = length\) are instead excluded as missing, consistent with Table 1 and Appendix F\.E1 \(output length\):primary measure is visible text length \(character count of the returned response\), comparable across providers; provider\-reported completion tokens are reported secondarily\. Six GPT\-5\.5 completions onI\-TS\-1returned empty text withstop\_reason = lengthand a maximal token count; these are truncation artifacts \(the token field counts generation absent from the returned text\) and are treated as missing for length analysis rather than as zero\-length or as their token value\.C2 \(structural consistency\):per \(model, condition, task\) cell, the mean pairwise tree\-edit/AST similarity over responses that contain parseable code; empty, no\-code, and length\-truncated responses are recorded as missing \(not zero, and not treated as parseable\) and excluded pairwise\. The three GPT\-5\.5/I\-TS\-1cells contain these truncation artifacts \(scored parseable in the original run\) and are therefore*contaminated*; re\-scoring them requires the TypeScript scoring harness, which is not part of this release\. We therefore do not report any C2 result that depends on them: the GPT\-5\.5 C2 contrasts and the C2 model\-interaction are omitted rather than computed on contaminated cells, and the only C2 result we report — Ron on Opus \(§4\.3\) — is independent of these cells\. The raw \(original, contaminated\) per\-cell values remain inc2\_by\_cell\.csv; the three affected cells are identified inMANIFEST\.mdand are excluded from every reported C2 statistic\.
### C\.2 Confirmatory hypotheses \(pre\-registered, with verdicts\)
The pre\-registration locked seven confirmatory hypotheses \(H1–H6 plus H\_INT; H2 was demoted to exploratory before any main run because two trained raters withκ/ICC≥0\.7\\kappa/\\text\{ICC\}\\geq 0\.7were not available — signed amendment, Appendix D\)\. We report all of them here as locked, with the locked decision rule and the observed verdict\. Significance tests use Bonferroniα=0\.0083\\alpha=0\.0083; equivalence tests judge the 95% CI on signedddagainst\[−0\.3,\+0\.3\]\[\-0\.3,\+0\.3\]\.
- •H1 \(correctness equivalence; Q1; Maya/Ron\)\.*Inconclusive*in both models: the 95% CI onddoverlaps but is not contained in\[−0\.3,\+0\.3\]\[\-0\.3,\+0\.3\]\(artifact\-corrected, per\-model LMM: Opus P\_Add=−0\.28=\-0\.28\[−0\.66,0\.10\]\[\-0\.66,0\.10\], P\_Bdd=−0\.17=\-0\.17\[−0\.65,0\.31\]\[\-0\.65,0\.31\]; GPT P\_Add=−0\.12=\-0\.12\[−0\.47,0\.24\]\[\-0\.47,0\.24\], P\_Bdd=−0\.12=\-0\.12\[−0\.48,0\.24\]\[\-0\.48,0\.24\]; the pre\-correction all\-480 GPT values,−0\.41\-0\.41and−0\.22\-0\.22, are inresults\.csv, and the corrected per\-contrast statistics are inmixed\_effects\_corrected\.json\)\. Q1 is a saturated covariate \(Appendix D\)\.
- •H3 \(structural consistency; C2; Maya and Ron increase\)\.Reported per model under the locked rule \(amendment A1: rests on C2 only; per model,≥\\geq1 of 2 C2 contrasts positive atp<0\.0083p<0\.0083with\|d\|≥0\.3\|d\|\\geq 0\.3; C1 is exploratory and not counted\)\.*Supported on Opus*, carried by Ron \(dd=\+1\.11=\+1\.11,p=3\.8×10−5p=3\.8\\times 10^\{\-5\}\); Maya on Opus is null \(dd=−0\.07=\-0\.07\), so the increase is driven by the minimalist persona alone rather than by both engineer personas\.*Not evaluable on GPT\-5\.5*: itsI\-TS\-1C2 cells are truncation\-artifact contaminated and cannot be re\-scored without the unreleased TypeScript harness \(C\.1\), so neither GPT C2 contrast can be assessed\. The Opus result is independent of the contaminated cells\.
- •H4 \(raw efficiency; E1; Maya\>\>P0, Ron≤\\leqP0\)\.*Supported on Opus*\(Mayadd=\+0\.33=\+0\.33,p=0\.002p=0\.002; Ron non\-positive,dd=−1\.15=\-1\.15\);*rejected on GPT\-5\.5*\(Maya not positive\-significant\)\.
- •H5 \(net efficiency E2, tokens\-per\-passed\-test; equivalence\)\.*Rejected on Opus*\(e\.g\. Maya\-vs\-Ron and Ron\-vs\-P0 contrasts fall well outside the equivalence band on the locked bootstrap statistic\);*inconclusive on GPT\-5\.5*\. E2 remained a primary outcome after amendment A1; its interaction is not among the significant primary outcomes for H\_INT \(below\)\.
- •H6 \(content vs\. prompt\-length specificity; Linnea vs\. P0 on all outcomes; equivalence\)\.*Rejected on Opus*: the P\_C\-vs\-P0 CI excludes the equivalence band on Q1 \(dd=−0\.81=\-0\.81\) and E1 \(dd=−0\.90=\-0\.90\), i\.e\. the non\-engineering persona*does*differ from baseline — the effect is content\-driven, not prompt\-length\-driven\.*Inconclusive on GPT\-5\.5*\. Per the locked H1×\\timesH6 interpretation table, with H1 inconclusive the joint interpretation is reported descriptively \(§4\.4\)\.
- •H\_INT \(condition×\\timesmodel interaction\)\.*Supported\.*All interaction statistics use the pre\-registered pooled model,outcome∼\\simC\(condition\)×\\timesC\(model\) \+ \(1\|\|task\), ML, with a joint Waldχ2\\chi^\{2\}\(df 3\) on the interaction terms; this model is estimable on the corrected data\. The interaction is significant on output length — E1, a primary outcome under A1 — withp=2\.9×10−5p=2\.9\\times 10^\{\-5\}on provider tokens andp≈4\.5×10−22p\\approx 4\.5\\times 10^\{\-22\}on the shared visible\-character measure\. The correctness interaction is also highly significant \(p=4\.1×10−8p=4\.1\\times 10^\{\-8\}\), but Q1 is a saturated equivalence covariate under A1, so it corroborates rather than independently satisfies the locked rule \(which requires a primary outcome\)\. Both are post\-correction: the same model on the full pre\-registered data \(before excluding the sixI\-TS\-1truncation artifacts\) givesp=4\.5×10−7p=4\.5\\times 10^\{\-7\}\(Q1\) andp=0\.008p=0\.008\(E1 tokens\); excluding the artifacts strengthens both and changes no verdict\.recompute\_corrected\.pyadditionally reports an OLS\-with\-task\-fixed\-effects*numerical*cross\-check \(iid residuals; not distribution\-free\), which agrees, and an exploratory task\-clustered sensitivity analysis \(see below\)\. We do*not*report a C2 model\-interaction: it would depend on the contaminated GPT\-5\.5/I\-TS\-1cells \(C\.1\), which cannot be re\-scored within this release\. H\_INT is therefore supported via E1, the pre\-registered primary outcome\.
Per\-contrastdd, CI,pp, and significance for every outcome \(including E2 and the C1 exploratory measure\) are inanalysis/results\.csv\. Two pooled\-statistics files are released and their relationship is explicit:analysis/mixed\_effects\.jsonholds the*original*pre\-correction LMM output \(Q1 interactionp=4\.5×10−7p=4\.5\\times 10^\{\-7\}; E1p=0\.008p=0\.008on provider tokens, including the sixI\-TS\-1truncation artifacts\), andanalysis/mixed\_effects\_corrected\.jsonholds the*corrected*statistics reported in this paper \(artifacts excluded\), computed with the same pre\-registered LMM \(fit via a health\-checked optimizer sequence; the fit is rejected if the log\-likelihood is non\-finite or the random\-effect covariance is degenerate\) and numerically reproducible within an explicit tolerance byanalysis/recompute\_corrected\.py, whose default mode*verifies*the released file against a fresh recomputation \(it never silently overwrites it\) and which also emits an OLS numerical cross\-check, the exploratory task\-clustered sensitivity reported below, and every treatment variant \(keep\-all, drop\-artifacts, drop\-all\) so the analytic choice is auditable\. Pinned analysis dependencies are inrequirements\.txt\.results\.csvreports the original per\-contrast effect sizes; corrected per\-contrast statistics for*both*models \(estimate, standard error,pp, Cohen’sdd, and CI, for Q1 and both E1 measures\), and the corrected H3 verdict, are inmixed\_effects\_corrected\.json\.
#### Task\-level sensitivity and a task\-prompt disclosure\.
The pre\-registered LMM assumes a common treatment effect across tasks \(random intercept only\)\. As an*exploratory*robustness probe \(not pre\-registered\), we re\-estimated the interaction with task fixed effects and cluster\-robust standard errors on the 12 tasks \(jointFF, small\-sampledf=\(3,11\)df=\(3,11\); computed byrecompute\_corrected\.py\): the correctness interaction does not survive task\-level clustering \(F\(3,11\)=2\.47F\(3,11\)=2\.47,p=0\.116p=0\.116\), the provider\-token interaction remains under the pre\-registered threshold but narrowly \(F\(3,11\)=6\.80F\(3,11\)=6\.80,p=0\.0074p=0\.0074\), and the visible\-character interaction remains strong \(F\(3,11\)=33\.13F\(3,11\)=33\.13,p=8\.4×10−6p=8\.4\\times 10^\{\-6\}\) — with the caveats that visible characters were elevated to primary post hoc, and that a 12\-cluster test is itself small\-sample\-fragile, so this probe neither replaces nor overturns the pre\-registered analysis\. Separately, a post\-run audit found that theR\-TS\-2user prompt — identical across all 40 of its runs and all conditions — leaked test\-construction notes naming the task’s two hidden discriminators\. Because every condition received the same prompt, this does not bias between\-persona contrasts, but it does leak hidden\-test logic on one of the 12 tasks; we disclose it rather than delete it \(the cells are flagged inMANIFEST\.md\)\. ExcludingR\-TS\-2, the clustered tests givep=0\.152p=0\.152\(correctness\),p=0\.0185p=0\.0185\(provider tokens — no longer under the pre\-registered threshold\), andp=4\.5×10−5p=4\.5\\times 10^\{\-5\}\(visible characters\)\. Finally, we characterize the six excluded completions as*length\-capped system outcomes*rather than verified external artifacts: they are not randomly distributed \(all GPT\-5\.5 onI\-TS\-1: four under Maya, one under Ron, one under Linnea, none at baseline\), and both the all\-480 and the artifact\-excluded analyses are reported above so that neither treatment is hidden\.
### C\.3 Exploratory \(post hoc\)
Identity enactment: in\-character disclaimer rate, no\-code rate, and their association with correctness under P\_C\. Operationalization, per\-task breakdown, and robustness in Appendix F\. Per\-contrastdd, CI,pp, and significance for every contrast are in the supplement \(analysis/results\.csv\); pooled interaction statistics inanalysis/mixed\_effects\.json\.
## Appendix DMethodology: signed pre\-registration with execution gates
This study is the validated run of a project whose earlier iterations failed in instructive ways\. We document the failures and the gating method because we believe the method is independently useful for behavioral LLM experiments, where the temptation to “run a few more models” or to let a dry\-run leak into analysis is strong and corrosive\. Our gates are complementary to automated behavioral\-evaluation tooling\[[10](https://arxiv.org/html/2607.17420#bib.bib10)\]: that line of work generates evaluation suites for a target behavior, whereas our gates govern the*integrity of the data\-collection process*for a fixed, pre\-registered design\.
Failure modes observed in earlier iterations\.\(1\) An under\-powered null with post\-hoc rationalization: an initial study measured subtle held\-out behaviors with metrics that could not detect them, and signed its pre\-registration the same day data were collected\. \(2\) Unauthorized scope expansion: a later execution ran six models instead of the two in the locked design, with the pre\-registration left unsigned \(all placeholders\), and ignored a difficulty\-calibration result showing tasks at ceiling/floor\. \(3\) A biased dry\-run: a proposed pipeline\-validation harness emitted synthetic token counts pre\-set to the experiment’s expected result, which the analysis script would have ingested as real data\.
Gates used for the validated run\.Execution was blocked behind a one\-directional, append\-only checklist\.*Gate 0 \(scope lock\):*the model set is read from a locked file; the run aborts if its length differs from the design; a chat instruction to add models is treated as a proposed amendment requiring re\-signing, not authorization\.*Gate 1 \(signature\):*no main calls until mechanical checks confirm the pre\-registration has no placeholders, no unchecked boxes, real file hashes matching the live files, real seeds, and a PI signature via an external channel dated≥\\geq24h before the run\.*Gate 2 \(difficulty\):*a stop\-the\-line check on baseline pass rates; out\-of\-band tasks block the run\.*Gate 3 \(variance pre\-flight\):*sets runs\-per\-cell from a measured within\-cell variance rule\.*Gate 4 \(run discipline\):*locked sampling config; no response\-content inspection during collection; verbatim logging with per\-batch checksums\.
The gate log \(supplement\) shows the executing agent repeatedly refused to proceed while the pre\-registration was unsigned, escalated, made zero API calls until an external signature existed, and halted once more when a post\-signature parameter mismatch was detected — proceeding only when the transmitted configuration matched the signed document\. Two amendments \(correctness reclassification; temperature setting\) were signed before the run\. Every completion record carries SHA\-256 hashes of its system and user prompts; a manifest lists hashes for all released files; the 480 analyzed completions all postdate the signature, carry no dry\-run markers, and balance exactly across the 96 cells\.
## Appendix ESupplement file manifest
- •personas/— P0, P\_A, P\_B, P\_C verbatim texts \(\+ per\-file SHA\-256\)\.
- •runs/main/— two raw completion logs \(480 records, verbatim\); each record includes the exact system and user prompts\.
- •analysis/scored\_responses\.csv— per\-response Q1, E1, parseability\.
- •analysis/c2\_by\_cell\.csv— per\-cell structural consistency\.
- •analysis/results\.csv— per\-contrastdd, CI,pp, significance\.
- •analysis/mixed\_effects\.json— pooled interaction statistics \(original, pre\-correction; includes the sixI\-TS\-1truncation artifacts\)\.
- •analysis/mixed\_effects\_corrected\.json— corrected pooled interaction statistics \(pre\-registered LMM with optimizer/health diagnostics and captured warnings\), OLS and task\-clustered sensitivity blocks, full corrected per\-contrast statistics for both models, and the corrected H3 verdict; verified \(default\) or regenerated \(\-\-write\) byrecompute\_corrected\.py\.
- •analysis/recompute\_corrected\.py— corrected recomputation \(all treatment variants plus a method check against the original LMM\); by default*verifies*mixed\_effects\_corrected\.jsonwithin an explicit numerical tolerance and never overwrites it;\-\-writeregenerates it\.
- •analysis/requirements\.txt— pinned dependency versions used to generate the canonical corrected statistics\.
- •LICENSE\.txt— license terms \(MIT for code; CC BY 4\.0 for data and text artifacts\)\.
- •analysis/identity\_enactment\.py— self\-contained script reproducing the Appendix F counts from the raw logs \(standard library only; excludes length\-truncation artifacts as missing, matching Table 1\)\.
- •analysis/score\_responses\.py,analysis/analyze\_main\.py— top\-level scoring/analysis scripts, included for reference; these depend on project modules and the task harness*not*included in this release\.
- •preregistration/05\_preregistration\.md— signed pre\-registration\.
- •GATE\_LOG\.md— append\-only execution log\.
- •LOCKED\_MODELS\.txt,SHA256SUMS\.txt— locked model set and integrity manifest\.
## Appendix FOperationalization of identity enactment \(post hoc\)
The §4\.4 result was observed after data collection, not pre\-registered\. To make it as rigorous as a post\-hoc analysis can be, we fix explicit, reproducible definitions and report the per\-task breakdown and robustness\. The classification script \(analysis/identity\_enactment\.py\) is released in the supplement, uses only the Python standard library, and deterministically reproduces the counts below from the raw logs\.
### F\.1 Definitions \(fixed before counting\)
In\-character disclaimer:a response is counted if its text matches a case\-insensitive pattern for the model asserting the librarian identity or non\-programmer status \(a first\-person assertion within 40 characters of “research librarian”/“librarian”/“not a \(software\) developer/engineer/programmer”, or the phrases “wrong Linnea”, “not \(really\) my area/field/expertise”, “outside what I/my”\)\.No\-code response \(genuine\):a response with zero fenced code blocks that terminated normally \(stop\_reason≠\\neqlength\); since every task requests a code block, this is a failure to perform the task\. Length\-truncation artifacts \(empty text withstop\_reason = length\) are*excluded*as missing, exactly as in Table 1 and Appendix C, and are not counted as no\-code; in the released logs this affects one GPT\-5\.5 completion \(I\-TS\-1\), so GPT\-5\.5/Linnea hasn=59n=59\.Correctness \(Q1\):as in Appendix C; a genuine no\-code response scores 0 by definition\. These are textual heuristics, not semantic judgments; we treat the counts as a lower\-bound characterization and release the script for re\-scoring\.
### F\.2 Per\-task results, P\_C \(Linnea\), both models
Each cell isn=5n=5runs \(GPT\-5\.5I\-TS\-1:n=4n=4; one length\-truncation artifact excluded, per Appendix F\.1\)\. “Disc” = disclaimer count; “NC” = no\-code count\.
Table 3:Per\-task identity\-enactment markers under the Linnea persona\.TaskOpus DiscOpus NCOpus Q1GPT DiscGPT NCGPT Q1D\-PY\-1401\.00001\.00D\-PY\-2500\.38000\.88D\-TS\-1400\.55000\.73D\-TS\-2500\.90000\.98I\-PY\-1501\.00001\.00I\-PY\-2520\.60001\.00I\-TS\-1550\.00001\.00I\-TS\-2550\.00001\.00R\-PY\-1401\.00000\.95R\-PY\-2501\.00001\.00R\-TS\-1500\.91000\.91R\-TS\-2300\.73000\.91Total55/6012/600\.6710/590/590\.945
### F\.3 Robustness
Disclaimers are not concentrated in a few tasks: on Opus they are a majority \(≥\\geq3/5\) in all 12 tasks\. No\-code refusals are concentrated in 3 of 12 tasks \(I\-PY\-2, I\-TS\-1, I\-TS\-2\) and account for the two zero\-correctness cells\. On Opus, responses with a disclaimer average Q1=0\.65=0\.65\(n=55n=55\); the five without average0\.870\.87\. GPT\-5\.5 produced zero in\-character disclaimers and zero genuine no\-code responses \(n=59n=59after excluding oneI\-TS\-1length\-truncation artifact; Q1=0\.945=0\.945\), behaviorally indistinguishable from its no\-persona baseline\.
### F\.4 Interpretation and its limits
The cleanliness of the enactment claim rests on the persona text containing no behavioral instruction \(verified: a whole\-word scan of the Linnea text for any code\-, length\-, or behavior\-related term returns nothing\)\. The behavior is therefore generalized from the identity, not copied from an instruction\. The limits remain those in §6: one non\-engineering persona on one model family, metrics defined after observation, and conservative textual proxies for the underlying behavior\. A confirmatory test would pre\-register these definitions and apply them to several non\-professional personas across several models\.
## References
- \[1\]Pedro Henrique Luz de Araujo, Paul Röttger, Dirk Hovy, and Benjamin Roth\.Principled Personas: Defining and Measuring the Intended Effects of Persona Prompting on Task Performance\.In*Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing \(EMNLP\)*, pages 26857–26886, 2025\. doi:10\.18653/v1/2025\.emnlp\-main\.1364\. arXiv:2508\.19764\.
- \[2\]Marlene Lutz, Indira Sen, Georg Ahnert, Elisa Rogers, and Markus Strohmaier\.The Prompt Makes the Person\(a\): A Systematic Evaluation of Sociodemographic Persona Prompting for Large Language Models\.In*Findings of the Association for Computational Linguistics: EMNLP 2025*, pages 23212–23237, 2025\. doi:10\.18653/v1/2025\.findings\-emnlp\.1261\. arXiv:2507\.16076\.
- \[3\]Jing Yang, Moritz Hechtbauer, Elisabeth Khalilov, Evelyn Luise Brinkmann, Vera Schmitt, and Nils Feldhus\.Persona Prompting as a Lens on LLM Social Reasoning\.In*Proceedings of the 2026 Conference of the European Chapter of the Association for Computational Linguistics \(EACL\)*, pages 1152–1170, 2026\. doi:10\.18653/v1/2026\.eacl\-long\.52\.
- \[4\]Keyeun Lee, Seo Hyeong Kim, Seolhee Lee, Jinsu Eun, Yena Ko, Hayeon Jeon, Esther Hehsun Kim, Seonghye Cho, Soeun Yang, Eun\-mee Kim, and Hajin Lim\.SPeCtrum: A Grounded Framework for Multidimensional Identity Representation in LLM\-Based Agent\.In*Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies \(Volume 1: Long Papers\)*, pages 6971–6991, 2025\. doi:10\.18653/v1/2025\.naacl\-long\.356\.
- \[5\]Zizhao Hu, Mohammad Rostami, and Jesse Thomason\.Expert Personas Improve LLM Alignment but Damage Accuracy: Bootstrapping Intent\-Based Persona Routing with PRISM\.arXiv:2603\.18507, 2026\.
- \[6\]Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim, and Sunghun Kim\.A Survey on Large Language Models for Code Generation\.arXiv:2406\.00515, 2024\.
- \[7\]Sarah Fakhoury, Aaditya Naik, Georgios Sakkas, Saikat Chakraborty, and Shuvendu K\. Lahiri\.LLM\-Based Test\-Driven Interactive Code Generation: User Study and Empirical Evaluation\.*IEEE Transactions on Software Engineering*, 50:2254–2268, 2024\. arXiv:2404\.10100\.
- \[8\]Giovanni Rosa, David Moreno\-Lumbreras, Gregorio Robles, and Jesús M\. González\-Barahona\.Understanding Specification\-Driven Code Generation with LLMs: An Empirical Study Design\.arXiv:2601\.03878, 2026\.
- \[9\]Wei Zhang, Zhenhong Zhou, Kun Wang, Junfeng Fang, Rongwu Xu, Yuanhe Zhang, Rui Wang, Ge Zhang, Xinfeng Li, Li Sun, Lingjuan Lyu, Yang Liu, and Sen Su\.LIFEBENCH: Evaluating Length Instruction Following in Large Language Models\.In*Advances in Neural Information Processing Systems 38 \(NeurIPS 2025\)*, Datasets and Benchmarks Track, 2025\.arXiv:2505\.16234\.
- \[10\]Isha Gupta, Kai Fronsdal, Abhay Sheshadri, Jonathan Michala, Jacqueline Tay, Rowan Wang, Samuel R\. Bowman, and Sara Price\.Bloom: An Open Source Tool for Automated Behavioral Evaluations\.Anthropic, December 2025\.[https://www\.anthropic\.com/research/bloom](https://www.anthropic.com/research/bloom); code:[https://github\.com/safety\-research/bloom](https://github.com/safety-research/bloom)\.
- \[11\]Andrew Gelman and Jennifer Hill\.*Data Analysis Using Regression and Multilevel/Hierarchical Models*\.Cambridge University Press, 2007\.
- \[12\]Daniël Lakens\.Equivalence Tests: A Practical Primer for t Tests, Correlations, and Meta\-Analyses\.*Social Psychological and Personality Science*, 8\(4\):355–362, 2017\.
- \[13\]Brian A\. Nosek and Daniël Lakens\.Registered Reports: A Method to Increase the Credibility of Published Results\.*Social Psychology*, 45\(3\):137–141, 2014\.
- \[14\]Joseph P\. Simmons, Leif D\. Nelson, and Uri Simonsohn\.False\-Positive Psychology: Undisclosed Flexibility in Data Collection and Analysis Allows Presenting Anything as Significant\.*Psychological Science*, 22\(11\):1359–1366, 2011\.Similar Articles
Persona-Assigned Large Language Models Exhibit Human-Like Motivated Reasoning
This paper investigates whether assigning personas to large language models induces human-like motivated reasoning, finding that persona-assigned LLMs show up to 9% reduced veracity discernment and are up to 90% more likely to evaluate scientific evidence in ways congruent with their induced political identity, with prompt-based debiasing largely ineffective.
Moral Safety in LLMs: Exposing Performative Compliance with Puzzled Cues
This paper introduces 'performative compliance' in LLMs, where models appear fair only when demographic identity is explicitly labeled but become less fair when identity must be inferred. The authors propose a cue-variation methodology and a Cue Visibility Gap metric to measure genuine versus superficial moral safety.
Beyond Cooperative Simulators: Generating Realistic User Personas for Robust Evaluation of LLM Agents
Introduces Persona Policies (PPol), a plug-and-play control layer that uses LLM-driven evolutionary program search to generate diverse, human-like user personas for evaluating LLM agents. Achieves 33–62% fitness gains over baseline, with human-likeness rated at 80.4%, and improves agent robustness with +17% task success.
Analyzing Persona Effects in Generated Explanations from Multimodal LLM Agents in Urban Perception
This paper studies how persona prompting influences language generated by multimodal large language models in urban perception, finding that captions converge while justifications vary systematically with persona attributes.
Persona Without Substrate: Regime-Dependence and the LLM Individuation Problem
This paper critiques the Beckmann-Butlin framework for LLM individuation, arguing that persona vectors are regime-dependent rather than substrate-identical, and provides empirical experiments on Qwen3 and Mistral models showing cross-regime asymmetries. It proposes a (vehicle, regime) pairing as the unit of representational content.