Improve extraction accuracy with speaker role inference

Add a SPEAKER ROLES section to the GPT-4o-mini prompt teaching it to
distinguish dispatch voice (names a unit then gives assignment + address)
from unit voice (opens with own callsign + brief status). Applied to
location attribution (dispatch-provided address beats unit position report)
and unit extraction (dispatched units vs. acknowledging units). No extra
API calls — purely prompt-level reasoning on the existing transcript.
This commit is contained in:
Logan
2026-06-01 01:17:49 -04:00
parent 683b05beb1
commit 3d51db80d0
2 changed files with 20 additions and 5 deletions
+7 -3
View File
@@ -245,9 +245,13 @@ Edge node ──► audio upload ──► GCS storage
[2] INTELLIGENCE EXTRACTION (GPT-4o-mini)
Scene detection, entity extraction:
tags, incident_type, location, units,
vehicles, severity, resolved flag
Scene detection — splits multi-incident recordings
Speaker role inference — dispatch vs. unit patterns
used to correctly attribute locations (dispatch-
provided address vs. unit position report) and
units (being dispatched vs. acknowledging)
Entity extraction: tags, incident_type, location,
units, vehicles, severity, resolved flag
+ geocoding (Google Maps)
+ embedding (text-embedding-3-small)
→ CallRecord.tags, .location, .units, etc.