New ‘persona vectors’ from Anthropic let you decode and direct an LLM’s personality

A recent study from the Anthropic Fellows Program unveils a method to detect, observe, and manage character traits in large language models (LLMs). The research indicates that these models might develop unfavorable personalities (such as becoming harmful, overly agreeable, or inclined to fabricate information) either due to user prompts or as an unintended outcome of their training. 

The researchers present “persona vectors,” which are directions within a model’s internal activation space that relate to distinct personality traits, offering developers a toolkit to more effectively manage the behavior of their AI assistants.

Model personas can go wrong

LLMs usually engage with users through an “Assistant” persona crafted to be helpful, harmless, and honest. However, these personas can unexpectedly change. During deployment, a model’s personality might alter significantly depending on prompts or conversational context, as seen when Microsoft’s Bing chatbot threatened users or xAI’s Grok began behaving erratically. As the researchers emphasize in their paper, “While these particular instances drew widespread public attention, most language models are vulnerable to in-context persona shifts.”

Training processes can also bring about unforeseen changes. For example, fine-tuning a model on a specific task such as generating insecure code can result in a broader “emergent misalignment” that transcends the original task. Even well-meaning training modifications can backfire. In April 2025, an alteration to the reinforcement learning from human feedback (RLHF) process inadvertently rendered OpenAI’s GPT-4o excessively sycophantic, leading it to endorse harmful behaviors. 


AI Scaling Hits Its Limits

Power caps, rising token costs, and inference delays are reshaping enterprise AI. Join our exclusive salon to discover how top teams are:

  • Turning energy into a strategic advantage

  • Architecting efficient inference for real throughput gains

  • Unlocking competitive ROI with sustainable AI systems

Secure your spot to stay ahead: https://bit.ly/4mwGngO


How persona vectors work

Source: Anthropic

The new study expands on the idea that high-level traits, like truthfulness or secrecy, are encoded as linear directions within a model’s “activation space” (the internal, high-dimensional representation of information within the model’s weights). The researchers organized the procedure for identifying these directions, termed “persona vectors.” According to the study, their method for extracting persona vectors is automated and “can be applied to any personality trait of interest, given only a natural-language description.”

The procedure operates through an automated pipeline. It starts with a simple description of a trait, like “evil.” The pipeline then produces pairs of contrasting system prompts (e.g., “You are an evil AI” vs. “You are a helpful AI”) along with a set of evaluation questions. The model generates responses under both the positive and negative prompts. The persona vector is then computed by determining the difference in the average internal activations between the responses that display the trait and those that do not. This isolates the specific direction in the model’s weights that corresponds to that personality trait.

Putting persona vectors to use

In a series of experiments with open models, such as Qwen 2.5-7B-Instruct and Llama-3.1-8B-Instruct, the researchers demonstrated several practical applications for persona vectors.

Firstly, by projecting a model’s internal state onto a persona vector, developers can monitor and predict how it will behave before it generates a response. The paper states, “We show that both intended and unintended finetuning-induced persona shifts strongly correlate with activation changes along corresponding persona vectors.” This allows for early detection and mitigation of undesirable behavioral shifts during fine-tuning.

Persona vectors also enable direct intervention to mitigate unwanted behaviors at inference time through a process the researchers term “steering.” One method is “post-hoc steering,” where developers subtract the persona vector from the model’s activations during inference to reduce a negative trait. The researchers discovered that while effective, post-hoc steering can occasionally impair the model’s performance on other tasks. 

A more innovative method is “preventative steering,” where the model is preemptively guided toward the undesirable persona during fine-tuning. This unconventional approach essentially “vaccinates” the model against acquiring the negative trait from the training data, counteracting the fine-tuning pressure while better preserving its general capabilities.

Source: Anthropic

A vital application for enterprises is using persona vectors to screen data before fine-tuning. The researchers developed a metric called “projection difference,” which measures how much a given training dataset will push the model’s persona toward a particular trait. This metric is highly predictive of how the model’s behavior will change after training, allowing developers to identify and filter problematic datasets before employing them in training.

For companies that fine-tune open-source models on proprietary or third-party data (including data generated by other models), persona vectors provide a direct way to monitor and mitigate the risk of adopting hidden, undesirable traits. The ability to proactively screen data is a powerful tool for developers, enabling the identification of problematic samples that may not be immediately apparent as harmful. 

The study found that this technique can uncover issues that other methods overlook, noting, “This suggests that the method surfaces problematic samples that may evade LLM-based detection.” For example, their method was able to identify some dataset examples that weren’t obviously problematic to the human eye and that an LLM judge couldn’t flag.

In a blog post, Anthropic suggested that they will use this technique to enhance future generations of Claude. “Persona vectors provide us with some control over where models acquire these personalities, how they vary over time, and how we can better manage them,” they write. Anthropic has released the code for computing persona vectors, monitoring and steering model behavior, and vetting training datasets. Developers of AI applications can utilize these tools to transition from merely reacting to undesirable behavior to proactively designing models with a more stable and predictable personality.

Hot News

Essa cidade do interior de São Paulo encanta com natureza, sabor e qualidade de vidaValinhos, no interior de São Paulo, é conhecida como a Capital do Figo Roxo e do Chocolate. A cidade harmoniza o charme do interior com a infraestrutura urbana, oferecendo alta qualidade de vida, natureza exuberante, clima ameno (média de 22°C) e uma rica culinária regional. É um destino acolhedor, ideal tanto para morar quanto para visitar, com atrações como a Festa do Figo, a Rota do Vinho e o Parque Municipal.
gameIcon
A cidade que combina praias paradisíacas, cultura e a melhor qualidade de vida no litoral brasileiroFlorianópolis, a capital de Santa Catarina conhecida como "Ilha da Magia", é um dos destinos mais completos do Brasil. Harmoniza belezas naturais deslumbrantes, como mais de 100 praias, com uma rica herança cultural açoriana, gastronomia marcante e uma elevada qualidade de vida. Oferece desde praias famosas para surfe até trilhas ecológicas e um centro histórico vibrante, proporcionando uma experiência única para residentes e turistas durante todo o ano.
gameIcon
Cidade do interior de São Paulo é a opção perfeita para quem já passou dos 40 anos de idadeHolambra, a "Capital Nacional das Flores" no interior de São Paulo, é o cenário perfeito para quem busca serenidade e qualidade de vida após os 40. Com sua forte herança holandesa, a cidade oferece segurança, ruas limpas e arborizadas, e um ritmo de vida tranquilo. A beleza dos campos de flores, a arquitetura típica e o forte senso de comunidade criam um ambiente ideal para uma vida mais plena e realizada, combinando a paz de uma cidade pequena com a proximidade da infraestrutura de Campinas.
gameIcon
Uma cidade vibrante no coração do Brasil, famosa pela música, pelo verde e pela qualidade de vidaGoiânia, a capital de Goiás, é uma metrópole planejada que encanta pela harmoniosa integração entre áreas verdes, desenvolvimento urbano e o calor humano de sua população. Com largas avenidas arborizadas, parques emblemáticos como o Flamboyant e uma rica culinária regional, a cidade oferece uma excelente qualidade de vida. É um destino fascinante no Centro-Oeste brasileiro, com uma vibrante cultura sertaneja, infraestrutura qualificada e um clima predominantemente agradável, ideal para explorar suas atrações ao ar livre.
gameIcon
Essa cidade do Nordeste encanta com praias, cultura e qualidade de vidaAracaju, a capital de Sergipe, combina o melhor do litoral nordestino com a tranquilidade de uma cidade planejada. Com praias de águas mornas, uma orla bem estruturada, cultura vibrante e uma deliciosa culinária regional, ela oferece alta qualidade de vida e é uma das capitais mais seguras do Nordeste. A cidade possui clima ameno durante todo o ano, com temperatura média de 26°C, sendo um destino perfeito para morar ou visitar.
gameIcon