[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"glossary-automatic-prompt-optimization::en":3,"gloss-cluster-automatic-prompt-optimization::en":26,"gloss-next-automatic-prompt-optimization::en":9},{"slug":4,"category":5,"name":6,"definition":7,"meta_desc":8,"faq":9,"schema_markup":9,"related":10},"automatic-prompt-optimization","prompt-eng","Automatic Prompt Optimization","Automatic Prompt Optimization is the practice of using search, or another model, to write and improve prompts for you, rather than hand-tuning wording by trial and error. The Automatic Prompt Engineer method (Zhou et al., 2022) showed an LLM can propose candidate instructions, score them against examples, and keep the winners; frameworks like DSPy push this further by compiling and tuning entire prompt pipelines against a metric. The core loop is always the same: a labeled dataset, a scoring function (exact match, an LLM judge, or a task metric), and a search over prompt variants that maximizes the score. It matters because prompt quality is high-leverage but hand-optimization doesn't scale across many tasks, models, or locales — and it silently rots when you switch models. For builders, treat prompts as artifacts you optimize against an eval set, not prose you polish by vibes. Caveat: you need a trustworthy metric and enough examples, or the optimizer overfits to noise and 'improves' the wrong thing.","Automatic prompt optimization uses search or another model to write and score prompts against examples, replacing hand-tuned trial-and-error wording.",null,[11,14,17,20,23],{"slug":12,"name":13},"golden-dataset","Golden Dataset",{"slug":15,"name":16},"llm-as-judge","LLM-as-Judge",{"slug":18,"name":19},"meta-prompt","Meta Prompt",{"slug":21,"name":22},"prompt-engineering","Prompt Engineering",{"slug":24,"name":25},"prompt-testing","Prompt Testing",[27,31,34,38,41,44,47,50,53,56,59,62],{"slug":28,"category":5,"name":29,"updated_at":30},"analogical-prompting","Analogical Prompting","2026-08-24T02:46:37+00:00",{"slug":32,"category":5,"name":33,"updated_at":30},"chain-of-density","Chain of Density (CoD)",{"slug":35,"category":5,"name":36,"updated_at":37},"chain-of-thought-prompting","Chain-of-Thought Prompting","2026-08-24T02:46:36+00:00",{"slug":39,"category":5,"name":40,"updated_at":30},"chain-of-verification","Chain-of-Verification",{"slug":42,"category":5,"name":43,"updated_at":37},"chunking","Chunking",{"slug":45,"category":5,"name":46,"updated_at":37},"constrained-decoding","Constrained Decoding",{"slug":48,"category":5,"name":49,"updated_at":37},"context-stuffing","Context Stuffing",{"slug":51,"category":5,"name":52,"updated_at":37},"delimiter","Delimiter",{"slug":54,"category":5,"name":55,"updated_at":30},"directional-stimulus-prompting","Directional Stimulus Prompting",{"slug":57,"category":5,"name":58,"updated_at":30},"emotion-prompting","Emotion Prompting",{"slug":60,"category":5,"name":61,"updated_at":37},"few-shot-prompting","Few-Shot Prompting",{"slug":63,"category":5,"name":64,"updated_at":30},"generated-knowledge-prompting","Generated Knowledge Prompting"]