Skip to content
GoodFaith
Mock mode

Judge proof

How the CALL-E integration works

Four surfaces do the real work. Each one is load-bearing for the result you see.

Price extraction and comparability normalization are heuristic and advisory. Confirm the final price with the clinic. The one guarantee we keep precisely: a price is never ranked unless it traces back to a real quoted sentence in the transcript.

1. Multi-recipient parallel calls

One CALL-E task fans out to every clinic at once via recipients[], so the whole shortlist is dialed in parallel and rolls up into a single result.

lib/calle.ts · createQuoteCall

2. Per-recipient structured extraction

GoodFaith requests structured fields (cash_price, price_basis, includes/excludes, quoted sentence). Because the current CALL-E API tier does not accept JSON result schemas (400 not supported), it does not send them; instead it derives each field deterministically from the call transcript and summary. Extraction is heuristic and advisory, so confirm the final price with the clinic, but a price is never ranked unless it traces to a real quoted sentence.

lib/schemas.ts + lib/extract.ts

3. Completion-confidence gating

CALL-E's model completion_confidence score is used as a gate, not a correctness guarantee: any call below 0.6 is held back for review and never ranked, fail-closed.

lib/normalize.ts · CONFIDENCE_THRESHOLD

4. Evidence / transcript audit trail

Every ranked price is traced back to the exact transcript turn it was said in. A price with no traceable utterance is refused, not ranked.

components/AuditTrail.tsx + lib/normalize.ts · findEvidence

Also implemented

Optional / stretch

Winner traced to the transcript

$438Lone Star Open MRI

“For a self-pay lumbar MRI without contrast our all-inclusive cash price is four hundred and thirty-eight dollars, and that includes the radiologist reading.”

at 14s in the transcript

Sample rollup (derived from the transcript)
{
  "clinics_reached": 3,
  "quotes_obtained": 2,
  "lowest_all_inclusive": 438
}