Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

11 results for “dspy”

Newest and most relevant first

Prompt Debt and “Fighting the Weights”

Teams accreting compensating prompt rules get locked to stale models like GPT-4o and face costly rebuilds whenever they upgrade, so prompt hygiene directly affects migration ability.

Drew Breunig, CEO of cmpnd.ai, argues teams build up 'prompt debt': patched-up instructions added to AI prompts to force the desired behaviour. These patches stop working when models are upgraded, locking companies to old systems. He cites Datadog data showing GPT-4o still dominant in production. The advice is to measure success with tests instead of desperate wording, using tools like DSPy.

Prompt debt is a hidden maintenance cost: 69% of input tokens in Datadog customer traces were system prompts, and GPT-4o remained the most-deployed model in March 2026 even after retirement, because teams can't afford to rewrite prompts tuned to old weights. Breunig recommends moving prompt logic into evals and automation, and warns that model upgrades may force expensive rebuilds.

Breunig identifies two causes of prompt debt: natural language imprecision (e.g. Eagles-fan allegiance unlocking refused behaviour, per a Li/Chen/Saphra guardrail sensitivity paper) and 'fighting the weights', vendors' trained-in defaults. He and Srihari Sriraman analysed six coding agents' system prompts, finding instructions repeated five to seven times with escalating caps. Claude Code's prompt shrinks after each release, suggesting patches get trained into weights; options are prompt fixes, harness retry, or Yegge-style API aliasing. DSPy's Flex optimizer automates prompt discovery for model swapping.

Oreilly AI ML Blog →

Stop prompting, start programming: DSPy compiles your LM pipelines

Developers building LLM applications can replace brittle hand-tuned prompts with compiled, model-agnostic pipelines, cutting the time lost re-prompting whenever they switch models or restructure their code.

DSPy is a free, open-source tool from Stanford's NLP group for building software that uses AI language models. Instead of writing and endlessly tweaking instruction text (prompts) by hand, you write normal Python code describing your pipeline, and DSPy automatically works out the best instructions for you. It suits developers building real multi-step applications, not people writing a single one-off prompt. No benchmark figures or version details are given in the article.

Stanford NLP's open-source DSPy framework, installable via pip and documented at dspy.ai, targets the hidden labour cost of building on large language models: manual prompt rewriting after every pipeline change or model switch. Teams that adopt it keep pipeline logic in Python and automate prompt optimisation, making systems portable across model vendors. It adds a learning curve, and the article provides no adoption numbers, benchmarks or pricing beyond noting it is free.

DSPy (Declarative Self-improving Python) compiles declarative LM calls into optimised pipelines: you define modules and output validators in Python, then its optimizers search over prompts, few-shot demonstrations and even model weights. Pipelines stay model-agnostic, so swapping LMs requires no prompt rewrite. The README cites the original DSPy paper (October 2023) plus follow-up work on fine-tuning, prompt optimisation and reflective prompt evolution, which reportedly outperforms reinforcement learning in some contexts. No benchmark scores are provided.

GitHub Opensource Projects →

The Problem Is Prompt Debt

Hand-written prompts quietly lock teams to one model and slow iteration; the fix is specifying behavior via evals and using tools like DSPy to generate prompts instead of crafting them.

This is an opinion essay by Drew Breunig arguing that writing AI prompts in plain English by hand creates long-term problems, which he calls 'prompt debt'. As teams patch errors, prompts become long, brittle, and confusing to coworkers, and they stop working when you switch to a different AI model, a study cited found enterprises stick with older models like GPT-4o because newer ones break their agents. He recommends letting tests and tools like DSPy generate prompts instead. It affects any team building software on top of AI models.

Breunig warns that teams tuning prompts by hand accumulate 'prompt debt': brittle instructions, slow iteration, and lock-in to one model. Datadog data from March showed GPT-4o still the most-used model in observed traffic, with inference providers reporting older-generation models at over 50% of calls, because swapping models breaks tuned agents. The competitive risk is paying premium prices for aging models; the remedy is evaluation-driven prompt search using DSPy or GEPA, which he claims makes model swaps take hours, not weeks.

Breunig argues natural language is a lossy specification for probabilistic models: wording changes flip outputs (an Opus clinical-study result flipped 0/10 to 10/10 when rephrased from patient to physician voice), and spurious content like NFL-team preferences alters refusals in a Harvard study. Repeated instructions to 'fight the weights', e.g., Claude Code repeating multi-tool-call instructions seven times, Fable's copyright rule six times, increase brittleness. His mitigations: typed specs and evals as hard constraints, plus automated prompt optimization via DSPy and GEPA, decoupling applications from specific model weights.

Oreilly AI ML Blog →

Dspy

Engineers can replace hand-tuned, fragile prompts with a framework that compiles declarative pipelines and optimises prompts automatically, cutting maintenance of brittle prompt strings.

DSPy is a free, open-source tool from Stanford for building programs that use large language models (the AI systems behind chatbots). Instead of hand-writing prompt text by trial and error, developers describe what they want step by step, and DSPy works out the wording itself. It suits teams building chatbots or other AI applications who are tired of prompts that break when the model or wording changes.

DSPy, an open-source project from Stanford, targets the hidden cost of AI development: staff time spent writing and maintaining prompts that only work some of the time. Teams adopting it can define tasks programmatically and let the framework refine the prompts itself. It is free software, so the main cost is retraining developers to think in pipelines rather than prompt strings.

DSPy is Stanford's open-source framework that replaces hand-crafted prompts with declarative, composable modules over language models. Programs are compiled: the framework optimises prompts and few-shot examples against task metrics rather than relying on trial and error. It directly addresses the brittleness of prompts that work '80% of the time' and then need constant maintenance. No version number, benchmark figures or supported-model list are given in the article.

GitHub Opensource Projects →

Using DSPy to evaluate and improve Datasette Agent's SQL system prompts

Practitioners can now use DSPy as an automated harness to empirically find and fix flaws in production agent system prompts instead of hand-tuning them.

Simon Willison used DSPy, a framework for testing and refining how AI systems are instructed, to improve the prompts behind Datasette Agent, a tool that answers questions about data using read-only SQL. He asked Claude Code to run the experiment, which tested with GPT 4.1 mini and nano. The evaluation found the prompt's schema listing omitted column names, causing the AI to guess them and loop on errors. Fixing this makes the agent's answers more reliable.

This is a working demonstration that prompt quality for AI agents can be measured and improved systematically rather than by guesswork, using DSPy against real tool calls on a live in-process Datasette. Teams maintaining agent products gain a repeatable evaluation method; those relying on intuition-driven prompt editing fall behind on reliability. The approach used GPT 4.1 mini and nano as test models, keeping evaluation costs low.

The harness invokes DSPy agents against Datasette Agent's actual tool implementations and prompts running on a live in-process Datasette, evaluated against an auto-generated gold-standard dataset with custom metrics. Testing GPT 4.1 mini and nano surfaced a concrete prompt flaw: the schema listing exposed table names only, while 'don't call describe_table if you already have the information' advice caused column-name guessing (page_count, o.order_id, first_name) and error-retry loops. Recommended fix: include column names in the schema listing or soften that advice.

Simon Willison’s Weblog →

The essential curated list of LLM papers, frameworks, and tools

A maintained, one-stop index of LLM papers and tools saves engineers hours of scattered searching, though it changes nothing in the field itself.

Awesome-LLM is a free, public list on GitHub, a website where people share code and documents, that collects the most useful resources about large language models, the AI systems behind chatbots. It organizes hundreds of papers, courses, and tools into categories, with short notes on why each matters. Anyone learning about or building with AI can use it as a starting reading list. It is maintained by a volunteer and updated regularly.

This is a community-maintained GitHub reference list, not a product, so there is no cost, vendor, or competitive angle. Teams new to large language models can use it to shortcut research, since it points to the standard papers, frameworks like LangChain and LlamaIndex, and benchmarks like MMLU. Its value depends entirely on ongoing volunteer maintenance; there is no company behind it and no stated business risk or opportunity.

Awesome-LLM is a curated markdown repository (github.com/Hannibal046/Awesome-LLM) organizing resources into papers (architecture, training, prompting, evaluation, safety), frameworks (LangChain, LlamaIndex, vLLM, DSPy), tools, tutorials, and benchmarks (MMLU, HumanEval, HELM). Entries carry descriptions and cross-links, e.g. RLHF papers to the TRL library. The safety section covers red teaming, Constitutional AI, and reward hacking. No code, installation, or dependency is involved.

GitHub Opensource Projects →

Automate Writing Your LLM Prompts

Prompt engineering may shift from hand-crafting to automated optimisation with DSPy, changing how practitioners build LLM applications.

This is a tutorial-style blog post about DSPy, a framework that writes and improves the instructions you give to AI language models automatically instead of you typing them by hand. It covers creating, evaluating and optimising prompts. The article itself is just a summary line; no details, code examples, or results are included.

A Towards Data Science post describes using DSPy, an open-source framework, to automatically create, evaluate and optimise prompts for large language models. For decision-makers this signals a move away from manual prompt engineering toward systematic optimisation pipelines. The provided text contains no cost figures, benchmarks, or adoption details, so its business impact cannot be assessed from the excerpt alone.

The article covers DSPy as a tool to automate writing LLM prompts, including automatic prompt creation, evaluation, and optimisation workflows. The available excerpt is a single-sentence subtitle with no architecture details, benchmark numbers, model names, or code. It does not specify which optimisers, metrics, or LLMs were used, so technical readers learn only that the walkthrough exists.

Towards Data Science Blog →

Let the LLM Write the Prompts: An Intro to DSPy in Compound Al Pipelines

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.

Simon Willison’s Weblog →

Systematic LLM Prompt Engineering Using DSPy Optimization

Very little changes: DSPy is an established open-source tool, and this tutorial walks through prompting and LLM-as-judge evaluation on a customer service dataset without new results or benchmarks.

This is a tutorial on DSPy, an open-source framework that replaces hand-tweaking of AI prompts with automated optimization. It shows how to build prompts for generating customer service replies and for an AI judge that scores those replies, using a real dataset. The article publishes no results, benchmarks, or model names; the excerpt available is a teaser, so the technical payoff is unclear.

A Towards Data Science walkthrough demonstrates DSPy for systematizing prompt development in LLM operations, using customer service response generation with generator and LLM-judge prompts. It offers no cost figures, benchmark numbers, or deployment evidence, so it is a starting point for teams exploring prompt automation rather than proof of return. Nothing here changes tooling decisions this week.

The article covers using DSPy optimization to develop both generator prompts and LLM-judge evaluation prompts systematically, framed within LLMOps, using a real-world customer service dataset. The provided excerpt names no specific models, metrics, or optimization techniques (e.g., MIPROv2 or BootstrapFewShot are not mentioned), and no benchmark figures are given. Its value depends on details behind the paywall-style truncated excerpt.

Towards Data Science Blog →

Context Engineering, A Comprehensive Hands-On Tutorial with DSPy

This explains how to give AI smarter instructions, like providing a detailed guide instead of just hints. It uses a tool called DSPy to make AI models work better and more reliably, which means your AI tools will be more accurate and useful.

This article introduces 'Context Engineering' leveraging the DSPy framework, offering a strategic approach to enhance AI model reliability and efficiency. Business leaders should recognize its potential to significantly improve AI application performance and reduce operational costs by optimizing prompt design and data utilization.

The tutorial delves into 'Context Engineering,' a methodology for optimizing inputs to large language models (LLMs), specifically utilizing the DSPy framework. It details practical techniques to improve model accuracy and robustness by structuring contextual information effectively, aiming to streamline AI development workflows.

Towards Data Science Blog →

Programming, Not Prompting: A Hands-On Guide to DSPy

The article explains a new way to use AI, focusing on writing code instead of just giving instructions. This method offers more precise control over AI systems and makes them easier to understand and manage. It's important because it makes AI more reliable and efficient.

This article explores declarative AI programming using DSPy. It offers a practical approach, shifting focus from prompt engineering to direct code-based AI control. This approach promises greater precision and control for business applications.

The article introduces DSPy, a framework for declarative AI programming. It contrasts this approach with prompt engineering, highlighting advantages in control and reproducibility. The hands-on guide demonstrates practical applications of declarative programming in AI.

Towards Data Science Blog →