Let the LLM Write the Prompts: An Intro to DSPy in Compound Al Pipelines
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Prompt optimisation like DSPy lets small local models replace much larger ones on narrow tasks, cutting inference cost while making prompt-switching between models a measurable evaluation instead of guesswork.
Drew Breunig gave a talk at the Databricks Data + AI Summit explaining DSPy, a tool that lets AI write its own instructions instead of humans doing it. He matched 70 million addresses from different map providers by having a tiny free model compare them. Using a larger AI to improve the prompt raised its accuracy from 60.7% to 82%.
This talk shows a cost lever: a tiny open model (Qwen3-0.6B) running locally can match 70 million addresses for map data, once DSPy's MIPROv2 optimizer, driven by GPT-4.1, rewrites its prompt, lifting accuracy from 60.7% to 82%. The trade-off is one-off optimisation effort versus cheap recurring inference, and prompts become swap-ready when models change.
DSPy's MIPROv2 optimizer used GPT-4.1 to produce a 700-token prompt for Qwen3-0.6B, a 0.6B-parameter local model, for a binary conflation task matching places of interest across datasets. Accuracy rose from 60.7% to 82% on the address-matching job. The optimized prompt handles case, diacritics, transliteration and multilingual scripts, and the pipeline makes re-evaluating replacement models cheap.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
DSPy Qwen3-0.6B GPT-4.1 MIPROv2 Databricks Data + AI Summit Overture Maps
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
A self-hosted file manager fork with OIDC, LDAP, and real-time search
FileBrowser Quantum lets teams manage multiple storage sources with enterprise authentication and real-time search without complex setup, saving admin time and reducing security risk.
A Go implementation of MCP for connecting LLM apps to tools and data
Go developers can expose LLM tools without writing MCP plumbing, saving time on integration.
An open-source Canva alternative you can self-host, with video export
Self-hosted design tools let teams avoid subscription fees and keep data on their own servers, while adding video export unlocks new content formats for social media creators.
Samsung is testing a feature that changes the angle of photos you’ve already taken
Samsung’s new Recompose lets users change photo angles after shooting, potentially reducing the need for multiple shots and improving post-capture editing workflows for photographers and casual users alike.
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.