Prompt Optimization with Minimal Unlabeled Input via Meta-Reasoning
Abstract
Prompt optimization is critical for maximizing the performance of large language models (LLMs). However, it often relies on costly labeled data. Self-supervised methods reduce data dependency, but they suffer from optimization ambiguity or high computational costs. To address these limitations, we propose the Meta-Reasoning Prompt Engineering Agent (MR.PEA), a self-supervised prompt optimization framework that operates with minimal input. MR.PEA leverages meta-reasoning to iteratively build task-specific knowledge, including problem-solving strategies and evaluation criteria, while adaptively retrieving external information to enhance its understanding. This knowledge guides the generation of diverse validation examples, targeted prompt refinement, and comprehensive quality assessments. Experiments on GSM8K and Big-Bench Hard show that MR.PEA outperforms existing baselines, achieving an average performance gain of 7.4% with an optimization cost as low as $0.01 per task.
Lay Summary
Large language models often work much better when given clear and carefully written instructions, known as "prompts". However, writing effective prompts by hand can be difficult, and many existing methods for improving them require large amounts of labeled data, time, or computing power. We developed MR.PEA, a method that can improve prompts for LLMs using only a short task description and a single example question. It works by reflecting on how it solves a task, gradually building up knowledge, learning what makes a good answer, and deciding when to look up outside information. This allows it to refine prompts efficiently without relying on human-labeled data. We tested MR.PEA on challenging math and reasoning tasks. Our method consistently improved performance while keeping costs extremely low — as little as one cent per task. This work could make it easier and cheaper for people to adapt AI systems to new tasks, even when they have very little data or limited resources.