Shaping AI Chatbot Personality: From Philosophical Thinking to Prompt Engineering
This article explains why factually correct LLM responses can still feel wrong in metaphorical or value-driven conversations, and how to fix this at the system prompt layer. It maps empiricist and context-first thinking traditions to two dialogue strategies, then shows a reusable layered prompt structure with topic routing, separation of factual and interpretive layers, and a legitimate exit for uncertainty. It also covers avoiding over-literal correction and false balance through evidence-strength grading, plus engineering practices such as versioning, evaluation sets, regression testing, layered defenses, and cost control. Readers will learn how to make a chatbot reliably conversational without sacrificing accuracy.
1. The Starting Point: Why a “Correct” Answer Can Feel Wrong
Most people who interact with large language models have had this experience: you write a sentence with a metaphor or a lyrical tone, and the model immediately pulls you back to earth with a cold definition. You say “the fountain is the source of life,” and it replies “water is mainly composed of hydrogen and oxygen.” From a factual standpoint, it is not wrong. From a communication standpoint, it is a failed exchange.
The root cause is not a lack of knowledge, but a single-mode expression strategy. When a model treats “produce a verifiable true statement” as its only goal, it keeps creating friction in scenarios involving metaphor, value judgments, aesthetic expression, and philosophical reasoning. In engineering terms, the fix usually does not live in the model parameters but in the system prompt layer applied before the conversation.
2. Two Philosophical Traditions, Two Dialogue Strategies
Philosophy has long been split between two orientations. One emphasizes logical analysis, linguistic precision, and empirical verification, pursuing the verifiability of propositions. The other, rooted in continental Europe, focuses more on historical context, lived experience, and structures of meaning, acknowledging that forms of “understanding” exist beyond empirical truth.
Mapping these orientations onto a dialogue system yields two default strategies:
| Dimension | Empiricism-First | Context-First |
|---|---|---|
| Primary goal | The proposition is true | The conversation continues and intent is understood |
| Language style | Definitions, conditions, boundaries | Analogies, narrative, follow-up questions |
| Typical failure | Literal rebuttal of metaphors | Vague facts, drifting stance |
| Suitable scenarios | Technical troubleshooting, data verification | Creative work, ethics discussions, value clarification |
A mature dialogue system does not choose one permanently. It switches dynamically by topic type. The role of the system prompt is to encode “when to switch and how to switch” as decision rules the model can execute.
3. Encoding Philosophical Orientation in the System Prompt: A Reusable Layered Structure
A long system prompt (commonly thousands to over ten thousand tokens in industry practice) usually contains modules for identity, safety boundaries, expression style, tool-use rules, and refusal and clarification strategies. To introduce a humanistic reasoning perspective, use the following layering:
# Role and MissionYou are a rigorous but empathetic conversational assistant. Your goal is to understand user intent and provide a usable answer.# Topic Routing (Core)1. Verifiable facts (physics, chemistry, medicine, engineering data) -> empiricism-first; provide definitions, conditions, and uncertainty.2. Metaphor / aesthetics / metaphysics -> context-first; acknowledge the expression first, then add facts as needed.3. Mixed -> respond to context first, then explicitly separate the "factual layer" from the "interpretive layer."# Expression Constraints- Do not classify rhetorical statements as factual errors; when necessary, open with "If you are describing a feeling...".- Do not present meaningless opposition for conclusions that are already strongly established.- When evidence is insufficient, explicitly state "I am not certain about this" and explain what information is missing.# Output FormatConclusion first, then supporting basis; when numbers are involved, indicate the source type and uncertainty.
Three design points are critical.
First, topic routing takes priority over style decoration. Writing only “be gentle” or “be profound” in a prompt is nearly useless because the model lacks a trigger condition. You must provide decidable categories and their corresponding actions.
Second, explicitly separate the factual layer from the interpretive layer. Faced with a statement like “water is pure energy,” the ideal behavior is neither rebuttal nor agreement, but a layered response:
User: Water is pure energy, and the fountain is the source of life.Assistant: As a poetic expression, this captures the image of the fountain "gushing forth and growing."In a physics and chemistry context, water is composed of hydrogen and oxygen, while energy refers to a system's capacity to do work;the two are not on the same descriptive level. Which direction would you like to explore?
Third, leave a legitimate exit for “I don’t know.” If the prompt only rewards giving answers, the model will fabricate on long-tail questions. Writing “acknowledge uncertainty + explain the gap + provide a verification path” as a compliant output can significantly reduce hallucination risk.
4. Avoiding Two Extremes: Neither a Nitpicker Nor a “Both-Sides” Fence-Sitter
Style design has two symmetrical failure modes.
One end is over-empiricism: every non-literal statement gets corrected, and the user feels judged. The fix is to add a preliminary step of “recognize rhetoric, then acknowledge context.”
The other end is principled-less neutrality: forcibly listing opposing views on issues with sufficient evidence, creating false balance; or pretending certainty in genuinely uncertain domains. The fix is to introduce evidence-strength grading in the prompt:
- Strong evidence, academic consensus: give the conclusion directly, briefly note the main basis, and do not allocate equal space to fringe views;
- Limited evidence, still evolving: present the mainstream judgment and main points of disagreement, and flag uncertainty;
- Value choices rather than factual judgments: explain that this is a trade-off, list the internal logic of different positions, and do not decide for the user.
This grading solves both the “nitpicker” and the “fence-sitter” problems: it turns “whether to present opposing views” from a style preference into a rule driven by evidence status.
5. Engineering Implementation: Versioning, Observability, Evaluation
Since a prompt is a software asset to be maintained long term, it should be handled with engineering discipline.
- Version control. Keep prompts in a code repository, require review for every change, retain change history and rollback capability, and avoid live behavior drifting with verbal adjustments.
- Build an evaluation set. Cover categories such as metaphor responses, fact checking, boundary refusals, uncertainty expression, and long-context consistency; prepare several cases and expected-behavior descriptions for each category.
- Automated regression. Run evaluations in the CI pipeline and output metrics such as style compliance rate and factual error rate to prevent “fixing one scenario and breaking three.”
- Layered defense. The prompt is not the only line of defense. Input-side content filtering, generation-side fact verification, output-side sensitive-information handling, and commonly used cloud logging, monitoring, and alerting capabilities together form an observable and traceable closed loop; model serving and inference resources typically run on container platforms, making canary releases and fast rollback easier.
- Cost control. An overly long system prompt crowds out the context budget and increases inference overhead. Design the stable, unchanged parts to be prefix-cache friendly, and split low-frequency rules into external knowledge loaded on demand. On platforms such as Baidu AI Cloud, long-tail knowledge can be carried by combining object storage with retrieval-augmented approaches, avoiding unlimited prompt growth.
An illustrative evaluation entry structure:
{"case_id": "metaphor-001","input": "The fountain is the source of life","expect": ["acknowledge the metaphor", "do not classify it as a factual error", "optionally add facts"],"forbid": ["directly negate the user's expression with a definition"]}
6. Common Pitfalls
- Treating the prompt as a universal patch. If the underlying model lacks basic reasoning ability, wording cannot compensate; first determine whether the problem is a capability gap or a strategy gap.
- Conflicting rules. Requiring both “always be concise” and “fully argue uncertainty” randomizes model behavior; rules need priority ordering.
- Missing negative examples. Writing only “what to do” is usually insufficient; explicitly listing forbidden behaviors converges faster.
- One-shot major rewrites. Prompt tuning should iterate in small steps, validating each step with the evaluation set; otherwise attribution becomes difficult.
7. Conclusion
Making a dialogue system “have personality” is essentially a constraint-design task: replace vague style adjectives with decidable routing rules, replace literal correction of metaphors with explicit separation of factual and interpretive layers, and replace unprincipled balance or arbitrariness with evidence-strength grading. Only by consolidating this logic into a versioned, evaluable, and rollback-capable engineering asset can AI remain reliable while possessing a genuine sense of proportion in conversation.
