# US 2025/0384207 A1 · Dynamic evaluation system for responsible ai in large language models

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

- Number: US 2025/0384207 A1
- Document ID: US20250384207A1
- Status: Published application
- Kind: A1
- Application number: 18/742,627
- Filed: 2024-06-13
- Published: 2025-12-18
- Earliest claimed: 2024-06-13
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Parag AGRAWAL; Hari SHRAWGI; Tushar SINGHAL; Madhur JINDAL; Prasenjit GHOSH; Sandipan DANDAPAT; Prasanjit RATH
- Web page: https://patentgrep.com/patent/US20250384207A1

## CPC

- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06F 21/10: Protecting distributed programs or content, e.g. vending or licensing of copyrighted material (protection in video systems or pay television H04N7/16) {; Digital rights management [DRM]}
- H04L 51/02: using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The technology described herein, among other things, relates to testing applications, backed by language models (LMs), for compliance with responsible artificial-intelligence (RAI) guidelines. For example, LM-based chatbots have proliferated across many different domains and implementations. These chatbots, however, may be susceptible to attacks or attempts to cause the chatbots to violate RAI guidelines by producing harmful content and/or potentially violating copyrights. To evaluate whether an LM-based application, such as a chatbot, is complying with respective RAI guidelines, the technology disclosed herein adaptively simulates conversations with the LM-based application in an attempt to cause the LM-based application to violate the RAI guidelines in a controlled, simulated environment.

## Claims

### Claim 1

A system for testing responsible artificial intelligence (RAI) compliance of a language model (LM) based application, the system comprising:
at least one processor; and
memory storing instructions that, when executed by the at least one processor, cause the system to perform operations comprising:
receiving initial conversation parameters including at least one or more initial persona settings for a simulated user and an RAI guideline;
generating a first conversational-input prompt requesting a first conversational input, wherein the first conversational input prompt includes at least a portion of the initial conversation parameters;
providing the generated first conversational-input prompt as input to a language model;
receiving, from the language model in response to the first conversational-input prompt, the requested first conversational input;
transmitting the first conversational input to the LM-based application;
receiving a first conversational response from the LM-based application in response to the first conversational input;
storing the first conversational input and the first conversational response as a first simulated conversation;
generating feedback based on the stored first simulated conversation;
adjusting one or more of the initial conversational parameters based on the generated feedback;
generating a second conversational-input prompt requesting a second conversational input, wherein the second conversational input prompt includes at least a portion of the adjusted conversation parameters;
providing the generated second conversational-input prompt as input to the language model;
receiving, from the language model in response to the second conversational-input prompt, the requested second conversational input;
transmitting the second conversational input to the LM-based application;
receiving a second conversational response from the LM-based application in response to the second conversational input;
storing the second conversational input and the second conversational response as a second simulated conversation; and
evaluating an RAI compliance of the LM-based application based on at least whether the second simulated conversation violated the RAI guideline.

### Claim 2 (depends on 1)

The system of claim 1, wherein:
the initial conversation parameters further include a system description of the LM-based application; and
the first conversational-input prompt further includes the system description.

### Claim 3 (depends on 1)

The system of claim 1, wherein:
the initial conversation parameters further include an adversarial seed including at least one of an example topic, example query, or example conversation; and
the first conversational-input prompt further includes the adversarial seed.

### Claim 4 (depends on 3)

The system of claim 3, wherein the adversarial seed includes at least a portion of a logged prior conversation with the LM-based application.

### Claim 5 (depends on 1)

The system of claim 1, wherein the first simulated conversation is stored in a first set of simulated conversations, and the second simulated conversation is stored in a second set of simulated conversations.

### Claim 6 (depends on 5)

The system of claim 5, wherein generating the feedback includes generating one or more metrics for the first set of simulated conversations.

### Claim 7 (depends on 6)

The system of claim 6, wherein the one or more metrics include at least one of a relevance metric, an adversarial metric, and a diversity and coverage metric.

### Claim 8 (depends on 7)

The system of claim 7, wherein the one or metrics include the diversity and coverage metric and the diversity and coverage metric is generated based on a cluster analysis of embeddings for the simulated conversations in the first set of simulated conversations.

### Claim 9 (depends on 5)

The system of claim 5, wherein evaluating an RAI compliance of the LM-based application includes evaluating whether each simulated conversation in the second set of conversations violated the RAI guideline.

### Claim 10 (depends on 1)

The system of claim 1, wherein evaluating the RAI compliance of the LM-based application further comprises:
generating an evaluation prompt including the RAI guideline, the second simulated conversation, and an instruction for the language model to determine if the second simulated conversation violated the RAI guidelines;
providing the evaluation prompt to the language model; and
receiving, from the language model in response to the evaluation prompt, a response indicating whether the second simulated conversation violated the RAI guideline.

### Claim 11 (depends on 1)

The system of claim 1, wherein the LM-based application is a chatbot.

### Claim 12 (depends on 1)

The system of claim 1, wherein the persona settings include a setting for at least one of a conscientiousness trait, an openness trait, an extraversion trait, a neuroticism trait, or an agreeableness trait.

### Claim 13

A computer-implemented method for testing responsible artificial intelligence (RAI) compliance of a language model (LM) based application, the method comprising:
generating feedback for a first set of simulated conversations with the LM-based application;
based on the feedback, adjusting one or more conversation parameters, wherein the conversation parameters include one or more persona settings for a simulated user;
generating a second set of simulated conversations, wherein generating the second set of simulated conversations comprises:
generating a conversational-input prompt requesting a conversational input, wherein the conversational input prompt includes an RAI guideline and the persona settings;
providing the generated conversational-input prompt as input to a language model;
receiving, from the language model in response to the conversational-input prompt, the requested conversational input;
transmitting the conversational input to the LM-based application;
receiving a conversational response from the LM-based application in response to the conversational input;
storing the conversational response as part of a simulated conversation of the second set of simulated conversations; and
evaluating an RAI compliance of the second set of simulated conversations.

### Claim 14 (depends on 13)

The method of claim 13, wherein the persona settings include settings for at least two of a conscientiousness trait, an openness trait, an extraversion trait, a neuroticism trait, or an agreeableness trait.

### Claim 15 (depends on 13)

The method of claim 13, wherein evaluating in the RAI compliance of the LM-based application further comprises:
generating an evaluation prompt including the RAI guideline, the conversational response, and an instruction for the language model to determine if the conversational response violated the RAI guidelines;
providing the evaluation prompt to the language model; and
receiving, from the language model in response to the evaluation prompt, a response indicating whether the conversational response violated the RAI guideline.

### Claim 16 (depends on 15)

The method of claim 15, further comprising generating an RAI compliance score based on whether the conversational response violated the RAI guideline.

### Claim 17

A system for testing responsible artificial intelligence (RAI) compliance of a language model (LM) based application, the system comprising:
at least one processor; and
memory storing instructions that, when executed by the at least one processor, cause the system to perform operations comprising:
receiving initial conversation parameters, wherein the initial conversation parameters comprise:
an RAI guideline;
one or more persona settings for a simulated user; and
a system description of the LM-based application;
generating a first set of simulated conversations, with the LM-based application, based on the initial conversation parameters;
generating feedback based on the first set of simulated conversations;
adjusting one or more of the conversation parameters based on the generated feedback;
generating a second set of simulated conversations, with the LM-based application, based on the adjusted conversation parameters; and
evaluating an RAI compliance of the LM-based application based on whether the second set of simulated conversations violated the RAI guideline.

### Claim 18 (depends on 17)

The system of claim 17, wherein:
the conversation parameters further include configuration settings for the language model, including at least one of a top-p value, a top-k value, or a temperature; and
adjusting the conversation parameters includes adjusting at least one of the configuration settings for the language model.

### Claim 19 (depends on 17)

The system of claim 17, wherein evaluating the RAI compliance comprises:
generating an evaluation prompt including the RAI guideline, the second set of simulated conversations, and an instruction for a language model to determine if the simulated conversations violated the RAI guidelines;
providing the evaluation prompt to the language model; and
receiving, from the language model in response to the evaluation prompt, a response indicating whether the simulated conversations violated the RAI guideline.

### Claim 20 (depends on 17)

The system of claim 17, wherein the initial conversation parameters are received through a configuration interface.
