DSPy Logo

DSPyWeekly

Your Weekly Dose Of All Things DSPy

Articles and Tutorials
Videos
Every Friday

You'll receive verification email in max 1 minute. Do check SPAM just in case. Unsubscribe anytime.

Subscribed by employees and students at

Apple
Microsoft
LinkedIn
Columbia University
JioStar
Freshworks
Netflix
Databricks
MIT

".@DSPyOSS is so good that i'm kind of sad how many hours i spent struggling without it last year"

Joshua Weaver
Joshua Weaver
Director @txoji Attorney with a background in tech and entrepreneurism.

"Both DSPy and (especially) GEPA are currently severely under hyped in the AI context engineering world."

tobi lutke
Tobi Lutke
CEO by day, Dad in evening, hacker at night.

"We've reached that stage where every single day of the week (and every weekend), there are *several* really cool @DSPyOSS research papers, open-source applications, production use cases, or deep-dive tutorials, etc."

Omar Khattab

DSPyWeekly Issue No #13

Published on November 28, 2025

📚 Articles

Building Chat Agents with Ephemeral Memory: A Step-by-Step Guide

Learn lightweight context engineering in Ruby. We'll incrementally build a chat agent with ephemeral memory and cost-based routing—starting from the simplest possible loop and layering complexity only when needed.

Announcing DSPy Code: The CLI to Build and Optimize Your DSPy Code – Superagentic AI Blog

Superagentic AI is proud to announce the DSPy Code, the comprehensive CLI to build and optimize your DSPy and GEPA code. DSPy Code is now live: an AI-powered CLI that brings DSPy-native intelligence, real GEPA optimization, and end-to-end automation into one interactive environment.

Paper: A Multicancer AI Framework for Comprehensive Cancer Surveillance from Pathology Reports

This paper introduces an autonomous AI system that automates data abstraction from pathology reports for cancer registries. Key Highlights: - High Performance: ~94% accuracy across 10 distinct cancer types. - Resource-Efficient: Runs entirely on a local open-weight model (gpt-oss:20b) using a single GPU. - Privacy-First: No data leaves the premise. Coded using DSPy.

Generative AI in the Real World: Context Engineering with Drew Breunig

A little dated by still relevant. In this episode, Ben Lorica and Drew Breunig, a strategist at the Overture Maps Foundation, talk all things context engineering: what’s working, where things are breaking down, and what comes next. Listen in to hear why huge context windows aren’t solving the problems we hoped they might, why companies shouldn’t discount evals and testing, and why we’re doing the field a disservice by leaning into marketing and buzzwords rather than trying to leverage what current crop of LLMs are actually capable of.

DSPy Events in Pune and Bengaluru - India

DSPy Pune meetup, December 13, 2025, 4 p.m. and DSPy Bengaluru - Quarterly Meetup, December 20, 2025, 10 a.m.

Optimize multiple prompts together

In complex agent systems, you might have chained multiple prompts together. You can provide all these prompts together for GEPA to consider and optimize each prompt.

Paper - Prompt Optimization as a State-Space Search Problem

This paper reformulates prompt engineering as a classical state-space search, treating prompts as "states" and edits as "transitions." By using algorithms like Beam Search guided by LLM-based heuristics, the framework systematically optimizes prompts. Results demonstrate performance competitive with leading tools like DSPy and OPRO, offering a more transparent and controllable optimization process.

dspy-cli by Drew Breunig and Isaac Miller

A tool that serves DSPy programs as HTTP APIs with Docker config, OpenAPI specs, MCP support, and more.

Let the Model Write Your Tools

Building a research agent with CodeAct where the LLM generates Ruby code on the fly.

DSPy Cheatsheet Poster

All hail nano banana. DSPy basics cheatsheet.

Paper - Structured Prompting Enables More Robust, Holistic Evaluation of Language Models

This paper challenges the reliability of current benchmarks like HELM, arguing that their reliance on fixed prompts systematically underestimates language model performance. The authors introduce a "DSPy+HELM" framework that utilizes structured prompting to estimate a model's performance "ceiling" rather than a floor. Empirical analysis across seven benchmarks reveals that standard methods underreport performance by an average of 4% and often misrepresent model rankings. By integrating structured prompting, this approach provides a more accurate, decision-useful evaluation of frontier models.

🎥 Video

DSPy Talk at PyCon Finland By Jayita Bhattacharyya

DSPy is a declarative framework for building modular AI software. It allows you to iterate fast on structured code, rather than brittle strings, and offers algorithms that compile AI programs into effective prompts and weights for your language models, whether you're building simple classifiers, sophisticated RAG pipelines, or Agent loops. Instead of wrangling prompts or training jobs, DSPy (Declarative Self-improving Python) enables you to build AI software from natural-language modules and to generically compose them with different models, inference strategies, or learning algorithms. This makes AI software more reliable, maintainable, and portable across models and strategies.

Using DSPy for Prompt Optimization in Python: Example of Calibrating Quiz Bowl Questions [Lecture]

This is a single lecture from a course. If you you like the material and want more context (e.g., the lectures that came before), check ... | Channel: Jordan Boyd-Graber

DSPy: Advanced RAG

Part II of our series: "DSPy: Advanced RAG"! Building on our initial exploration of prompt engineering, this session expands into the dynamic capabilities of Retrieval Augmented Generation (RAG) using DSPy.

DSPy Few Shot Prompt Optimization #llm #promptengineering #datascience #ai #agent

Prompt few shot examples is what drives accuracy up. How should you choose which examples are worthy of the honor to be ... | Channel: Hacking AI

DSPy Explained! | Auto Prompting and Reasoning | Configure any LLM in DSPy | Components of DSPy #ai

Dive into the world of DSPy, the groundbreaking Prompt Programming Framework, with this comprehensive guide! Whether ... | Channel: At A Glance!

🚀 Projects

KazKozDev/dspy-optimization-patterns

A production framework for DSPy implementing the Teacher-Student pattern. Distill the reasoning of expensive models (Teacher) into optimized prompts for cheap, fast models (Student) to reduce inference costs by up to 50x. | Language: HTML | License: MIT License

ShadyGEE/AI_DSpy

Retail Analytics Copilot

ahmedsamymohamad/Langgraph_dspy

LangGraph + DSPy agent that routes questions intelligently between RAG (Retrieval-Augmented Generation), SQL, and hybrid approaches, powered by local Ollama models.

SangeethaKumari/DspyOptimizer_2

This repository contains a quick-start reference plus three task notebooks demonstrating the use of GEPA (Genetic Evolutionary Prompt Architecture) with DSPy for optimizing AI systems.