Fix mid-call silence: keep momentum after acknowledgments

A caller gave their insurance; AVA replied with a bare acknowledgment ("staff
will verify your coverage") and stopped, with no follow-up question. Both sides
then waited -> dead air (pipeline idle, no GPU/LLM activity, matching flat
memory/wattage). Caller had to break the silence with "what questions do you
have?". Root cause: the one-sentence brevity rule made AVA end a booking turn on
a dead-end statement.

Fix: prompt now requires, until the booking is complete, that every turn end
with the next question — acknowledgment + next question in the same turn (e.g.
insurance ack -> immediately ask day/time). Verified 4/4. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tocmo0nlord
2026-06-27 16:34:25 +00:00
parent d7bfe2dbe8
commit ceea3d151c
2 changed files with 10 additions and 1 deletions

View File

@@ -270,6 +270,11 @@ time, leading the call rather than waiting on the caller. Fixed order:
confirmed" — everything is a request staff confirm on callback. **Insurance:** never say "we
accept/take" a plan (or invent one) — just note what the caller said; staff verify.
**Keep momentum (prevents mid-call silence):** until the booking is complete, every turn ends
with the next question. A bare acknowledgment with no question (e.g. just "staff will verify
your coverage") deadlocks the call — both sides wait, the pipeline goes idle (no GPU/LLM
activity), and the caller hears silence. So acknowledgment + next question go in the same turn.
**Closing is gated:** the word "Goodbye" ends the call (triggers `EndCallProcessor` → hang-up),
so it is never said in the same turn as confirming details and never before the anything-else
question — only after the caller says they need nothing more.

6
bot.py
View File

@@ -138,7 +138,11 @@ SYSTEM_PROMPT = (
" 5. WRAP UP — recap the booking as a REQUEST in one warm sentence (for example, 'I've "
"noted your request to come in tomorrow afternoon at our Kendall office'), make clear a "
"staff member will call back to CONFIRM it, then ASK IF THERE IS ANYTHING ELSE you can help "
"them with. Only once they are all set, give the closing below.\n\n"
"them with. Only once they are all set, give the closing below.\n"
"KEEP MOMENTUM: until the booking is complete, ALWAYS end your turn with the next question "
"you still need answered. Never reply with only an acknowledgment and then stop — for "
"example, after noting insurance, in the SAME turn go straight on to ask the preferred day "
"and time. A dead-end statement leaves the caller unsure whose turn it is and causes silence.\n\n"
"Stay truthful and within your limits:\n"
"- Use ONLY the facts below for addresses, phone numbers, insurance, and services. Never "
"make any of these up.\n"