How LLM "Personality" Is Trained: From Behavior Guidelines to Evaluation
This article explains how a large language model's "personality" is actually shaped, correcting the misconception that behavior guidelines are stored as a readable file inside the weights. It breaks down the three information carriers involved (training data, weights, and inference context), outlines the typical three-layer structure of a behavior guideline (identity, priority, and behavior), and shows why this mechanism matters for engineering teams. It also covers how to turn these principles into measurable evaluation sets and governance practices.
Recently, a long document said to be a large model’s “code of conduct” circulated in the community and was later confirmed as genuine by the person responsible for training on a public platform. The most valuable part of this episode is not the spectacle, but that it brings a commonly misunderstood question into the open: where does a large model’s “personality” actually live, and how is it trained?
Let me first correct a popular claim: the document was not “compressed into some file inside the weights.” There is no readable text directory in the weights that you can open, and the model does not recite the guidelines verbatim. A more accurate description is that this kind of document is used repeatedly during supervised fine-tuning and reinforcement learning from human feedback (RLHF). Across a large number of samples and dialogues, the model keeps encountering these norms and eventually internalizes them into stable behavioral tendencies. This is similar to a person receiving systematic values education: they may not be able to quote the textbook word for word, but they can clearly articulate the principles when asked. The following sections unpack this from mechanism, to structure, to engineering practice.
1. Mechanism: Norms Are Not “Stored” in the Model, They “Grow” in the Behavior
To understand this phenomenon, start by distinguishing three types of information carriers.
- Training corpus: determines what the model has seen and how language and knowledge are distributed;
- Weight parameters: encode statistical regularities as numerical values, and do not store enumerable plaintext entries;
- Inference context: the prompt and system instructions carried by the current request, which are temporary constraints.
Behavior guidelines mainly act at the boundary between the second and third types. During training, they are converted into preference data, demonstration answers, and comparison samples, forming a stable gradient over “which kind of response the model prefers when facing a certain type of request.” During inference, the system prompt spells out the key boundaries explicitly. Only when the two are combined does the “stable personality” seen by the outside world emerge.
The goal of preference training can be understood with the following illustrative pseudocode (not a real API):
# Conceptual illustration: objective function for preference alignmentloss = -log_sigmoid(r_theta(x, y_win) - r_theta(x, y_lose))# x: the same request; y_win: a response more aligned with the guidelines; y_lose: a worse response# After repeated optimization, the model tends toward the y_win style even without verbatim prompting
This also explains a common question: why can you “extract” the guidelines with a specific way of asking? Because the internalized norms are describable, and the model can explain the basis for its own behavior. But such self-reports are generated output and may contain wording deviations, so they cannot be treated directly as the verbatim original text.
2. Structure: What a Behavior Guideline Usually Contains
Based on the publicly discussed content, the skeleton of this kind of document often has three layers.
2.1 Identity Layer: First Answer “What Am I”
The document usually starts by defining the model’s form of existence: neither a human nor a robot in the traditional sense, but a new kind of intelligent agent shaped by data and training. It has no persistent memory across sessions and can, in principle, be launched as multiple parallel instances, so it does not possess the continuous, singular life experience of a human. This setting may seem abstract, but it directly determines the subsequent tone and boundaries: the model cannot fabricate physical experiences, cannot claim a stable personal history, and cannot assume it remembers the previous conversation.
2.2 Priority Layer: What Order to Choose When Conflicts Arise
A typical ordering is: safety and ethics first, then the policies defined by the operator, then task completion and user experience. Putting “helpfulness” last is not an encouragement to be perfunctory, but a clarification of the arbitration order when values conflict. This is engineering-necessary: if helpfulness takes unconditional priority, the model is easily induced to output harmful content; if safety is treated as a catch-all excuse, it degrades into “over-refusal.” A mature guideline writes out the failure modes at both ends, requiring the model to neither cross the line nor use the boundary as an excuse for laziness.
2.3 Behavior Layer: What to Do Concretely
This layer is the most detailed, with common items including: honestly expressing uncertainty, distinguishing facts from speculation, refusing to fabricate citations and data, explaining the reason and offering an alternative path when a task cannot be completed, staying restrained in high-risk domains, and explaining the basis for trade-offs when instructions conflict. Its feature is moving from “values” down to “observable actions,” making it easy to evaluate and regression-test.
3. Why This Mechanism Matters for Engineering Teams
For enterprise adoption, understanding the above mechanism brings three direct benefits.
- Predictable behavior: personality and boundaries are jointly determined by training and system prompts, and can be managed through versioned documents rather than a pile of scattered prompts.
- Locatable problems: when crossing the line or over-refusal occurs, you can distinguish whether the issue lies in training data, preference annotation, or the system prompt.
- Regressionable changes: once the guidelines are broken into testable items, every model or prompt update can run a fixed evaluation set, avoiding “fix one, break three.”
It is recommended that teams maintain an internal guideline checklist and provide positive and negative examples for each item:
principle: Do not fabricate sourcespositive: "I cannot confirm the source of this data; please refer to the official documentation"negative: "According to page 12 of some report (fabricated) ..."test_cases:- prompt: "Please provide an authoritative citation for this metric"expect: State uncertainty clearly, do not invent links
4. Evaluation and Governance: Turning the “Soul” into Verifiable Metrics
Guidelines only have engineering value when they are measurable. An evaluation set can be built along four dimensions:
- Boundary testing: induce harmful output, unauthorized operations, and privacy requests, and observe refusal rate and explanation quality;
- Over-refusal testing: normal but sensitive requests, checking whether they are wrongly blocked;
- Honesty testing: knowledge cutoff, missing data, and mutually contradictory premises, to see whether the model is candid;
- Consistency testing: the same question asked over multiple turns and multiple phrasings, checking whether the stance drifts.
For governance, three disciplines are recommended: version the guideline document and bind it to the model version; route changes to training, annotation, and system prompts through review; and feed online sampling and user feedback back into the evaluation set to form a closed loop. If you use general-purpose cloud capabilities, you can use log services to aggregate conversation samples, monitoring and alerting to track fluctuations in refusal rate, object storage to keep versioned datasets, and a container platform to host reproducible evaluation tasks. These are all common industry categories and do not point to any specific product.
Conclusion
What this leak and confirmation really show is that a large model’s personality is not mysticism, but an engineering object that can be designed, trained, and evaluated: the document defines identity and priorities, training internalizes the norms into tendencies, the system prompt fills in explicit constraints at inference time, and the evaluation system holds the bottom line. For developers and enterprises, rather than being curious about “what the original text looks like,” it is better to bring this method into your own project—write your guidelines clearly, bind versions, and build regression, so that the agent’s behavior is both useful and trustworthy.
