Multi-Model Prompt Routing for Higher-Quality LLM Outputs

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveprompt qualityVSAvoidsystem complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Measurement precision

If prompt optimization is performed using multiple ML models, then output accuracy and quality improve, but computational resources increase

Engineering Contradiction:
Improveoutput accuracyVSAvoidcomputational resources
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

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.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If standard prompt generation is used, then the processing speed is fast, but the effectiveness and accuracy of model outputs are limited

Engineering Contradiction:
Improveoutput effectivenessVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12505288B1Multi-machine learning system for interacting with a large language model
Publication Date: 2025.12.23 AMAZON TECH INC
  • US12505288B1 patent drawing
  • US12505288B1 patent drawing
  • US12505288B1 patent drawing

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.