DSPyWeekly Issue No #6

Published on October 10, 2025

📚 Articles

Thoughts on AI Engineering - Karthik

"Some thoughts related to AI engineering - Prompt Engineering: Writing, versioning and maintaining prompts for pushing model behaviour and swapping models seamlessly. Prompt optimization seems to be the answer to this. OpenAI is starting to scratch the surface on this. @DSPyOSS" / X

DSPyBook.com - Building AI Applications using Python and DSPy

I (Ankur, curator of DSPyWeekly) have started writing a book on DSPy 🚀 titled - Building AI Applications using Python and DSPy. This is an early release, with the first chapter now out and free for everyone to read! You can check it out here — https://dspyweekly.com/static/free-chapter.pdf , and I’d love to hear your thoughts. Just reply to this email with your feedback. I’m also looking for a few reviewers for the book — if you’re interested, just send me a quick hi 👋

Prompt optimization can enable AI control research — LessWrong

The article "Prompt Optimization Can Enable AI Control Research" on LessWrong website showcases how automated prompt optimization can significantly advance AI safety research. The authors' primary purpose is to demonstrate that this automated approach is more efficient and effective than manual prompt engineering for creating robust AI control mechanisms. To prove this, they utilized the DSPy library to build and refine a "suspicion monitor," an AI designed to detect malicious code. Specifically, they employed DSPy's ChainOfThought to elicit reasoning from the monitor, its GEPA optimizer to evolve and improve the prompt using a genetic algorithm, and the BootstrapFinetune optimizer to further enhance performance by fine-tuning the model's weights. This multi-stage optimization process with DSPy resulted in a significantly more effective and safer monitor, highlighting the potential of such automated techniques in the field of AI control.

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

Simon talking about Drew Breuing's talk on DSPy that helped him ( and many others I assure you ) to understand DSPy.

Paper: Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models

ACE (Agentic Context Engineering) is a framework for improving LLM applications by treating context as an evolving playbook, refined through generation, reflection, and curation. Unlike prior methods that suffer from brevity bias and context collapse, ACE uses structured, incremental updates to preserve detailed knowledge and scale with long-context models. It boosts performance across domains—+10.6% on agents, +8.6% on finance—while reducing latency and cost. ACE works without labeled data, using execution feedback instead, and matches or exceeds top benchmarks with smaller open-source models, enabling scalable, efficient, and self-improving LLM systems.

🎥 Video

Quick video on DSPy port in typescript

Ryan Carson on X: "Made a quick video for y'all on how I'm using @DSPyOSS (via the Typescript port created by @dosco) to programmatically manage and improve my agent prompts. The idea behind this is ... "Stop tweaking prompts. Define inputs → outputs. The framework generates optimal prompts https://t.co/KKQyKxsnOG" / X

DSPy Justification Reel

Good short youtube reel convincing why one should use DSPy.

Upcoming Arabic Talk on DSPy

Will go live on Oct 10th.

Building Reliable AI Agents for Publishing: A DSPy-Based Quality Assurance Framework

Recorded at PyCon DE & PyData 2025, April 23, 2025 https://2025.pycon.de/program/F7RDPT/ A comprehensive framework ... | Channel: PyData

🚀 Projects

kp27302/DSPy-GEPA-BI

Language: Python | License: MIT License

bsmith925/dspy-dataset

dspy sorely lacks a Dataset type | Language: Python

💼 Jobs

Internship Alert: DsPY-like prompt optimizer for Kotlin at JetBrains

As part of this internship, your task will be to study how the MIPRO optimizer works, implement a similar system in Kotlin, and design its integration into the Koog framework.