← Back to Innovations
Framework & SDK Language Experimental

PromptWizard

Self-Evolving Prompt Optimization

Explore PromptWizard on GitHub → Explore on GitHub →
PromptWizard

About PromptWizard

PromptWizard is a self-evolving framework that automates prompt optimization end-to-end. It generates prompt variations, critiques their performance, and refines both instructions and in-context examples using LLM feedback, while also synthesizing chain-of-thought reasoning and incorporating task intent and expert personas. The process produces high-quality task-specific prompts in minutes rather than the hours typically required for manual prompt engineering.

PromptWizard jointly optimizes instructions and examples in a two-stage process: stage one iteratively mutates and refines instructions, and stage two sequentially optimizes both instructions and synthesized examples that target the prompt’s weaknesses. Evaluated across 45 tasks, it consistently outperforms competing optimization methods, performs particularly well with limited training data and smaller LLMs, and reduces cost through fewer API calls and lower token usage. The framework scales to a range of LLM architectures and makes rapid, automated prompt optimization practical for production teams that previously had to rely on ad-hoc prompt craft.

Key capabilities

  • Joint optimization of prompts and few-shot examples
  • Iterative LLM feedback drives instruction refinement
  • Synthesizes chain-of-thought reasoning automatically
  • Produces high-quality prompts in minutes
  • Self-evolving optimization framework, fully open source
Technology Stack
Python LLMs
Technology Stack
Python LLMs