Files
avc-phone-ai/practice.py
tocmo0nlord 1aff7ea2fc Add deterministic geography: precomputed nearest-office distances injected per turn
The 2026-07-05 Weston call (CA3e88ce) showed the model guessing geography: it
recommended Boca Raton for a Weston caller (real answer: Pembroke Pines, ~9 mi),
invented distances ('Weston to Hialeah is twenty miles'), and confirmed a
nonexistent Miami Lakes office when the caller insisted.

- practice.py: office lat/lon + ~70-place South Florida gazetteer + haversine;
  geography_block() renders a full distance table (closest first) from the
  caller's area to every office. 'Westin' aliased to Weston (STT spelling).
- callstate.py: extractor gains caller_area; CallStateGroomer appends the
  GEOGRAPHY block to the system message — zero-lag via a synchronous gazetteer
  scan of user turns until the extractor catches up.
- bot.py: DISTANCES prompt rule (answer only from GEOGRAPHY, never estimate),
  only-these-8-offices guard, caller-area cities added to Whisper hotwords
  ('Weston' was heard as 'Western Florida').

Verified: staged replay of the failed exchanges on activeblue-avc:latest —
correct office, correct distances, Miami Lakes denied (5/5 + 3/3 runs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 19:15:21 +00:00

15 KiB