Customer support · Production
Tackling AI Hallucinations in LLM Apps: Token Log-Probabilities as LLM Confidence Signal
The problem
LLMs can produce irrelevant or hallucinated responses, making it risky to surface their outputs directly to customers in support applications without a reliability filter.
Workflow diagram · grounded in source
1
Support questions enter LLM service
trigger
“I ran a sample of 1000 support questions through our question answering LLM service, recording LLM confidence scores”
2
LLM generates answer with log-prob score
ai_action
“Seq-Logprob (i.e. "LLM confidence") — an average of log-probabilities from sequence generation”
3
Expert quality labeling
human_review
“I then asked our customer support experts to label LLM-generated outputs as "good quality" or "bad quality". This gives me a binary label that I can align with LLM confidence scores for generated outputs.”
4
Route by confidence threshold
routing
“a) Reject poor-quality responses b) Introduce expert-in-the-loop verification for low-confidence responses”
5
Filtered response surfaced to customer
output
“filter not-confident responses from ever being surfaced to customers”
Reported outcome
Using sequence log-probability as a confidence score revealed a 69% relative difference between the most and least confident LLM responses, supporting precision-recall-style filtering of poor-quality outputs before customer exposure.
Reported metrics
relative difference between most and least confident LLM responses69%
Reported stack
OpenAI API
Source
https://engineering.gusto.com/tackling-ai-hallucinations-in-llm-apps-6d46692f8cac
Read source ↗Frequently asked questions
What did this team achieve with this AI workflow?
Using sequence log-probability as a confidence score revealed a 69% relative difference between the most and least confident LLM responses, supporting precision-recall-style filtering of poor-quality outputs before cu…
What tools did this team use?
OpenAI API.
What results were reported?
relative difference between most and least confident LLM responses: 69% (source-reported, not independently verified).
How is this customer support AI workflow structured?
Support questions enter LLM service → LLM generates answer with log-prob score → Expert quality labeling → Route by confidence threshold → Filtered response surfaced to customer.