/Patent Tracker
MicrosoftPatent applicationAI & softwareInterest 5/10

Microsoft patents method for LLMs to critique and improve their own prompts

Microsoft has filed a patent application for a system that automatically improves instructions given to large language models. The method uses one AI model to identify flaws in a current prompt based on incorrect answers, then uses another model to rewrite the prompt to fix those issues.

Why it mattersThis approach could help developers create more effective AI instructions without manually testing and refining them by hand.

In the filing’s own words

Systems and methods are provided for implementing automatic prompt optimization using textual gradients. In various embodiments, a feedback prompt, input into a large language model (“LLM”), is used to generate textual gradients that criticize a current prompt. The feedback prompt includes the current prompt and predictions that are incorrect compared with corresponding labels associated with minibatch data processed by the LLM using the current prompt. The textual gradients and current prompt are used in an editing prompt to the LLM to obtain a set of optimized prompts, which may be expanded using a paraphrasing prompt that is input into the LLM to generate a set of paraphrased prompts. A selection algorithm is used to select one or more optimized prompts from the set of optimized prompts and/or the set of paraphrased prompts, and the process is repeated with the selected one or more optimized prompts replacing the current prompt.

What exactly they claim (claim 1)

1. A system for implementing automatic prompt optimization using textual gradients, 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: providing, as input to a large language model (“LLM”), a feedback prompt requesting one or more textual gradients, each textual gradient including a description of one or more flaws in an initial prompt resulting in errors in LLM predictions; receiving, as output from the LLM in response to the feedback prompt, the one or more textual gradients; providing, as input to the LLM, an editing prompt requesting a set of optimized prompts based on the initial prompt and the one or more textual gradients; receiving, as output from the LLM, the set of optimized prompts; and selecting an optimized prompt from the set of optimized prompts based on evaluation of prompt performance using a secondary LLM that is finetuned based on a curated dataset for a specific subject area.

Facts

Company
Microsoft (Microsoft Technology Licensing, LLC)
Official title
AUTOMATIC LANGUAGE MODEL (LM) INPUT OPTIMIZATION USING TEXTUAL GRADIENTS
Publication number
US20260260061A1
Application number
19653905
Filed
Apr 21, 2026
Published
Sep 3, 2026
Inventors
7
Claims
20

Classified under

G06F 40/20 Physics & computingG06F 40/166 Physics & computingG06F 16/90 Physics & computing

More from Microsoft in AI & software

Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.