Using DSPy to evaluate and improve Datasette Agent's SQL system prompts
Source published ·Modelwire updated
Original coverage: Simon Willison ↗·How Modelwire adds context

The development
Simon Willison demonstrates a practical workflow for using DSPy, Stanford's framework for optimizing language model behavior, to systematically evaluate and refine SQL generation prompts in Datasette Agent. The work bridges prompt engineering and formal evaluation, showing how developers can move beyond manual tuning toward measurable improvements in agent reliability. This matters for the broader shift toward reproducible LLM optimization: as agents become production infrastructure, the ability to programmatically test and iterate on system prompts becomes a competitive advantage for teams building data-access tools.
Modelwire’s AI-generated summary of coverage from Simon Willison.
Modelwire analysis
ExplainerOur AI-generated reading of the wider context and the next developments to watch.
The less-discussed implication here is that Willison is treating system prompts as artifacts to be tested under version control, not as configuration to be tweaked by intuition. DSPy's contribution is providing a feedback loop with measurable signal, which is distinct from simply 'using a framework.'
This connects directly to the Taboo constraint study covered yesterday (arXiv, July 1), which used a game environment as a controlled testbed to isolate how models balance competing instructions at inference time. Willison is doing something structurally similar: creating a repeatable evaluation harness to surface where SQL generation prompts fail under specific conditions. Both approaches treat prompt behavior as something to be measured rather than assumed. The broader pattern across recent coverage is a quiet shift away from prompting as craft toward prompting as engineering discipline, with reproducible test suites replacing intuition.
Watch whether Willison publishes the evaluation dataset and DSPy configuration publicly. If he does, and other Datasette users report measurable accuracy gains on their own schemas within the next few months, that would confirm the method generalizes beyond his specific test cases.
This interpretation is generated from the summary above and the archive coverage cited below. Our methodology · Report an error
Coverage behind this analysis
These archive entries ground the connection in our analysis. They are ordered by source publication date, with links to our coverage and the original sources.
·arXiv cs.CL
"Don't Say It!": Constraints, Compliance, and Communication when Language Models Play Taboo
Researchers are using the Taboo word game as a controlled testbed to understand how language models handle competing constraints at inference time. By progressively intervening in the generation pipeline, from prompt engineering to internal representation manipulation, the work isolates how models balance strict lexical restrictions against communicative effectiveness. This matters because real-world deployment often requires…
MentionsSimon Willison · DSPy · Datasette Agent · Claude · Stanford NLP
How this coverage is produced
Modelwire uses AI to generate summaries and context from source headlines, snippets, and selected archive coverage. Automated checks do not verify every claim, and items are not routinely reviewed by a person before publication. Zacaria Solis operates the site. Read the linked source for the full evidence and report errors through our corrections process.
Modelwire summarizes, we don’t republish. The full content lives on simonwillison.net. If you’re a publisher and want a different summarization policy for your work, see our takedown page.