Multi-agent orchestration system and method
The present disclosure provides a system and method rendering enhanced multi-category query responses via orchestrated execution of trained artificial intelligent (AI) agent instances. An execution control module can receive user queries via a user interface and direct a query response module to determine semantic categories associated with the queries, generate corresponding subtasks, and select trained agent instances to execute the subtasks. Subtask responses can be validated and combined to generate a structured responses to the queries. The structured responses can be validated and presented to the users via the user interface.
1 . A computer-implemented method, performed by a server-based execution control module comprising at least one processor and a memory, for rendering enhanced multi-category query responses via orchestrated execution of trained artificial intelligent (AI) agent instances, the method comprising:
receiving, at the execution control module, a natural-language query from a remote user device;
determining, by the execution control module, a semantic embedding vector for the query using a domain-adapted transformer model;
clustering, by the execution control module, the embedding vector into K semantic clusters via k-means clustering, each semantic cluster corresponding to a subtask category;
for each semantic cluster, selecting, by the execution control module, a respective AI agent instance from a pool of N trained AI agent instances, the selection based on:
a stored task execution profile that indexes each AI agent instance by one or more capability vectors; and
a cosine-similarity calculation between a centroid vector of the semantic cluster and each of the one or more capability vectors;
dispatching, by the execution control module, each semantic cluster to a selected AI agent instance for processing, wherein each AI agent instance executes a cluster-specific subtask on a dedicated central processing unit (CPU) thread;
validating, by the execution control module, each subtask output against predefined accuracy thresholds by computing a confidence score via a task validation module;
aggregating, by the execution control module, validated subtask outputs into a final structured response by merging formatted partial results based on predefined merge rules; and
transmitting, by the execution control module, the final structured response to the remote user device for display via a user interface.
2 . The method of claim 1 , wherein clustering the embedding vector into K semantic clusters via k-means clustering comprises:
determining, by a semantic categorization module, semantic relevance scores for candidate semantic categories based on comparing the embedding vector of the query to stored embeddings associated with the candidate semantic categories; and
ranking, by the semantic categorization module, the K semantic clusters based on the candidate semantic categories and the semantic relevance scores.
3 . The method of claim 2 , further comprising:
determining, by the semantic categorization module, access controls associated with the query based on a credential obtained by the user interface from the remote user device; and
preventing, by the semantic categorization module, access to candidate semantic categories not authorized by the access controls.
4 . The method of claim 2 , further comprising comparing, by the semantic categorization module, the K semantic clusters a hierarchy model comprising a plurality of nodes representing domain-specific terms associated with the candidate semantic categories and edges connecting the nodes representing relationships between the corresponding domain-specific terms.
5 . The method of claim 2 , further comprising generating, by a subquery generation module, at least one subquery for each of the cluster-specific subtasks based on the cluster-specific subtasks and the query, wherein the subqueries are configured to prompt the AI agent instances to generate the subtask outputs based on executing the cluster-specific subtasks.
6 . The method of claim 5 , wherein validating each subtask output against predefined accuracy thresholds by computing a confidence score via a task validation module comprises applying, by a task validation module, a validation algorithm to verify a completeness, accuracy, and relevance of each of the subtask outputs based on the corresponding semantic cluster and subtask category.
7 . The method of claim 6 , further comprising instructing, by the execution control module, at least one of the selected AI agent instances to re-execute a cluster-specific subtask based on a failed subtask output validation.
8 . The method of claim 5 , further comprising generating, by a task response module, subtask responses by structuring the subtask outputs using a trained machine learning model.
9 . The method of claim 1 , further comprising determining, by an agent selection module, subtask parameters for semantic cluster based on the corresponding subtask category, wherein the subtask parameters for each semantic cluster comprise one or more of a domain expertise, a computational complexity, or a data type requirement, and wherein the stored task execution profile of each AI agent instance comprises one or more of a domain training, a computational capacity, and a data type compatibility.
10 . The method of claim 1 , wherein dispatching, by the execution control module, each cluster a selected AI agent instance for processing comprises:
routing, by an agent call module, the cluster-specific subtasks to the corresponding selected AI agent instances;
referencing, by the agent call module, a vector database storing domain-specific terms, relationships and metadata to facilitate execution of the cluster-specific subtasks by the selected AI agent instances; and
consolidating, by the agent call module, subtask outputs generated by the selected agent instances.
11 . The method of claim 10 , further comprising:
determining, by the agent call module, access controls associated with the query based on a credential obtained by the user interface from the remote user device; and
preventing, by the agent call module, execution of cluster-specific subtasks not authorized by the access controls.
12 . The method of claim 1 , further comprising:
storing, by a semantic categorization module, the query and the final structured response in a trained neural network cache;
retrieving, by the semantic categorization module, the final structured response from the trained neural network cache for a subsequent query determined to be semantically similar to the stored query; and
generating, by a response generation module, a response for the subsequent query based on the final structured response from the trained neural network cache.
13 . The method of claim 1 , further comprising validating, by a response validation module prior to transmitting the final structured response to the remote user device, the final structured response by utilizing one or more of a rule-based algorithm to verify completeness and a semantic similarity analysis to verify relevance to the query.
14 . The method of claim 1 , wherein the execution control module is configured to issue instructions to a semantic categorization module, a task generation module, an agent selection module, a task execution module, a task validation module, and a response generation module for generating the final structured response.
15 . The method of claim 1 , wherein the execution control module is configured to operate as a cloud-based orchestration platform deployed as a set of microservices.
16 . The method of claim 1 , wherein the pool of N trained AI agent instances is defined by an agent network, and wherein each of the trained AI agent instances of the agent network are trained based on domain specific data corresponding to candidate semantic categories.
17 . The method of claim 1 , further comprising obtaining the query via the user interface displayed by the remote user device, wherein the user interface is implemented as a web-based application.
18 . A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause a computing system to:
receive a query from a remote user device;
determine a semantic embedding vector for the query using a domain-adapted transformer model;
cluster the embedding vector into K semantic clusters via k-means clustering, each semantic cluster corresponding to a subtask category;
for each semantic cluster, select a respective AI agent instance from a pool of N trained AI agent instances, the selection based on:
a stored task execution profile that indexes each AI agent instance by one or more capability vectors; and
a cosine-similarity calculation between a centroid vector of the semantic cluster and each of the one or more capability vectors;
dispatch each cluster a selected AI agent instance for processing, wherein each AI agent instance executes a cluster-specific subtask on a dedicated central processing unit (CPU) thread;
validate each subtask output against predefined accuracy thresholds by computing a confidence score via a task validation module;
aggregate validated subtask outputs into a final structured response by merging formatted partial results based on predefined merge rules; and
transmit the final structured response to the remote user device for display via a user interface.