A product discussed on AI Engineer.

Agent Optimization with Pydantic AI: GEPA, Evals, Feedback Loops — Samuel Colvin, Pydantic
May 7, 2026 · 1:20:40
Samuel Colvin shows how to improve production agents without redeploying using Pydantic AI's GEPA, evals, and Logfire managed variables. GEPA uses a genetic algorithm to evolve prompts, achieving 96.7% accuracy — up from 87% with a simple prompt and 92% with an expert prompt — on a Wikipedia-based political relations task. Managed variables let you update prompts, models, and parameters live via a web interface and A/B test targeting. Evals compare against a golden dataset of 650 MPs; Colvin runs 65 cases in 30 seconds using GPT-4.1. He discusses that prompt optimization is most valuable with private data, that implicit user feedback (e.g., user's next action) can build golden datasets, and that overfitting to small test sets is a risk — the GEPA optimizer may exclude valid relations like 'uncle' if they don't appear in the training split.

From Stateless Nightmares to Durable Agents — Samuel Colvin, Pydantic
Nov 24, 2025 · 22:13
Samuel Colvin of Pydantic demonstrates building production-grade durable AI agents using PydanticAI, Temporal, and Pydantic Logfire, arguing that stateless architectures fail at scale and that durable execution with checkpointing and recovery is essential. He shows a 20 questions game where two agents play, but with 20% simulated failures, restarts are avoided by wrapping agents in Temporal wrappers for automatic retries. Colvin then implements a Deep Research agent that plans searches, runs parallel web searches via Tavilli, and synthesizes results, all recoverable. In a live demo, killing the workflow and restarting resumes instantly, replaying cached LLM calls in milliseconds. He also previews Pydantic AI Gateway and demonstrates Pydantic Evals comparing Gemini, GPT-4.1, and Claude Sonnet 4.5 on performance and cost.
Powered by PodHood