LLM Classification Confidence Using Token Probability Signals
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
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
3Reliability
If the system requests clarification for low-confidence classifications, then the accuracy of final output improves, but the interaction time with users increases
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
Data Source
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.


