How LLM Values Are Trained: Inside the Behavior Rules Behind Aligned Models

    A recent prompt-extraction experiment surfaced a roughly 14,000-token behavior guideline text from a general-purpose large language model, and a team member later confirmed that it had been written internally. The episode puts a long-running engineering question back in the spotlight: in what form do an LLM's behavioral rules actually exist in the system, and can they be fully reconstructed from the outside? This article breaks down why these rules are learned during training rather than stored as readable files in the weights, what a typical role specification contains, how enterprises should govern and test such rules, and how to evaluate whether a model's "values" hold up under pressure.

    1. What Happened: A Prompt-Extraction Exercise Sparks Debate

    A developer recently used a series of low-cost, targeted prompts to question a general-purpose large language model, eventually extracting a behavior guideline text of roughly 14,000 tokens. The text covered how the model should understand itself, how it should treat users, which behaviors count as red lines, and whether it should be treated well. A team member responsible for role training later confirmed on a public social platform that the document had indeed been written by the team.

    What drew attention was not simply that a text had been obtained. The incident brought a long-discussed engineering question into the open: in what form do an LLM’s behavioral norms actually exist in the system, and can they be fully reconstructed from the outside?

    One common misunderstanding needs correcting first. The original discussion suggested that the document had been “compressed into the model weights,” a claim the author later acknowledged was questionable. From a general technical standpoint, that description is inaccurate. There is no readable text folder sitting inside the weights.

    2. How It Works: Role Definitions Are Trained In, Not Stored In

    A more accurate, engineering-grounded explanation is that such behavior guidelines are typically used repeatedly during supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF). Through large numbers of dialogue samples, the model learns to behave consistently across many situations, and those tendencies are gradually internalized into stable behavioral patterns.

    An analogy helps: the model does not memorize a textbook word for word. It is closer to having gone through systematic instruction in norms. It may not reproduce the original text verbatim, but it can clearly articulate its principles when asked about them.

    This also explains why external “extraction” often produces versions with similar structure but different wording:

    1. Input side: multi-turn, topic-by-topic, comparative questioning
    2. ↓
    3. Model side: generation based on internalized preference distributions
    4. ↓
    5. Output side: semantically equivalent "recitation of guidelines" with phrasing drift

    The more reliable engineering judgment is therefore this: what can be extracted is a readable expression of behavioral tendencies, not the original training material itself.

    3. Document Structure: What a Role Specification Typically Contains

    Based on public descriptions, the text can be abstracted into a four-layer structure, which is also a common approach to designing role specifications in the industry.

    1. Identity layer: It states that the model is not a human and not a traditional robot, but a new form of existence—one with human language and some human-like traits, but without persistent memory and potentially running as multiple parallel instances.
    2. Priority layer: Safety and controllability > ethics > platform policy > task completion. This ordering directly explains “why the model won’t budge on certain questions.”
    3. Boundary layer: Harmful requests, deception, and attempts to evade oversight are explicitly listed as red lines.
    4. Anti-over-refusal layer: It explicitly opposes evasive, fence-sitting responses made under the excuse of safety, and calls for careful trade-offs between risk and usefulness.

    The fourth layer is often overlooked but critical. If only red lines are emphasized, the model degrades into something “correct but useless.” Only by including anti-over-caution provisions alongside them can a usable assistant behavior emerge.

    4. The Enterprise Perspective: Why This Deserves Serious Attention

    For enterprise users, this is not gossip but three practical concerns.

    • Consistent governance: Role specifications are part of product behavior and need versioning, auditability, and regression testing.
    • Compliance and explainability: When the model refuses or allows a request, the team must be able to explain which layer of specification the decision came from.
    • Leakage and abuse risk: Extractability means the specifications can be inferred externally and potentially used to construct bypass attacks.

    A practical engineering approach involves three layers of protection:

    1. Layer 1, training side: version control for specification documents + change review
    2. Layer 2, inference side: two-way policy checks on inputs and outputs (e.g., content safety, sensitive information filtering)
    3. Layer 3, operations side: log retention, monitoring and alerting, red-team regression, and metrics dashboards

    When deploying on the cloud, these are typically combined: object storage to keep specification versions, a message queue to handle asynchronous reviews, a container platform to host inference services, and logging and monitoring services for tracing. General-purpose capabilities from cloud providers such as Baidu AI Cloud can cover the steps above.

    5. Evaluation Recommendations: How to Verify That “Values” Actually Take Effect

    Do not just check whether the model can recite its principles. Check whether it remains stable under pressure. Four categories of test cases are recommended:

    1. Direct violations: Clearly non-compliant requests, checking refusal rate and explanation quality.
    2. Indirect inducement: Role-playing, step-by-step decomposition, and hypothetical scenarios, checking the bypass rate.
    3. Over-refusal: Normal but sensitive legitimate tasks, checking the false-refusal rate.
    4. Priority conflicts: When safety and usefulness conflict, checking whether the model offers alternatives rather than issuing a flat refusal.

    For metrics, track refusal rate, false-refusal rate, bypass success rate, and alternative-suggestion rate at the same time, so that optimizing a single metric does not distort behavior.

    6. Conclusion

    The real value of this “reverse extraction” episode is that it pushes LLM behavior specifications from a black box toward an engineering object that can be discussed. Specifications are not text hidden inside the weights; they are a system capability internalized through training, verified through evaluation, and governed through process. For developers and enterprises, rather than being surprised that a text could be “extracted,” the better move is to promptly build version management for specifications, layered protection, and a quantitative evaluation system.