dspy

Build declarative AI pipelines for language model tasks using Python and dspy.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/VYRE-Studios/Windows-Agentic-Framework --skill dspy-vyre-studios
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/VYRE-Studios/Windows-Agentic-Framework/tree/main/skills/mlops/research/dspy
Command: npx skills add https://github.com/VYRE-Studios/Windows-Agentic-Framework --skill dspy-vyre-studios

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

The dspy skill lets developers build complex AI systems—RAG pipelines, agents, and prompt‑optimized models—without hand‑crafting prompts, reducing trial‑and‑error and improving reliability.

Core Features & Use Cases

  • Declarative programming: Define signatures and modules instead of writing raw prompts.
  • Automatic prompt optimization: Use built‑in optimizers (BootstrapFewShot, MIPRO) to generate effective few‑shot demos.
  • Modular pipelines: Combine Retrieve, ChainOfThought, ReAct, ProgramOfThought for RAG, agents, classification, and more.
  • Use case example: Quickly create a retrieval‑augmented generation system that searches a vector store and answers queries with self‑consistency.

Quick Start

Ask the dspy skill to build a RAG pipeline that answers questions about your knowledge base.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I build a RAG pipeline without hand-crafting prompts?

You can build a retrieval-augmented generation pipeline declaratively by defining signatures and combining modules like Retrieve and ChainOfThought, letting built-in optimizers automatically generate the prompts.

What is automatic prompt optimization and how does it work?

Automatic prompt optimization uses built-in teleprompters like BootstrapFewShot and MIPRO to generate effective few-shot demos, replacing manual trial-and-error with programmatic prompt refinement.

Can I use OpenAI and Anthropic models with declarative AI pipelines?

Yes, declarative AI pipelines support provider integrations for OpenAI and Anthropic, requiring only Python and the dspy library to route tasks to your chosen language model.

What is the best way to create multi-step agents for complex tasks?

The best way to create multi-step agents is by combining modular components like ReAct and ProgramOfThought, which handle complex reasoning steps without requiring raw prompt engineering.

Do I need raw prompt engineering experience to optimize language models?

No, you do not need raw prompt engineering experience. You define task signatures and let built-in optimizers handle prompt generation and refinement across research and production workflows.

When should I use a declarative approach over manual prompt writing?

Use a declarative approach when building reliable AI systems like RAG or agents to reduce trial-and-error, as it replaces fragile hand-crafted prompts with modular, optimizable pipelines.