BlogsDecagonPrompt Engineering Optimization

Prompt Engineering Optimization

Prompt Engineering Optimization

3
posts
2026

Decagon is developing systematic approaches to prompt engineering optimization, moving beyond manual iteration. The GEPA (Reflective Prompt Evolution) framework, built on DSPy, uses LLM reflection to automatically improve prompts. Key findings from production deployment include identifying an optimal sample size range (20-100 examples), the critical need for frontier LLMs as reflection models, and the effectiveness of length constraints as regularization to prevent prompt bloat and improve generation. This capability has been extended with automatic optimization of Agent Operating Procedures (AOPs), brand guidelines, and guardrails based on best practices from hundreds of enterprise deployments, and Root Cause Analysis to automatically identify high-impact improvements based on live conversations.

2026

Introducing Duet Autopilot: The self-improving agent for conversational AI | Decagon

6/9/2026

Introduces Duet Autopilot, a system that automates agent improvement by translating production signals into validated agent updates. It features automated improvement, self-validation through a testing loop (including regression testing against conversation history and a golden test set), and enterprise governance with human approval gates. The system also incorporates upfront guidance for brand voice, writing standards, and off-limits rules, and provides a health report for cumulative performance tracking. Autopilot itself is subject to an improvement loop based on human reviewer feedback.

Introducing automatic optimization and Root Cause Analysis | Decagon

4/23/2026

Introduced automatic optimization for Agent Operating Procedures (AOPs), brand guidelines, and guardrails, leveraging best practices from enterprise deployments. Also added Root Cause Analysis to automatically identify high-impact improvements by analyzing live conversations, clustering drivers of poor performance, and mapping them to specific components like AOP structure, knowledge gaps, and missing tools, providing targeted recommendations.

Optimizing GEPA for production: A test-driven approach to prompt engineering | Decagon

3/25/2026

This post details the application of the GEPA prompt engineering optimization framework to a production classification task. It presents findings from 19+ ablation experiments, highlighting three critical adaptations for production readiness: 1) an optimal sample size range of 20-100 examples, contrary to conventional wisdom; 2) the non-negotiable requirement for frontier LLMs as reflection models, as smaller models fail to perform meta-cognitive reasoning; and 3) the essential role of length constraints (e.g., 1,500 characters) as regularization to prevent prompt bloat and overfitting, achieving 4x compression with minimal performance loss. The work advocates for treating prompt optimization as software engineering.