Recursive RAG Copilot Microservices for Faster, More Accurate Responses

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large Language Models (LLMs) face challenges with high computational burdens, latency, and undesirable artifacts such as inaccuracies, biases, and hallucinations, limiting their practical application in various domains.

Innovation Solution

A microservice architecture comprising small to mid-sized trained machine learning tools and software modules, allowing for efficient deployment on single-node systems, customized training, and incorporating retrieval augmented generation (RAG) to enhance response accuracy and reduce computational overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If large LLMs are used to improve response quality and capabilities, then the model can outperform smaller models on complex tasks, but computational burden and inference time increase significantly

Engineering Contradiction:
Improveresponse qualityVSAvoidinference time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent divides the large LLM into multiple smaller specialized models, each trained on specific datasets for particular tasks. Instead of using one large model for all tasks, the system segments functionality across multiple smaller models that can be invoked selectively based on the input query, reducing overall inference time while maintaining response quality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary classification of input queries to determine which specialized smaller model should handle each task. By pre-categorizing queries and routing them to appropriate specialized models before inference, the system avoids the overhead of running a large general-purpose model for every query, thus reducing inference time while maintaining high response quality for task-specific queries.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If large LLMs are deployed to handle complex tasks, then model capabilities improve, but computational resources and infrastructure requirements increase

Engineering Contradiction:
Improvemodel capabilitiesVSAvoidcomputational resources
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the monolithic large LLM architecture into multiple smaller specialized models, each handling specific task types. This segmentation reduces the computational resources required for each individual model while collectively providing diverse capabilities across the ensemble, lowering infrastructure requirements compared to a single large model.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system creates a universal framework that can handle multiple task types through a collection of specialized models. Each smaller model is trained for specific functions but the overall system provides multi-functionality by routing different queries to appropriate models, achieving versatility without requiring each model to be large and resource-intensive.

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

3Measurement precision

If larger LLMs are trained to improve performance, then model accuracy increases, but training time and computational cost increase

Engineering Contradiction:
Improvemodel accuracyVSAvoidtraining time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the training process into multiple specialized training campaigns, each focused on a specific task or domain. Instead of training one large model on all possible tasks (which would require extensive time and resources), the system trains multiple smaller models on specialized datasets, achieving high accuracy for each task domain more efficiently.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system changes the parameters of the models by using different sizes and architectures optimized for specific tasks rather than uniformly large models. Each specialized model uses parameters and architecture appropriate for its specific function, reducing overall training time while maintaining or improving accuracy for task-specific queries compared to a general large model.

Inventive Principle:
Principle #35Parameter changes

4Productivity

If specialized smaller models are used to reduce computational burden, then inference time decreases, but model versatility and task coverage may be limited

Engineering Contradiction:
Improveinference speedVSAvoidtask coverage
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements a universal query routing framework that directs different types of queries to appropriate specialized models. The system maintains versatility by covering multiple task domains through a collection of specialized models, each optimized for specific functions, while the routing mechanism ensures comprehensive task coverage similar to a large general-purpose model but with faster inference speeds for task-specific queries.

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

Solution Approach 2:

The system performs preliminary query analysis and classification to route inputs to the most appropriate specialized model. This preliminary action enables the smaller specialized models to handle their specific tasks efficiently with fast inference, while the routing framework ensures broad task coverage by directing different query types to the models best suited for them.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12399907B2Copilot implementation: recursive iteration of retrieval augmented generation (RAG)
Publication Date: 2025.08.26 THIA ST CO
  • US12399907B2 patent drawing
  • US12399907B2 patent drawing
  • US12399907B2 patent drawing

AI summary

Apparatus and methods are disclosed for implementing a copilot as a network of microservices including specialized large language models (LLMs) or other trained machine learning (ML) tools. This architecture supports flexible, customizable, or dynamically determinable dataflow. Compared to much larger competing LLMs, comparable or superior performance is achieved, while significantly reducing computation time and hardware requirements, even to a single compute node with a single GPU. Examples incorporate a retrieval microservice, as least one data producer, and a core microservice. Based on client input, the retrieval microservice can perform multiple iterations of retrieval augmented generation (RAG). At each iteration, output (based on any preceding iterations' results or the client input) is transmitted to a data producer, and results received therefrom. Eventually, based on these results, an output is transmitted toward the core microservice for generation of a response to the client input. Variations and additional techniques are disclosed.