← Latest papers
💻 computer science

Adaptive Universal Prompt Optimizer: A Multi- Stage Prompt Engineering Framework Using the Model Context Protocol

This paper introduces the Adaptive Universal Prompt Optimizer, a lightweight Python framework that leverages the Model Context Protocol and a multi-stage engineering process to automatically transform ambiguous user inputs into optimized system and user prompts, achieving significant score improvements in under 0.1ms while highlighting the need for further tuning of its scoring and refinement rules.

Original authors: Arpit Kale, Arya Tiwari, Dhanistha Wadettiwar, Dhanshri Kubade, Hansaraj Wankhede

Published 2026-11-17
📖 5 min read🧠 Deep dive

Original authors: Arpit Kale, Arya Tiwari, Dhanistha Wadettiwar, Dhanshri Kubade, Hansaraj Wankhede

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the world of modern artificial intelligence, there exists a powerful kind of computer program known as a large language model. These systems are trained on vast libraries of human writing, allowing them to answer questions, write code, and explain complex ideas. However, their ability to perform well depends entirely on the instructions they receive. These instructions, called prompts, are the only way a human can guide the machine. If a person types a vague or brief request, the machine often responds with a generic or unhelpful answer. The challenge is that writing a perfect instruction is difficult; it requires a specific skill set that most people do not have. Without clear direction, the machine lacks context about who is asking, how deep the answer should go, or what style is needed. This gap between a simple human question and a sophisticated machine response has created a need for a better way to communicate with these digital minds.

A team of researchers from G H Raisoni College of Engineering in India has developed a tool to bridge this gap. They created a lightweight software program called the Adaptive Universal Prompt Optimizer. Instead of asking the user to learn complex rules or write long, detailed instructions, this tool takes a short, rough request and automatically transforms it into a highly structured, professional prompt. The system works by first identifying what kind of task the user is asking for, such as writing code, conducting research, or explaining a concept. It then assigns a specific expert role to the machine, like a senior software architect or an academic researcher, and builds a detailed set of instructions around that role. The process is designed to be fast and simple, asking the user only three quick questions about how much detail they want and who the answer is for, before generating a final, optimized request.

The researchers tested their system on sixty different requests, ranging from simple questions like "tell me about computer science" to more specific tasks like "write a plan for a new app." They measured the quality of the prompts before and after the system worked on them using a strict set of rules. The results showed a dramatic improvement. The average quality score of the prompts jumped from 36.4 to 70.9, nearly doubling the initial performance. When the system was allowed to ask the user for more specific details about the audience, the score rose even further to 74.5. The entire process happened in less than a tenth of a millisecond, meaning the tool adds no noticeable delay to a conversation. The system successfully identified the type of task in 93.3% of the cases, correctly matching the request to the right expert persona and structure.

The tool operates by breaking the prompt creation process into eleven distinct steps. It begins by analyzing the user's raw text to find key words that signal the topic. Based on these words, it selects one of six possible task types, such as software engineering, academic research, or strategic analysis. Once the type is chosen, the system builds a "system prompt," which sets the tone and rules for the machine, and a "user prompt," which contains the actual task. It uses a method called rule-based evaluation to check its own work. This evaluation system, named APEX, looks for four specific qualities: whether the prompt keeps the original request's key ideas, if it includes a clear expert role, if it asks for a structured output with numbered steps, and if it includes safety rules to prevent errors. If the prompt does not meet a high standard, the system automatically adds missing elements and checks again, repeating this up to three times.

Despite the high scores, the researchers found that the system has limits. No prompt ever reached the perfect score of 85, which was set as the passing mark. The study revealed that the system struggles when a user's question contains words that look like trigger words but are part of a different phrase. For example, the word "apply" contains the letters "app," which the system mistakenly read as a signal for a software task, leading to a wrong classification. Additionally, the system's ability to improve a prompt stopped working after the first round of changes because the rules for fixing problems were not detailed enough to address the most common issues found. The researchers noted that while the optimized prompts were much better structured and led to clearer, more detailed answers in a small test of real-world examples, the tool does not guarantee that the final answer from the machine will be factually correct.

The study also highlighted that the tool is designed to be used by anyone, whether through a simple computer program or as a helper inside existing AI assistants. It does not require the user to have any technical background or to provide large amounts of data. The system is built to be transparent, showing the user exactly why a prompt received a certain score and what was changed. While the current version is not perfect and requires further tuning to handle more complex language and avoid errors, the researchers demonstrated that a simple, rule-based approach can significantly improve how humans talk to artificial intelligence. The work suggests that with the right tools, even a brief, casual question can be turned into a precise instruction that unlocks the full potential of these powerful machines.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →