Exam Room · AI Practitioner

Pop Quiz: When a Model Says It Is Confident

· 6 min read

Exam-style

A support team runs an assistant on Amazon Bedrock that answers customer questions from the company's help articles. The prompt ends each answer with *Confidence: N%*. Anything at 95% or above goes straight to the customer; the rest goes to a human agent. Is that a sound gate, and if not, what should it read instead?

Reveal the answer

C. Not sound. The figure is generated text, not a calibrated probability, so a fluent invention scores as high as a correct answer. Threshold on the Amazon Bedrock Guardrails contextual grounding check instead, show citations, and validate the answer's shape in code

Two things are called confidence scoring. One is a real number. Amazon Comprehend returns a score for each entity or sentiment it detects, and Amazon Textract a Confidence value for every field it reads off a form, both from a classifier measured against labelled data; thresholding those is ordinary engineering. Confidence: 97% is not that: a likely continuation, not a measurement. An answer giving a returns window the articles never mention carries a figure as high as a correct one, so the gate sorts by fluency. The alternatives carry a real signal. RAG grounding supplies passages to be right about, which the retrieval-only answer overstates: a model can still summarise a passage into something it does not say. The Amazon Bedrock Guardrails contextual grounding check scores the response against the supplied source and the query, and filters anything under the grounding or relevance threshold you set, from 0 to 0.99. Citations and a code check on the answer’s shape cover the rest. Fine-tuning has no bearing on self-rating.

AI Fundamentals · part of The Exam Room

Q. The assistant ends each answer with Confidence: N%. Auto-approve at 95% and above, send the rest to an agent. Sound gate?

A. No. That figure is generated text, so it tracks fluency rather than truth. Gate on a Guardrails contextual grounding score instead, with citations and a code check on the answer.

Why? Confidence scoring means two things and only one of them is a number to act on. Amazon Comprehend and Amazon Textract return scores from a classifier measured against labelled data, and thresholding those is sound. A model’s own certainty line is a likely continuation, and an answer stating a returns window the help articles never mention carries a figure as high as a correct one. The hallucination detection methods that do give you something are Retrieval Augmented Generation [RAG] grounding so there is a source to be right about, the Amazon Bedrock Guardrails contextual grounding check scoring the response against those retrieved passages and the question asked, citations so a person can verify it, and output validation in code on the parts with a checkable shape. Retrieval narrows the failure without closing it, which is why the check sits after it.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.