Building a multi-character AI group chat is easy until the characters start sounding like clones of each other. The team behind the app Xinyu discovered that while one-on-one chats suffer from memory loss, group chats suffer from structural echo. After a few dozen turns, distinct personas would paraphrase each other, turning lively dialogue into what the developers described as a room full of nodding heads. The fix wasnβt a smarter prompt, but a dumb, external filter.
The Jaccard Threshold
The solution, which the team calls an echo sentinel, bypasses the modelβs tendency to drift toward recent phrasing. Before a line is posted, the system strips whitespace and punctuation, splits the text into character bigrams, and calculates the Jaccard similarity against the last three turns in the room. If the score hits 0.42 or higher, the line is flagged as a hard echo. This specific threshold was derived from their own transcripts, where genuine paraphrases scored around 0.67 and unrelated topic overlaps scored 0.17.
Silence Is Cheaper Than Repetition
When a line fails the check, the system doesnβt edit it; it throws it away and requests one retry with a system prompt nudge to take a different angle. If the second attempt also fails the 0.42 threshold, the character simply does not speak that round. The developers argue that silence is the cheaper failure mode: a dropped turn is invisible to the user, whereas a visible repeat teaches the user that nobody in the room is actually listening. This logic applies to pets as well, which get a separate dedupe pass for sound effects to prevent them from becoming annoying loops.
Soft Checks for Topic Loops
Beyond exact phrasing, the sentinel also monitors for topic circling. A softer check uses character trigrams to see if a speaker is looping on the same subject across their last four turns. If detected, the system issues a single retry to move the conversation forward but accepts the result regardless of the outcome. This prevents the chat from feeling policed while still breaking repetitive patterns. The entire system costs almost nothing computationally, relying on simple string operations and occasional extra model calls.
Key Takeaways
- Prompt instructions alone fail to prevent paraphrasing in long-context group chats because recent context dominates generation.
- A Jaccard similarity threshold of 0.42 on character bigrams effectively distinguishes between echoes and distinct thoughts.
- Dropping a turn entirely is preferred over posting a repetitive line, as silence preserves the illusion of independent agents.
- Separate logic is required for non-sentient characters like pets, where exact sound duplicates are the primary issue.
The Bottom Line
Persona prompts define who a character is, but they cannot stop four characters from becoming each other. You need an external, numerical check and the willingness to let a character stay silent to maintain the illusion of independent agency.