← Back to issue9 / 29 · Week of Jun 29, 2026

DSPy prompt eval loop for SQL agents

Simon Willison used DSPy to evaluate Datasette Agent SQL prompts and found that an instruction meant to save context led the agent to guess column names and retry failed SQL. Why it matters: Agent prompt changes can introduce hidden regressions. Treating prompts as testable units helps teams optimize context use without degrading answer quality.

Try this: Before shortening a system prompt, capture a few realistic failure cases, define expected tool-use behavior, and compare prompt variants with an eval harness.

Source
Simon Willison
View source →

Get the field brief every week.

One lead signal, three quick hits, one thing to try, one concept decoded - and the rest of the week on the wire. For people who want to know what matters and what to do next.

Subscribe free →
Free weekly·No spam·Unsubscribe anytime