Domain Query Routing With Ambiguity Resolution for Grounded LLM Responses
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current Large Language Models (LLMs) face challenges in providing context-aware and relevant responses to domain-specific queries due to insufficient specialized knowledge, computational inefficiency, and the inability to integrate additional information effectively, leading to suboptimal results.
Innovation Solution
A system that classifies user queries into specific domains using domain-specific vector embeddings, calculates weighted confidence scores based on context, history, and popularity, and employs a Human-in-the-Loop mechanism to refine ambiguous queries, enhancing the relevance and accuracy of LLM responses.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If LLMs use a one-size-fits-all approach to query understanding and response generation, then the system complexity is reduced, but the response accuracy and relevance deteriorate for domain-specific queries
Solution Approach 1:
The patent segments the monolithic LLM system into multiple specialized components: domain classification modules that route queries to appropriate domains, domain-specific embedding models for each knowledge area, and specialized LLMs trained on domain-specific data. This segmentation allows each component to specialize in its domain while maintaining overall system manageability.
Solution Approach 2:
The patent implements local quality by creating domain-specific specialized knowledge modules with tailored embedding models and LLMs for each knowledge domain. Each domain (e.g., medical, legal, technical) has its own optimized components with domain-specific training data and parameters, ensuring high-quality responses for domain-specific queries while maintaining a unified system architecture.
2Reliability
If LLMs are trained on vast datasets to improve language understanding capabilities, then the model's general knowledge improves, but the ability to integrate additional domain-specific information post-training deteriorates
Solution Approach 1:
The patent applies preliminary action by pre-training domain-specific embedding models and LLMs on extensive domain-specific datasets before deployment. These pre-trained models are then enhanced with retrieval-augmented generation capabilities that allow them to integrate additional domain-specific information from external knowledge bases, combining the benefits of pre-trained language understanding with adaptability to new information.
Solution Approach 2:
The patent introduces retrieval-augmented generation as an intermediary mechanism between the LLM and external domain-specific knowledge bases. This intermediary allows the model to query external sources for additional domain-specific information and integrate it into its responses, bridging the gap between pre-trained knowledge and current domain-specific data without requiring full retraining.
3Adaptability or versatility
If LLMs are used to provide comprehensive language processing, then the versatility of the system is improved, but the computational cost and processing time worsen
Solution Approach 1:
The patent segments the computational workload by dividing it into multiple specialized LLMs, each trained on specific domain data. When a query arrives, the system first classifies the domain and then routes the query to the appropriate specialized model, avoiding the computational overhead of using a single large general-purpose model for all queries. This segmentation reduces the average computational cost while maintaining versatility.
Solution Approach 2:
The patent implements partial action by using domain classification to activate only the necessary domain-specific LLM and retrieval components for each query. Instead of deploying all possible language processing capabilities simultaneously, the system activates only the subset needed for the current query type, reducing computational waste while maintaining full versatility when needed.
Data Source
AI summary
Aspects of the invention provide a method, system, and computer program product for retrieval augmented generation. In one aspect, the method includes receiving a query. The method further includes classifying the query to a first domain within a plurality of domains. The method additionally includes determining an ambiguity associated with classifying the query. The method also includes retrieving an index of domain-specific vector embeddings corresponding to the domains when the ambiguity does not exceed a threshold for ambiguity. The method further includes prompting a large language model with the query and the domain-specific vector embeddings. The method also includes receiving a query response from the large language model as grounded with the most relevant index results. The method further includes forwarding the query response.


