Stay Updated with DSPyWeekly!

DSPyWeekly Issue No #3

Published on September 19, 2025

📚 Articles

Integrating Text and Time-Series into (Large) Language Models to Predict Medical Outcomes - Paper

Large language models (LLMs) excel at text generation, but their ability to handle clinical classification tasks involving structured data, such as time series, remains underexplored. In this work, we adapt instruction-tuned LLMs using DSPy-based prompt optimization to process clinical notes and structured EHR inputs jointly. Our results show that this approach achieves performance on par with specialized multimodal systems while requiring less complexity and offering greater adaptability across tasks.

Hacking DSPy into doing Automatic System Prompt Optimization - Maxime Rivest

In this tutorial, I’ll show you how I’ve modified and customized DSPy to make it handle system prompt optimization. Usually DSPy is doing program optimization. DSPy is very much batteries included, giving you tons of tools for everything. It’s general, and it gives you a framework for how to do things, which is powerful and useful. But that framework is about AI programming, not about system prompt optimization. That is why we will need to do some customization to DSPy. Don’t worry, DSPy was built in a way that lets us do it without too much work.

DSPy.rb: a surgical rewrite of DSPy in modern, concurrent, type-safe Ruby

DSPy.rb is an idiomatic Ruby surgical port of Stanford's DSPy framework. While implementing the core concepts of signatures, predictors, and optimization from the original Python library, DSPy.rb embraces Ruby conventions and adds Ruby-specific innovations like CodeAct agents and enhanced production instrumentation.

Easy Dataset

Currently, various industries are actively exploring fine-tuning large models for their specific sectors. The fine-tuning process itself is not difficult, and there are many mature tools available in the market. The challenging part is the initial dataset preparation stage. The quality of the dataset directly determines the effectiveness of the model after fine-tuning. Building high-quality domain datasets consistently faces multiple challenges, and people generally encounter the following problems when building datasets:

🎥 Video

I Built an AI Tutor that can reason, search and execute code using DSPy framework (LIVE DEMO)

Join the Free Agentic AI Career Webinar ... | Channel: Interview Kickstart US

Vector & Graph (Hybrid) RAG with Tool Calling in DSPy

Combining Vector Search and Graph Retrieval with Kuzu In this episode, we delve deeper into the integration of vector search ... | Channel: Kùzu

🚀 Projects

DerwenAI/strwythura

Construct knowledge graphs from unstructured data sources, use graph algorithms for enhanced GraphRAG with a DSPy-based chat bot locally, and curate semantics for optimizing AI app outcomes within a specific domain. | Language: Jupyter Notebook | License: MIT License

Scale3-Labs/aisdk-prompt-optimizer

A tool kit for generating high quality prompts for AISDK using DSPy GEPA optimizer

evalops/founder-email-optimizer

DSPy-powered email optimization for startup founders: drop in your 3 best emails, get optimized outreach for new leads | Language: Python