dspy

Build declarative language model programs with DSPy optimizers and metrics.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers move beyond manual prompt engineering by enabling declarative language model programming, automatic prompt optimization, and modular AI workflow construction.

Core Features & Use Cases

  • Declarative LM Programming: Build reusable AI pipelines with signatures, modules, and composable language model components.
  • Prompt Optimization and Evaluation: Improve prompts and model behavior using DSPy optimizers, metrics, and training examples.
  • Use Case: Build optimized RAG applications, tool-using agents, classifiers, or multi-stage AI systems that improve systematically from evaluation data.

Quick Start

Use the dspy skill to design and optimize a RAG pipeline with DSPy modules and evaluation metrics.

Frequently Asked Questions about dspy

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

FAQPage Schema
What is declarative language model programming for prompt optimization?

Declarative language model programming builds modular AI pipelines using signatures and composable components to optimize prompts automatically. It replaces manual prompt engineering with data-driven methods, improving model behavior systematically using evaluation metrics and training examples.

How do I optimize LLM prompts automatically using evaluation data?

You optimize LLM prompts automatically by configuring optimizers with metrics and training examples. This evaluation-driven approach systematically improves model behavior for RAG systems, classifiers, and multi-stage pipelines without manual prompt tuning.

Can I build multi-stage AI agents with tool-using capabilities?

Yes, you can build multi-stage AI agents with tool-using capabilities. Declarative programming supports composable modules, allowing you to construct modular workflows and pipelines that integrate tool usage and multi-stage processing.

What is the best way to move beyond manual prompt engineering for RAG applications?

The best way to move beyond manual prompt engineering for RAG applications is using data-driven optimization. Declarative programming applies optimizers and metrics to systematically improve RAG pipelines from evaluation data rather than manual adjustments.

Do I need language model provider integration to optimize AI workflows?

Yes, language model provider integration is required to optimize AI workflows. Configuring provider integration enables modular programming, optimizer configuration, and metric-driven improvement workflows to function across your LLM application development.

When should I not use data-driven prompt optimization for language models?

You should avoid data-driven prompt optimization when lacking evaluation data or clear metrics. Without training examples to feed optimizers, the modular programming approach cannot systematically improve prompts or validate model behavior improvements.