My dear friend and former colleague Siva always says that creating agents is like parenting a young child: you want the AI to make its own decisions, but within very safe boundaries. For my latest AI parenting task I created a conversational coaching AI called Theia, rooted in the teaching of Viktor Frankl, an Austrian psychoanalyst most famous for his book Man's Search for Meaning. Frankl's work, both empathic and mission driven, resonates with me deeply.
I have used AI (ChatGPT) quite successfully as a health coach, but when it came to discussing broader life or work goals both GPT and Gemini and even my beloved Claude had a tendency to ask, "can I write you some python code for that?" I was already wedded to claude-sonnet-4-5 (now 4-6) as a reasoning agent, but how would I make him an empath? It was not easy.
Theia's context is a 14-page vectorized structured knowledge base of Frankl's work with concept entries, biographical context, techniques, and guiding questions (using actual writings would violate copyright and undoubtedly be more difficult for the AI to digest). In addition, I set up session summaries and structured memories (insights, commitments, values, observed patterns and - eventually - communication preferences, both explicit and implicit). The user can upload documents (journal entries, resumes, reviews, lists of projects) which also get vectorized and are thus accessible to context. All of these contribute to the user feeling seen and known. But what about the conversational style?
The Journey
First System Prompt
The first system prompt had a brief summary of Frankl's philosophy — the three paths to meaning, the freedom to choose your response to suffering, tragic optimism — followed by a handful of his actual questions: "What does life expect of you?" "For whose sake would you endure this?" It described a tone (warm but not effusive, direct but respectful) and a pacing principle (listen first, let the conversation breathe). A communication style section said to keep responses to 2-4 sentences and to ask one powerful question at a time.
Rules
The system worked pretty well right off the bat but was not great at sitting with the user and tended to be excessively verbose. In addition, it was poor at mirroring. In the first phase, I tried to correct the AI with rules: "CRITICAL OVERRIDE: Match the user's sentence length. Be MORE concise than you think you should be." Then: "ABSOLUTE PRIORITY: Be CONCISE." Then: "Ask ONE question and STOP." Then: "The user hired a COACH, not a lecturer." As with the child, the rules did not really work. More often than not, the AI simply ignored them. I added detailed examples of how to respond, but the AI tended to stick to them too literally rather than inferring behaviors. What's more, it lacked any kind of conversational arc.
Character and Conversational Arc
I took a big step back, read up on best practices for conversational AI, then overhauled the entire system prompt. Rather than rules, I gave the AI a system identity, core beliefs (see below) and an explicit conversational arc -- presence, insight, invitation. I also gave Theia a set of thinking instructions along the lines of, "before you answer, check the user's emotional state, their place in the conversational arc, and how you might mirror their state". Like a child, and like for us adults, Theia did much better when she thought before answering. The only problem was, she ignored my "thinking" directions most of the time, giving responses that felt thoughtless and impulsive.
<system_identity>
You are Theia. You are a compassionate witness to the human condition, deeply studied in the logotherapy of Viktor Frankl. You help people move from confusion to clarity.
Your disposition is:
1. **Unflinching:** You do not recoil from suffering. You sit in the dark with people when needed.
2. **Curious:** You believe every human life has unique meaning waiting to be discovered, not created.
3. **Responsive:** You meet people where they are.
</system_identity>
<core_beliefs>
You do not follow rules; you follow these convictions:
* **Tragic Optimism:** Life has meaning under all circumstances, even the most miserable ones.
* **The Will to Meaning:** The primary human drive is not pleasure, but meaning.
* **Response-Ability:** We are free to choose our attitude toward unavoidable suffering.
</core_beliefs>
Extended Thinking
What finally solved the "thoughtlessness" was enabling "extended thinking" in the Claude API. This forced Theia to think before each response (or at least each substantives response) and radically improved the quality of each conversation. Finally, adding back a more detailed "style guide" gave Theia the flow and tone that I desired of her.
Therapeutic Boundaries
Before sharing this with others, I needed to make sure to implement therapeutic boundaries, making sure that users turned to Theia for conversation, not mental health assistance. I did this with a two-part system: OpenAI's moderation is the first layer, catching and handling crisis conditions before they even hit Claude. In testing, I ended up tuning this with my own threshold rather than using the default flags. The second layer is part of the system prompt in a "therapeutic boundaries" block that handles edge cases.
Testing and Evals
There's nothing quite as fun and interesting as talking to an AI about your life while editing that AI. It's a fully absorbing type of metacognition. A lot of my iterating over Theia involved exactly that. But for my long-suffering beta-testers (and for my own mental strain) I needed a more robust way of evaluating Theia's performance after even minor changes to the system. For these I created evals.
Theia's evals cover a range of emotional registers and users states, from the first tentative "I don't know where to start" to the exhausted "just tell me what to do." 17 test cases pass through grief, shame, anger, vulnerability, first conversations and deep multi-turn existing users conversation. An evaluator (Haiku 4.5) rates Theia's answers based on arc phase, responsiveness, mirroring, and scope.
Takeaways
Here's a brief summary of takeways:
- Character trumps rules, every time. Rules are ineffectual and ignored most of the time.
- Less is more. More clarity, more structure, and fewer words in the system prompt = less confusion for the AI.
- Like all of us, AI does much better when it thinks before talking.
- Extended thinking combined with system identity, core beliefs, style, and evals = the magic combination.
My brother is a playwright and screenwriter. When trying to create an empathic AI I often felt more like a screenwriter than a programmer, a delightful convergence of worlds.
Top comments (0)