Multi-agent artificial intelligence system with shared experience repository
Systems and methods for multi-agent artificial intelligence with shared experience repositories are disclosed. A system can obtain a set of actions generated by one or more language models based on a set of input data. The system can generate, using at least one reward model, a respective score for each action representing a degree to which the action satisfied a corresponding objective. The system can generate and store data records comprising the action data, corresponding input data, outcome data, and respective scores in a repository accessible to the language models. The system can generate a query according to an input context, select data records based on respective scores and similarity between the query and the records, and execute the language model using the selected record to generate an output action corresponding to the input context.
1 . A system, comprising:
one or more processors coupled to non-transitory memory, the one or more processors configured to:
obtain a set of actions generated by one or more language models based on a set of input data, each action comprising a tool invocation or control command configured, when executed, to cause a measurable change in a simulated or physical environment;
generate, using at least one reward model, a respective score for each action of the set of actions, the respective score representing a degree to which an outcome corresponding to a respective measurable change of the action satisfied a corresponding objective;
generate, for each action of the set of actions, a respective data record comprising data representative of the action, corresponding input data of the set of input data, an outcome corresponding to the action, and the respective score for the action;
store the respective data record for each action of the set of actions in a repository storing a plurality of data records accessible to the one or more language models;
generate, using a language model of the one or more language models, a query for at least one data record the repository, the query generated according to an input context of the language model;
select a first data record of the plurality of data records, the first data record representing a prior action and a prior outcome, based at least on the respective score of the first data record, the respective score indicating a magnitude to which the prior outcome satisfied an objective corresponding to the input context based on which the query was generated, and a similarity between the query and the first data record; and
execute the language model using the first data record to generate an output action corresponding to the input context.
2 . The system of claim 1 , wherein the one or more processors are further configured to:
generate a vector representation of the data representative of the action, the corresponding input data of the set of input data, an outcome corresponding to the action, and the respective score for the action; and
store the vector representation in a vector database.
3 . The system of claim 2 , wherein the one or more processors are further configured to:
select the first data record further based on a vector search operation over the vector database.
4 . The system of claim 1 , wherein the one or more processors are further configured to:
identify a subset of the plurality of data records based on the respective score of each data record of the plurality of data records; and
select the first data record from the subset based on the similarity between the query and the first data record.
5 . The system of claim 1 , wherein the one or more processors are further configured to:
combine the input context with the data of the first data record to generate an augmented input context; and
provide the augmented input context as input to the language model.
6 . The system of claim 1 , wherein the one or more processors are further configured to:
update the repository based on an outcome resulting from the output action generated by the language model.
7 . The system of claim 1 , wherein the one or more processors are further configured to:
apply a plurality of different reward models to each action of the set of actions to obtain a plurality of partial scores for the action; and
determine the respective score for the action as a weighted combination of the plurality of partial scores.
8 . The system of claim 1 , wherein the one or more processors are further configured to:
store metadata in association with each data record of the plurality of data records, the metadata comprising at least one of a domain identifier, an agent identifier, a timestamp, or an access-level tag.
9 . The system of claim 8 , wherein the one or more processors are further configured to:
select the first data record of the plurality of data records further based on the agent identifier of the first data record and an identifier of the language model.
10 . The system of claim 1 , wherein the one or more processors are further configured to:
apply a decay function to the respective score of each data record of the plurality of data records based on an age of the data record.
11 . A method, comprising:
obtaining, by one or more processors coupled to non-transitory memory, a set of actions generated by one or more language models based on a set of input data, each action comprising a tool invocation or control command configured, when executed, to cause a measurable change in a simulated or physical environment;
generating, by the one or more processors, using at least one reward model, a respective score for each action of the set of actions, the respective score representing a degree to which an outcome corresponding to a respective measurable change of the action satisfied a corresponding objective;
generating, by the one or more processors, for each action of the set of actions, a respective data record comprising data representative of the action, corresponding input data of the set of input data, an outcome corresponding to the action, and the respective score for the action;
storing, by the one or more processors, the respective data record for each action of the set of actions in a repository storing a plurality of data records accessible to the one or more language models;
generating, by the one or more processors, using a language model of the one or more language models, a query for at least one data record in the repository, the query generated according to an input context of the language model;
selecting, by the one or more processors, a first data record of the plurality of data records, the first data record representing a prior action and a prior outcome, based at least on the respective score of the first data record, the respective score indicating a magnitude to which the prior outcome satisfied an objective corresponding to the input context based on which the query was generated, and a similarity between the query and the first data record; and
executing, by the one or more processors, the language model using the first data record to generate an output action corresponding to the input context.
12 . The method of claim 11 , further comprising generating, by the one or more processors, a vector representation of the data representative of the action, the corresponding input data of the set of input data, an outcome corresponding to the action, and the respective score for the action, and storing, by the one or more processors, the vector representation in a vector database.
13 . The method of claim 12 , further comprising selecting, by the one or more processors, the first data record further based on a vector search operation over the vector database.
14 . The method of claim 11 , further comprising identifying, by the one or more processors, a subset of the plurality of data records based on the respective score of each data record of the plurality of data records, and selecting, by the one or more processors, the first data record from the subset based on the similarity between the query and the first data record.
15 . The method of claim 11 , further comprising combining, by the one or more processors, the input context with the data of the first data record to generate an augmented input context, and providing, by the one or more processors, the augmented input context as input to the language model.
16 . The method of claim 11 , further comprising updating, by the one or more processors, the repository based on an outcome resulting from the output action generated by the language model.
17 . The method of claim 11 , further comprising applying, by the one or more processors, a plurality of different reward models to each action of the set of actions to obtain a plurality of partial scores for the action, and determining, by the one or more processors, the respective score for the action as a weighted combination of the plurality of partial scores.
18 . The method of claim 11 , further comprising storing, by the one or more processors, metadata in association with each data record of the plurality of data records, the metadata comprising at least one of a domain identifier, an agent identifier, a timestamp, or an access-level tag.
19 . The method of claim 18 , further comprising selecting, by the one or more processors, the first data record of the plurality of data records further based on the agent identifier of the first data record and an identifier of the language model.
20 . A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
obtaining a set of actions generated by one or more language models based on a set of input data, each action comprising a tool invocation or control command configured, when executed, to cause a measurable change in a simulated or physical environment;
generating, using at least one reward model, a respective score for each action of the set of actions, the respective score representing a degree to which an outcome corresponding to a respective measurable change of the action satisfied a corresponding objective;
generating, for each action of the set of actions, a respective data record comprising data representative of the action, corresponding input data of the set of input data, an outcome corresponding to the action, and the respective score for the action;
storing the respective data record for each action of the set of actions in a repository storing a plurality of data records accessible to the one or more language models;
generating, using a language model of the one or more language models, a query for at least one data record in the repository, the query generated according to an input context of the language model;
selecting a first data record of the plurality of data records, the first data record representing a prior action and a prior outcome, based at least on the respective score of the first data record and a similarity between the query and the first data record, the respective score indicating a magnitude to which the prior outcome satisfied an objective corresponding to the input context based on which the query was generated, determined based at least on a vector search operation; and
executing the language model using the first data record to generate an output action corresponding to the input context.