/Patent Tracker
MicrosoftPatent applicationAI & softwareInterest 7/10

Microsoft patents system that automatically improves AI prompts

Microsoft describes a method that automatically improves the instructions given to AI models by testing many variations and keeping the best ones. It also searches a database of past examples to add useful context to the final instruction. This helps the AI produce better answers without a human manually tweaking the prompt.

Why it mattersThis could make it easier for developers to get consistent results from AI tools without spending hours writing perfect instructions.

In the filing’s own words

Techniques for generating optimized input prompts for generative language models combines automated prompt refinement with intelligent context retrieval. A prompt optimization service automatically refines initial prompt instructions through controlled mutation and evaluation cycles using multiple generative language models. A context management service maintains a vector database of historical examples pre-encoded as embedding vectors, enabling efficient retrieval of semantically similar examples for new tasks. A dynamic prompt generator assembles optimized prompts by combining refined instructions with relevant historical examples and task context. The system supports deployment with both large language models and smaller fine-tuned models, enabling efficient operation across diverse applications. Configurable parameters allow balancing optimization quality against computational costs. The system maintains efficiency through single-call mutations, fast vector similarity search, and support for compact fine-tuned models that reduce resource requirements while preserving response quality.

What exactly they claim (claim 1)

1. A computer-implemented method for generating an input prompt for a generative language model, the method comprising: receiving task context data for a task and an initial prompt instruction for instructing the generative language model to perform the task; generating an optimized prompt instruction by iteratively applying, with a prompt optimization system that uses one or more generative language models, a plurality of mutation operations and a plurality of refinement operations to the initial prompt instruction, wherein each mutation operation comprises: generating, by a mutator language model, a plurality of candidate prompt variations from a current prompt instruction; evaluating, by a critic language model, the plurality of candidate prompt variations against a set of training samples to assign a performance-based score to each candidate prompt variation; and selecting a highest-scoring candidate prompt variation from the plurality of candidate prompt variations based on the assigned performance-based scores; wherein each refinement operation comprises: generating, by the critic language model, targeted feedback identifying strengths and weaknesses of the highest-scoring candidate prompt variation; modifying the highest-scoring candidate prompt variation based on the targeted feedback to produce a refined prompt instruction; and using the refined prompt instruction as the current prompt instruction in a subsequent mutation operation until reaching a convergence criterion; assembling the input prompt based on the optimized prompt instruction and the task context data; and providing the input prompt to the generative language model to generate a response for performing the task.

Facts

Company
Microsoft (Microsoft Technology Licensing, LLC)
Official title
AUTOMATED PROMPT OPTIMIZATION FOR GENERATIVE LANGUAGE MODELS
Publication number
US20260277977A1
Application number
19680435
Filed
May 18, 2026
Published
Sep 17, 2026
Inventors
8
Claims
20

Classified under

G06F 16/3347 Physics & computingG06F 11/3604 Physics & computingG06F 16/3322 Physics & computingG16H 50/20 Physics & computingG16H 50/70 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.