dspy

Configure declarative LM workflows with automatic prompt optimization via teleprompters.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/AnandaAnugrahHandyanto/savarez_agent --skill dspy-anandaanugrahhandyanto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/AnandaAnugrahHandyanto/savarez_agent/tree/main/optional-skills/mlops/research/dspy
Command: npx skills add https://github.com/AnandaAnugrahHandyanto/savarez_agent --skill dspy-anandaanugrahhandyanto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dspy, openai, anthropic, and includes references (resource) components.

What problem does it solve?

Declarative LM programming and automated prompt optimization to reduce manual prompt engineering and accelerate building self-improving AI systems.

Core Features & Use Cases

  • Declarative LM pipelines: define tasks, signatures, and workflows that compose multiple LM calls with predictable behavior.
  • Auto-optimization & RAG support: leverage teleprompters to generate few-shot data and improve prompts automatically, with support for retrieval augmented generation and agents.
  • Production-grade modularity: reusable modules, typed outputs, and safe composition for complex AI systems.

Quick Start

Define a minimal DSPy module and run a basic prediction to see declarative prompts being self-optimized.

Frequently Asked Questions about dspy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate prompt optimization for multi-step LM pipelines?

Automate prompt optimization for multi-step LM pipelines by defining declarative workflows with teleprompters that generate few-shot data and refine prompts automatically. This reduces manual prompt engineering across composed LM calls.

What is declarative LM programming and when do I need it for RAG systems?

Declarative LM programming defines tasks, signatures, and workflows abstractly rather than writing explicit prompts. Use it for RAG systems and agents to ensure predictable behavior and safe module composition across diverse LM providers.

Can I build self-improving AI agents that work with both OpenAI and Anthropic providers?

Yes, you can build self-improving AI agents across diverse LM providers including OpenAI and Anthropic. The declarative architecture supports dependency management and extensible optimization loops for multi-provider agent workflows.

How do I set up a minimal declarative LM module for automatic prompt tuning?

Set up a minimal declarative LM module by defining a task signature and running a basic prediction. The teleprompter-based optimization loop automatically tunes the prompt, providing a quick start for self-improving pipelines.

Does automated prompt optimization replace manual prompt engineering for complex AI systems?

Automated prompt optimization reduces manual prompt engineering by using teleprompters to generate few-shot data and improve prompts automatically. It provides production-grade modularity with typed outputs for complex AI systems.