# US 2026/0065140 A1 · Adversarial training of artificial intelligence agents

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0065140 A1
- Document ID: US20260065140A1
- Status: Published application
- Kind: A1
- Application number: 18/824,677
- Filed: 2024-09-04
- Published: 2026-03-05
- Earliest claimed: 2024-09-04
- Assignees: Maplebear Inc.
- Applicants: Maplebear Inc.
- Inventors: Levi Boxell; Tilman Drerup
- Web page: https://patentgrep.com/patent/US20260065140A1

## CPC

- G06N 20/00: Machine learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system artificial intelligence (AI) agent is trained to act on behalf of an online system. The system AI agent comprises a large language model that has been pre-trained using a set of system constraints and a set of system objectives. The system AI agent is trained adversarially using training service requests from a plurality of different user AI agents of different types to determine resolutions to the training service requests. Once trained, the system AI agent may determine resolutions to service requests of users of the online system. In some embodiments, the system agent may determine the resolutions via messaging with user AI agents that represent the users. The online system may further train the system AI agent (and in some embodiments the user AI agents) based in part on the resolutions to the service requests.

## Claims

### Claim 1

A method, performed at a computer system comprising a processor and a computer-readable medium of an online system, comprising:
creating an instance of a system artificial intelligence (AI) agent comprising a large language model that has been pre-trained using a set of system constraints and a set of system objectives;
retrieving training service requests that are associated with a user AI agent of a plurality of user AI agents that are associated with different types, where each user AI agent is a separate large language model that was pre-trained using a set of training user constraints and a set of training user objectives that differ from at least one other user AI agent and in part determine the type of the user AI agent;
managing rounds of messaging between the user AI agent and the system AI agent to achieve resolutions to the training service requests;
generating training examples based on the training service requests from the user AI agent, each training example including, for a given service request and corresponding resolution, at least one round of messaging of the rounds of messaging;
labeling each training example based on a comparison of a resolution of the training example to a metric associated with the online system; and
training the system AI agent using the labeled training examples, wherein the trained system AI agent is used to determine a resolution for a service request that is associated with a user.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
retrieving training service requests that are associated with a second user AI agent of the plurality of user AI agents;
managing additional rounds of messaging between the second user AI agent and the system AI agent to achieve resolutions to the training service requests from the second user AI agent;
generating additional training examples based on the training service requests from the second user AI agent, each training example including, for a given service request and corresponding resolution, at least one round of messaging of the additional rounds of messaging;
labeling each additional training example based on a comparison of a resolution of the additional training example to a metric associated with the online system; and
training the system AI agent using the labeled additional training examples, wherein the trained system AI agent is used to determine a resolution for a service request that is associated with a second user.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
creating an instance of a second system AI agent comprising a large language model that has been trained using a second set of system constraints and a second set of system objectives;
retrieving training service requests that are associated with a second user AI agent of the plurality of user AI agents;
managing rounds of messaging between the second user AI agent and the second system AI agent to achieve resolutions to the training service requests from the second user AI agent;
generating additional training examples based on the training service requests from the second user AI agent;
labeling each additional training example based on a comparison of a resolution of the additional training example to a metric associated with the online system; and
training the second system AI agent using the labeled additional training examples, wherein the trained second system AI agent is used to determine a resolution for a service request that is associated with a second user.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving a service request from a user device associated with a user;
retrieving, from a data store maintained by the online system, information about previous interactions of the user with the online system;
prompting the system AI agent to determine a proposed agreement based in part on the service request and the information about previous interactions of the user with the online system; and
outputting the proposed agreement to one or more of the user device or the online system.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
determining a resolution to the service request using the proposed agreement;
generating an additional training example that includes the service request, the resolution, and the information about previous interactions of the user with the online system;
labeling the additional training example based on a comparison of the resolution of the additional training example to a metric associated with the online system; and
training the system AI agent using the labeled additional training example.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
receiving a service request from a user device associated with a user;
retrieving, from a data store maintained by the online system, information about previous interactions of the user with the online system;
prompting the user AI agent to generate a message to the online system based on the received service request;
managing rounds of messaging between the user AI agent and the system AI agent to achieve a resolution to the service request from the user AI agent; and
outputting the resolution to one or more of the user device or the online system.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
generating an additional training example that includes the service request, the resolution, and the information about previous interactions of the user with the online system;
labeling the additional training example based on a comparison of the resolution of the additional training example to a metric associated with the online system; and
training the system AI agent using the labeled additional training example.

### Claim 8 (depends on 1)

The method of claim 1, wherein managing the rounds of messaging between the user AI agent and the system AI agent to achieve resolutions to the service requests, comprises:
for a round of messaging,
receiving, from the user AI agent, output messages,
prompting the system AI agent based on the output messages from the user AI agent,
receiving, from the system AI agent, output messages for the user AI agent, and
prompting the user AI agent based on the output messages from the system AI agent.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
pre-training the system AI agent with the set of system constraints and the set of system objectives.

### Claim 10 (depends on 1)

The method of claim 1, wherein training the system AI agent using the labeled training examples comprises:
for each labeled training example, updating system AI agent based on the labeled training example.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
training the user AI agent using the training examples.

### Claim 12

A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a processor of a computer system, cause the computer system to perform steps comprising:
creating an instance of a system artificial intelligence (AI) agent comprising a large language model that has been pre-trained using a set of system constraints and a set of system objectives;
retrieving training service requests that are associated with a user AI agent of a plurality of user AI agents that are associated with different types, where each user AI agent is a separate large language model that was pre-trained using a set of training user constraints and a set of training user objectives that differ from at least one other user AI agent and in part determine the type of the user AI agent;
managing rounds of messaging between the user AI agent and the system AI agent to achieve resolutions to the training service requests;
generating training examples based on the training service requests from the user AI agent, each training example including, for a given service request and corresponding resolution, at least one round of messaging of the rounds of messaging;
labeling each training example based on a comparison of a resolution of the training example to a metric associated with an online system; and
training the system AI agent using the labeled training examples, wherein the trained system AI agent is used to determine a resolution for a service request that is associated with a user.

### Claim 13 (depends on 12)

The computer program product of claim 12, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
retrieving training service requests that are associated with a second user AI agent of the plurality of user AI agents;
managing additional rounds of messaging between the second user AI agent and the system AI agent to achieve resolutions to the training service requests from the second user AI agent;
generating additional training examples based on the training service requests from the second user AI agent;
labeling each additional training example based on a comparison of a resolution of the additional training example to a metric associated with the online system; and
training the system AI agent using the labeled additional training examples, wherein the trained system AI agent is used to determine a resolution for a service request that is associated with a second user.

### Claim 14 (depends on 12)

The computer program product of claim 12, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
creating an instance of a second system AI agent comprising a large language model that has been trained using a second set of system constraints and a second set of system objectives;
retrieving training service requests that are associated with a second user AI agent of the plurality of user AI agents;
managing rounds of messaging between the second user AI agent and the second system AI agent to achieve resolutions to the training service requests from the second user AI agent;
generating additional training examples based on the training service requests from the second user AI agent;
labeling each additional training example based on a comparison of a resolution of the additional training example to a metric associated with the online system; and
training the second system AI agent using the labeled additional training examples, wherein the trained second system AI agent is used to determine a resolution for a service request that is associated with a second user.

### Claim 15 (depends on 12)

The computer program product of claim 12, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
receiving a service request from a user device associated with a user;
retrieving, from a data store maintained by the online system, information about previous interactions of the user with the online system;
prompting the system AI agent to determine a proposed agreement based in part on the service request and the information about previous interactions of the user with the online system; and
outputting the proposed agreement to one or more of the user device or the online system.

### Claim 16 (depends on 15)

The computer program product of claim 15, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
determining a resolution to the service request using the proposed agreement;
generating an additional training example that includes the service request, the resolution, and the information about previous interactions of the user with the online system;
labeling the additional training example based on a comparison of the resolution of the additional training example to a metric associated with the online system; and
training the system AI agent using the labeled additional training example.

### Claim 17 (depends on 12)

The computer program product of claim 12, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
receiving a service request from a user device associated with a user;
retrieving, from a data store maintained by the online system, information about previous interactions of the user with the online system;
prompting the user AI agent to generate a message to the online system based on the received service request;
managing rounds of messaging between the user AI agent and the system AI agent to achieve a resolution to the service request from the user AI agent; and
outputting the resolution to one or more of the user device or the online system.

### Claim 18 (depends on 17)

The computer program product of claim 17, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
generating an additional training example that includes the service request, the resolution, and the information about previous interactions of the user with the online system;
labeling the additional training example based on a comparison of the resolution of the additional training example to a metric associated with the online system; and
training the system AI agent using the labeled additional training example.

### Claim 19 (depends on 12)

The computer program product of claim 12, wherein the encoded instructions for training the system AI agent using the labeled training examples cause the computer system to perform steps comprising:
for each labeled training example, updating system AI agent based on the labeled training example.

### Claim 20

A computer system comprising:
a processor; and
a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by the processor, cause the computer system to perform steps comprising:
creating an instance of a system artificial intelligence (AI) agent comprising a large language model that has been pre-trained using a set of system constraints and a set of system objectives,
retrieving training service requests that are associated with a user AI agent of a plurality of user AI agents that are associated with different types, where each user AI agent is a separate large language model that was pre-trained using a set of training user constraints and a set of training user objectives that differ from at least one other user AI agent and in part determine the type of the user AI agent,
managing rounds of messaging between the user AI agent and the system AI agent to achieve resolutions to the training service requests,
generating training examples based on the training service requests from the user AI agent, each training example including, for a given service request and corresponding resolution, at least one round of messaging of the rounds of messaging,
labeling each training example based on a comparison of a resolution of the training example to a metric associated with an online system, and
training the system AI agent using the labeled training examples, wherein the trained system AI agent is used to determine a resolution for a service request that is associated with a user.
