LLM Intent Detection via Few-Shot Prompt Augmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Implementing a voice user interface for an integrated development environment (IDE) is challenging due to the vast number of tasks and commands, requiring accurate intent detection from developer-spoken speech, which existing systems often fail to perform reliably.
Innovation Solution
A large language model is employed, pre-trained on natural language text and source code, with prompts augmented by few-shot examples of utterance-intent pairs to guide intent detection, using a neural transformer model with attention to translate developer-spoken speech into actionable commands within the IDE.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If a voice user interface is implemented for an IDE with vast number of tasks and commands, then the ease of operation is improved, but the reliability of intent detection deteriorates
Solution Approach 1:
The system performs preliminary action by retrieving and organizing relevant commands and parameters before the user speaks. The intent detection system pre-loads contextual information about available IDE commands, parameters, and their relationships, so that when the user speaks, the system already has the framework needed for accurate intent recognition. This preliminary preparation enables reliable intent detection despite the vast number of possible commands.
Solution Approach 2:
The patent introduces an intermediary intent detection system that mediates between the user's spoken commands and the IDE's command execution. This intermediary layer uses natural language processing to translate diverse user expressions into standardized IDE commands, filtering out ambiguities and ensuring reliable mapping between spoken words and executable commands, thus resolving the contradiction between ease of operation and detection reliability.
2Device complexity
If traditional machine learning models are used for intent detection, then the device complexity is reduced, but the measurement precision of intent detection deteriorates
Solution Approach 1:
The patent replaces traditional machine learning approaches with a rule-based intent detection system that uses explicit command definitions and parameter specifications. Instead of relying on statistical patterns that may be imprecise, the system uses formally defined command structures, parameter types, and validation rules to achieve precise intent recognition. This substitution of mechanical/statistical approaches with formal rule-based mechanisms resolves the contradiction between device complexity and measurement precision.
3Manufacturing precision
If rule-based systems are used for intent detection, then the manufacturing precision is improved, but the adaptability to new commands and parameters deteriorates
Solution Approach 1:
The patent implements dynamics by making the intent detection system adaptable through configuration rather than hardcoding. The system allows dynamic addition of new commands, parameters, and their relationships through configurable data structures. When new IDE commands are added, the system can incorporate them through updated configuration files or schemas, maintaining high precision for recognized commands while adapting to new possibilities. This dynamic configurability resolves the contradiction between manufacturing precision and adaptability.
Data Source
AI summary
A large language model is used to detect the intent of a developer-spoken utterance. The large language model is pre-trained on natural language text and source code. A prompt to the large language model is augmented with a few-shot examples of pairs of an utterance and intent in order to guide the model to predict an intent for a given utterance. The few-shot examples are extracted from known utterance-intent pairs. The pairs closest to the developer-spoken utterance are incorporated into the prompt as the few-shot examples.


