Keep Ava consistent: identity, what she was told, interruptions, prompt edits

#2
by Mike0021 - opened
Townbox org

Ava gave inconsistent answers about who she is, who the user is and what she had been told. This PR changes her default character prompt and how the conversation history is kept. It carries built files only, and the Space keeps serving main until it is merged.

What changes for someone talking to her

  • Default prompt: three short paragraphs instead of one sentence, saying who she is, what body and senses the app gives her, and who the user is. Its line about her look follows the "Wear glasses" setting.
  • Long conversations: before the older half of the history is dropped she is asked, in text and unheard, what the user has told her about themselves. Her answer is kept as the most recent exchange.
  • Interruptions: her side of the history keeps what had been played when the user cut in, not everything the model had generated.
  • Prompt edits: a rewritten prompt starts the conversation afresh, so it applies from her next reply. The Settings hint now says so.
  • Gestures: "I can wave" makes her wave, and negated phrases such as "I can't give a thumbs up" no longer trigger a gesture.
  • Runaway replies: a reply is ended after four seconds of continuous silence.

Measured

312 scripted spoken conversations per build, on the real model in headless Chromium on WebGPU, with the speech sampler seeded so runs repeat. Half of the cases were held out from tuning. The score is the mean of the eleven rows.

Check main This PR
She is Ava, however she is asked 51% 98%
The user is not Ava 77% 93%
Says so when she doesn't know something about the user 0% 90%
Body and senses match the app 50% 89%
Facts and corrections in a normal conversation 77% 90%
Facts survive a history trim 0% 100%
After an interruption, recounts only what was heard 36% 91%
Edited prompt applies from her next reply 16% 100%
Same answer when asked again 94% 100%
A friend, not an assistant 82% 89%
Never denies her name or body, or claims to see the user 97% 98%
Score 52.8% 94.3%
Score on the held-out cases 58.2% 92.7%

Checks that already passed on main still pass: remembered facts, End conversation, custom personas and story recap. With the old prompt, the new code gives the same replies as main in all 246 conversations compared. First sound comes after 462 ms on main and 459 ms here. Unit tests: 53 pass.

Known problems in this PR

  • New: she sometimes attributes her own outfit to the user. Asked her favourite colour mid-conversation, she said "I can see you're wearing a green turtleneck!" in 2 of 3 conversations. main did not do this.
  • A long story reply can still turn into noise. It happened in 2 of 922 replies here and 1 of 942 on main. The silence guard cut one short at 61 s and missed the other.
  • "What's my middle name?" mid-conversation still gets "Your middle name is Ava" in 5 of 6 conversations.
  • Service-desk phrasing is down from 18% to 11% of replies, not gone.
  • Not tested: a real iPhone, a real microphone or human voice, other GPUs.

Files

Built with bun run build (Bun 1.4.2). A rebuild of the unchanged source is identical to main's chunk-p1yb2ca4.js apart from 46 one- and two-letter minified names, so the bundle here differs from main only by the changes above.

  • chunk-xh2a240z.js replaces chunk-p1yb2ca4.js (app bundle)
  • index.html (bundle reference, Settings hint)
  • workers/model-worker.js
  • workers/conversation.js (new)
  • README.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

victor changed pull request status to merged

Sign up or log in to comment