LLM Query Clarification Using Token Confidence Thresholds

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 based on the probability values of selected and alternative tokens to assess the reliability of LLM outputs, allowing for corrective actions such as stopping, modifying, or re-prompting the model.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If an LLM generates classification output based on probabilistic token selection, then the model can produce diverse responses, but the classification accuracy and reliability deteriorate

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

Solution Approach 1:

The system implements feedback by computing confidence values from token probabilities and using them to control subsequent actions. When confidence is low, the system triggers corrective actions such as re-prompting or alternative processing, creating a closed-loop feedback mechanism that improves reliability without eliminating response diversity

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent changes the parameter of token selection from pure probabilistic sampling to confidence-thresholded selection. By introducing confidence values derived from token probabilities and applying threshold filters, the system transforms the parameter space to balance diversity and accuracy

Inventive Principle:
Principle #35Parameter changes

2Productivity

If the LLM continues generation after incorrect classification, then more output is produced, but computational resources are wasted on hallucination or irrelevant content

Engineering Contradiction:
Improveoutput volumeVSAvoidcomputational waste
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system performs preliminary action by evaluating confidence values before committing to full generation. By assessing token probabilities in advance and identifying low-confidence classifications early, the system prevents wasteful continuation of generation, stopping before computational resources are expended on likely hallucinated or irrelevant content

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The confidence value acts as an intermediary between the probabilistic token selection and the final generation decision. This intermediary layer filters out low-confidence predictions, allowing the system to maintain productivity for high-confidence cases while avoiding computational waste on uncertain predictions

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If the LLM generates additional output based on classification, then the system provides comprehensive responses, but the token limit and prompt limits are exceeded

Engineering Contradiction:
Improveresponse completenessVSAvoidtoken limit delay
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system applies partial action by generating only the portion of output that is necessary and confident. Instead of always generating complete responses, the system generates partial output for low-confidence classifications and full output for high-confidence cases, optimizing token usage while maintaining response completeness where applicable

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12632471B2Query clarification based on confidence in a classification performed by a generative language machine learning model
Publication Date: 2026.05.19 SHOPIFY INC
  • US12632471B2 patent drawing
  • US12632471B2 patent drawing
  • US12632471B2 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.