AIToday
Simon Willison's WeblogPublished: Jul 3, 2026, 04:01 JST

DSPy used to refine Datasette Agent's SQL prompts

Send on LINE

3 Key Points

  1. What happened

    A research project used DSPy, a framework for evaluating and improving AI systems, to test and refine the core system prompts that Datasette Agent uses when answering questions by executing read-only SQL queries. The work identified several improvements, including better schema documentation to avoid column-name guessing and reduce error-retry loops.

  2. Why it matters

    Datasette Agent is a tool for querying databases with natural language. Improving its system prompts means it will answer user questions more accurately and efficiently, reducing unnecessary back-and-forth exchanges. This demonstrates a practical approach to making AI tools more reliable in production use.

  1. What to watch

    The research tested improvements using GPT-4.1 mini and nano models and identified promising directions for refinement, particularly around how database schemas are presented in prompts to the AI.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

FAQ
What is Datasette Agent?
Datasette Agent is a read-only SQL question answerer that executes SQL queries to answer user questions about data.
What improvement was identified in the research?
The research found that including column names in the schema listing, rather than just table names, would prevent the AI from guessing column names and reduce error-retry loops.
Simon Willison's WeblogRead Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Next articleTokyo University and Kubota develop drone method to predict potato yield before harvest