Understand how PromptWizard works
mainPromptWizard (PW) is a task-aware prompt optimization framework that uses the following mechanisms to improve LLM performance:
- Instruction Mutation & Refinement: Generates variations of task descriptions and instructions by prompting LLMs to mutate them. It uses a critique component to provide feedback for iterative refinement.
- In-Context Example Optimization: Selects a diverse set of positive and negative examples from training data. Negative examples are used to inform further prompt refinements.
- Sequential Optimization: Optimizes examples and instructions sequentially, using critiques to generate synthetic examples that address current prompt weaknesses.
- Reasoning Enrichment: Generates detailed reasoning chains via Chain-of-Thought (CoT).
- Alignment: Integrates task intent and expert personas to align prompts with human reasoning, improving both performance and interpretability.