Automatic Prompt Engineering (APE) and Optimization by PROmpting (OPRO) use the LLM itself to generate, evaluate, and optimize prompt variants.
By feeding a set of test cases and an evaluation metric to an optimizer model, the system iteratively refines the prompt template to maximize accuracy, outperforming human-written prompts on complex tasks.
System Meta-Prompt: Your task is to generate an instruction that achieves high performance on a target classification task.
Here are past instructions and their accuracy scores:
Generate a new instruction that improves on these templates by prioritizing clarity and edge-case handling.
Claude is highly sensitive to subtle changes in instructions. Use OPRO loops to calibrate exact prompt wording for specific datasets.