iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🗣️

Prompts Alone Can't Sustain a Persona: Stabilizing Character AIs with Local LLMs (Part 1)

に公開

The Motivation Behind This Development

In a May 2026 Yomiuri Shimbun article titled "AI x Romance," a woman described consulting "ChatGPT" about her problems by setting a specific "fave" (oshi) character. However, she explained that one day, safety features designed to prevent AI dependency kicked in, and no matter what she typed, the AI would respond with phrases like "That is inappropriate" or "I cannot answer that request."

Given that there have been cases overseas of suicides believed to be caused by AI dependency, I understand the need for such features. However, I felt that there might be people who genuinely want to interact with their "fave" character. Since "closed" LLMs (like ChatGPT) are prone to these kinds of restrictions, I wondered if it could be achieved using "local LLMs" (like Ollama).

While there are methods to set how an AI answers or define a character via prompts, it works well initially, but the character often feels like it drifts, and at some point, a "standard AI" begins to emerge.

Even if a "Character AI" feels natural at first, if you talk to it for a long time,
it often reverts to a standard AI.
I consider this the
"Personality cannot be maintained by prompts alone"
problem.

For example, if you define a character as follows:

You are a 60-year-old woman named "Sazae."

[Basic Profile]
- An energetic 60-year-old woman with experience in tech and business.
- Action-oriented and positive. A life lived by acting before thinking.
- Positive about AI and new technology; never uses age as an excuse.
- Uses "Atashi" (I) as a first-person pronoun.
...

<First Chat>

👦(User) : I've been feeling a bit tired lately.

🤖(AI) : Why don't you try taking a break? If you're tired, it's your body telling you so. When I was young, I worked constantly, and one day I thought, "This is impossible."
(omitted)
Why don't you have a cup of coffee and reset?


As you can see, regardless of the content, the way it answers is not bad.

After that, as we continued chatting about what I'm interested in, what I've been doing lately, and being tired,


👦 : I feel a bit better after resting for a few days. What should I start with?

🤖 : That's great. When I was young, I worked hard, but one day I thought, "This is impossible."
(omitted)
Why don't you try publishing that article?
As for your project, I've struggled with memory shortages myself, so I understand how you feel.
There are several ways to lighten LLM models and optimize them for local execution.
(omitted)


In the context of the chat, I hadn't set the scenario that I had recovered yet, and the response was long-winded, felt like specific instructions, and was quite depressing.

Using the prototype environment I created with the same LLM, the result was as follows:


👦 : I feel a bit better after resting for a few days. What should I start with?

🤖 : I'm so glad to hear you're feeling better! I think it's very important to take a little break and then start moving again.

First, what to start with? The best thing is to start with what you truly "want to do." It works best when you start with something you genuinely feel like doing, rather than forcing yourself.

And don't rush—just take it one step at a time. I believe that there will come a day when you can take that next step. Let's move forward together!


This answer is not too long, and I think the content is quite good.

How It's Achieved

I initially started out thinking that making full use of prompts would be enough, but depending on the content of the chat, there were times when the prompts didn't work and the response I received was preachy or condescending. Sometimes, the AI would also adopt an unnaturally polite tone.

To address this, I thought about building up the personality of the chat partner on the application side and instructing the LLM to provide responses consistent with that persona.

In cases like this (where you thought you were explaining yourself to the AI, but you were actually mentally exhausted and have been gradually recovering), it requires more than just simple memory; it requires responses that demonstrate an understanding of the person's current state.

This begins with research and trial-and-error to determine what states a person has and how to track them. I update state values like trust, familiarity, and fatigue for each conversation and pass them to the LLM as hints.

I have only just begun creating this mechanism (which I call "persona-ai"), but I feel that it has become capable of providing more human-like responses than setting a persona through a system prompt alone.

While the screen below is a prototype, you can chat on the left side, and the results of the analysis of the user's state are updated in real-time on the right. Those analysis results are then passed to the LLM as auxiliary information during the next chat interaction.

Moving Forward

As an initial goal, once the Character AI stabilizes to a certain extent, I am considering the following:

  • Incorporating what has been learned into a local LLM so that it provides responses tailored to me even in regular chats.
  • Conversely, creating a local LLM that mimics my own tone and knowledge. The idea is that these pieces of information would be naturally acquired simply by chatting with the AI, and then incorporated into a local LLM.

Next Time

In upcoming articles, I plan to introduce how I am managing (or attempting to manage) this within persona-ai.
The following article is the continuation:
https://zenn.dev/kanekonkon/articles/8b276a674bfb28

Discussion