liveBook · Manning

Confidence

As explained in Natural Language Processing in Action, Second Edition

Label confidence is a classifier's estimated probability that an input belongs to a particular label.

Confidence is a classifier’s estimated probability that an input belongs to a particular label. In intent recognition, the chatbot compares confidence scores across predefined intents and usually selects the highest-scoring one. section 12.6 section 12.2.1

Use confidence to make chatbot behavior safer and conversation design more data-driven:

  • Set a confidence threshold; treat every intent below it as unrecognized and trigger a fallback response. section 12.2.1
  • Sort utterances by their maximum predicted confidence and inspect low-confidence cases for existing intents that need more labels. section 12.6
  • Search for false positives separately, because a confidently incorrect intent can produce a more damaging response than an explicit fallback. section 12.6
  • Use recognized answers and grading errors to add alternative utterances to the appropriate intent. section 12.6

Choosing an intent

Train a chatbot with Hi, Hello, Hey, and Howdy as examples of Greeting. A new utterance such as Heya may receive the highest confidence for Greeting. If all intent scores remain below the threshold, return the fallback instead of pretending to understand. section 12.2.1

Confidence also supports evidence management beyond chatbots: knowledge graphs can attach probability values to facts, helping systems reason about conflicting information. section 11.8.1

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Explains score comparison, thresholding, low-confidence review, and false positives, but does not derive classifier probabilities internally.
Examples
Uses Greeting utterance variants, low-confidence chatbot messages, grading errors, and probability values attached to knowledge-graph facts.
What it assumes
Assumes predefined intents and a machine-learning classifier that assigns scores to possible labels.
What you can do after
Diagnose chatbot predictions, configure fallback thresholds, prioritize labeling, and identify false-positive responses.
How it connects
Connects classifier, intent recognition, fallback response, confidence threshold, false positives, and knowledge graph.

Also explained in

Compare how 13 books explain confidence →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.