I built a Candy AI clone, but the AI characters don’t maintain consistent personality — how do you fix this?

Hey everyone,
I’m working at Suffescom Solutions, and I’ve been developing a Candy AI Clone with custom AI characters and conversation flows. Overall, the project is progressing well, but I’ve hit a confusing issue.

The AI characters fail to maintain a consistent personality. After a few messages—or when the chat session reloads—the tone, behavior, and responses start drifting, even though each character has a fixed personality prompt.

Tech stack:

  • Backend: Python + FastAPI

  • AI: OpenAI API

  • Frontend: React

What I’ve tried so far:

  • Fixed system prompts per character

  • Storing personality traits in the database

  • Limiting context window size

Despite this, the personality inconsistency keeps happening.

Has anyone faced this while building a Candy AI clone or character-based chatbot?
Would really appreciate advice or best practices.