LLM Classification Confidence Using Token Probability Signals

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Generative language models (LLMs) often generate incorrect classifications due to probabilistic token selection, leading to downstream issues like wasted computational resources and user interaction failures, particularly in content moderation and response generation.

Innovation Solution

Implementing a confidence value determination method based on the probability values of selected and alternative tokens to assess the reliability of LLM outputs, allowing for actions like stopping or modifying output, providing new prompts, or seeking additional information when confidence thresholds are not met.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the LLM generates output based on probabilistic token selection, then the model can produce diverse and contextually appropriate responses, but the classification accuracy deteriorates due to uncertainty in token selection

Engineering Contradiction:
Improveresponse diversityVSAvoidclassification accuracy
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system implements feedback by computing confidence values from probability distributions and using them to control subsequent actions. When confidence is low, the system requests clarification or alternative actions, creating a feedback loop that improves reliability without sacrificing the probabilistic nature of LLM generation

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes the parameter of confidence threshold to control the trade-off between adaptability and reliability. By adjusting the threshold, the system can dynamically balance between accepting probabilistic outputs and seeking more certain classifications

Inventive Principle:
Principle #35Parameter changes

2Productivity

If the LLM continues generating output after incorrect classification, then the system maintains continuous operation, but computational resources are wasted on downstream processing of incorrect results

Engineering Contradiction:
Improvecontinuous operationVSAvoidcomputational waste
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system performs preliminary action by computing confidence values before proceeding with downstream processing. This preliminary check prevents wasteful computation on incorrect classifications while maintaining continuous operation for high-confidence cases

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The confidence value acts as an intermediary between classification and downstream processing. It mediates the decision to continue or halt generation, filtering out low-confidence results before they consume additional computational resources

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If the system requests clarification for low-confidence classifications, then the accuracy of final output improves, but the interaction time with users increases

Engineering Contradiction:
Improveoutput accuracyVSAvoidinteraction time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system uses the confidence value parameter to dynamically determine whether to request clarification. By changing the threshold parameter, the system balances between seeking higher accuracy through user interaction and minimizing interaction time for high-confidence cases

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250363345A1Evaluating confidence in a classification performed by a generative language machine learning model
Publication Date: 2025.11.27 SHOPIFY INC
  • US20250363345A1 patent drawing
  • US20250363345A1 patent drawing
  • US20250363345A1 patent drawing

AI summary

A large language model (LLM) may be used to classify an input into one of a plurality of categories. However, given the machine-learning operation of the LLM, the output of the LLM does not represent a definitive statement, but is based on probability computations of the machine learning model. Therefore, the classification performed by the LLM might not be correct. Classification into the wrong category by the LLM results in downstream technical problems. In some implementations, when an LLM generates a response that classifies an input, one or more probability values associated with a token that forms the basis of the response may be used to determine a confidence value. The confidence value is indicative of confidence in the classification performed by the LLM. An action may be taken based on the confidence value.