dspy

Compile declarative language model calls into self-improving pipelines.

Updated May 3, 2026
One-click install
npx skills add https://github.com/eliottbusiness/DeptFlow-Agent --skill dspy-eliottbusiness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/eliottbusiness/DeptFlow-Agent/tree/main/profile/skills/mlops/research/dspy
Command: npx skills add https://github.com/eliottbusiness/DeptFlow-Agent --skill dspy-eliottbusiness

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill unit simplifies the development of complex AI systems, enabling declarative programming, automatic prompt optimization, and modular AI pipelines.

Core Features & Use Cases

  • Declarative LM Programming: Build AI systems by defining the desired outcome, rather than manually crafting prompts.
  • Prompt Optimization: Automatically optimize prompts for better model performance.
  • Modular AI Pipelines: Create maintainable and portable AI workflows.
  • Use Case: Develop a RAG system that retrieves relevant documents and generates answers based on those documents.

Quick Start

Use the dspy skill to create a QA system that answers questions by retrieving information from a specific context.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I build modular AI pipelines without manually writing prompts?

Declarative programming compiles language model calls into self-improving pipelines by defining desired outcomes rather than prompts. This approach enables modular AI development and automatically optimizes prompts for better model performance.

What's the best way to automatically optimize prompts for large language models?

Automatic prompt optimization is achieved by compiling declarative language model calls into self-improving pipelines. This mechanism optimizes prompts for better model performance and supports various LM providers like OpenAI and Anthropic.

Can I use OpenAI and Anthropic models with declarative LM programming?

Yes, declarative LM programming supports various LM providers including OpenAI and Anthropic. It requires the dspy, openai, and anthropic dependencies to function and enables modular AI pipelines across different models.

How do I create a RAG system that retrieves and generates answers from specific documents?

You can create a RAG system using declarative programming to define a QA workflow that retrieves relevant documents and generates answers based on specific context. This builds maintainable and portable AI pipelines.

Why use declarative programming instead of manual prompt engineering for AI systems?

Declarative programming simplifies complex AI system development by defining desired outcomes rather than manually crafting prompts. It enables automatic prompt optimization and creates maintainable, portable AI workflows.