Multi-Model Prompt Routing for Higher-Quality LLM Outputs
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The effectiveness of machine learning models is limited by the quality of prompts used, leading to suboptimal outputs.
Innovation Solution
A multi-machine learning system is employed to improve prompts by leveraging trained knowledge across a large corpus of inputs and outputs, using a prompt writing model to generate optimized prompts based on classification and templates tailored to the specific task or general requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If a single machine learning model is used to generate prompts, then the system complexity is low, but the prompt quality and output effectiveness are insufficient
Solution Approach 1:
The system divides the prompt generation task into multiple specialized machine learning models, each responsible for specific aspects of prompt creation. This segmentation allows each model to focus on particular prompt characteristics, improving overall prompt quality while maintaining manageable system complexity through modular architecture.
Solution Approach 2:
The multi-ML model system serves multiple functions: generating base prompts, optimizing prompt structure, enhancing content quality, and adapting to different task types. This multi-functionality enables a single system to address various prompt quality dimensions simultaneously, resolving the contradiction between comprehensive quality improvement and system complexity.
2Measurement precision
If prompt optimization is performed using multiple ML models, then output accuracy and quality improve, but computational resources increase
Solution Approach 1:
The system performs preliminary prompt optimization using multiple ML models before the optimized prompt is used for actual task execution. By pre-generating and refining prompts in advance, the system achieves high output accuracy while the computational cost is amortized over multiple uses of the same optimized prompt, reducing per-task resource consumption.
3Reliability
If standard prompt generation is used, then the processing speed is fast, but the effectiveness and accuracy of model outputs are limited
Solution Approach 1:
The system performs prompt optimization in advance before actual query processing. The multi-ML model system generates and refines prompts beforehand, so that during actual operation, the pre-optimized prompts can be used directly, maintaining fast processing speed while ensuring high output effectiveness through prior refinement.
Data Source
AI summary
Techniques disclosed may include determining a first prompt that is generated at a user interface of a user device and that is to be input to a first machine learning (ML) model. The techniques may further include determining, based at least in part on a second ML model, a classification of the first prompt. The techniques may further include generating, based at least in part on an input to a third ML model associated with the classification, a second prompt, the input being based at least in part the first prompt, an output of the third ML model comprising the second prompt. The techniques may further include performing at least one of: (i) inputting the second prompt instead of the first prompt to the first ML model, or (ii) causing the second prompt to be presented at the user interface.


