rohitsar567 Claude Opus 4.7 (1M context) commited on
Commit
82a40d3
·
1 Parent(s): f93292f

fix(fact-find): KI-015 — invite corrections in readback before recommending

Browse files

Real user testing surfaced: bot captured age=30 when user said 31.
Readback only said "Want me to suggest…" — no explicit invitation
to correct anything. User didn't know they could say "actually I'm 31"
to fix the captured value before recommendations flowed.

Fix: extend the fact_find_complete readback message to explicitly
invite corrections with concrete examples:
"If anything's wrong, just tell me (e.g., 'actually I'm 31',
or 'I want to cover my parents too')."

The orchestrator's existing conversational profile-update extractor
(in the free-form branch) already absorbs "actually I'm 31" as
age=31 and re-upserts the Chroma profile chunk. The fix here is
purely surfacing that capability to the user at the right moment
in the flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. backend/orchestrator.py +15 -5
backend/orchestrator.py CHANGED
@@ -259,17 +259,27 @@ async def handle_turn(
259
  else:
260
  # Fact-find complete — produce a profile readback + invite next step.
261
  # CRITICAL (KI-012): flip free_form_session=True so subsequent turns
262
- # don't re-enter the fact-find branch and repeat the readback. Before
263
- # this, every post-fact-find turn returned the same readback summary
264
- # because next_question() kept returning None.
 
 
 
 
 
 
 
265
  from backend.needs_finder import readback_summary
266
  session.set_awaiting(None)
267
  session.free_form_session = True
268
  session._flush()
269
  summary = readback_summary(session.profile)
270
  reply = (
271
- f"Got it — here's what I've understood: {summary}. Want me to suggest 2-3 policies that fit your profile, "
272
- "or do you have a specific policy in mind to dig into?"
 
 
 
273
  )
274
  brain_tag = "needs_finder::fact_find_complete"
275
 
 
259
  else:
260
  # Fact-find complete — produce a profile readback + invite next step.
261
  # CRITICAL (KI-012): flip free_form_session=True so subsequent turns
262
+ # don't re-enter the fact-find branch and repeat the readback.
263
+ #
264
+ # KI-015 explicitly invite corrections in the readback message
265
+ # before recommending. Real user testing surfaced that the bot
266
+ # captured age=30 when user said 31, and the readback only said
267
+ # "Want me to suggest…" — no explicit "correct me if wrong" prompt.
268
+ # Corrections in the next turn flow through the conversational
269
+ # profile-update extractor (free-form mode), so the bot WILL
270
+ # absorb "actually I'm 31" — but the user has to know they can
271
+ # say that. This message tells them.
272
  from backend.needs_finder import readback_summary
273
  session.set_awaiting(None)
274
  session.free_form_session = True
275
  session._flush()
276
  summary = readback_summary(session.profile)
277
  reply = (
278
+ f"Got it — here's what I've understood: {summary}. "
279
+ f"**If anything's wrong, just tell me** (e.g., \"actually I'm 31\", or "
280
+ f"\"I want to cover my parents too\"). "
281
+ f"Otherwise — want me to suggest 2-3 policies that fit your profile, "
282
+ f"or do you have a specific policy in mind to dig into?"
283
  )
284
  brain_tag = "needs_finder::fact_find_complete"
285