dspy

Define typed signatures and compose pipelines with the DSPy framework.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Declarative LM programming solves the complexity of building complex AI systems by defining tasks as composable signatures instead of hard-coded prompts.

Core Features & Use Cases

  • Declarative LM programming: define tasks as signatures with typed inputs and outputs to compose reliable pipelines.
  • Automatic prompt optimization: leverage teleprompters like BootstrapFewShot and MIPRO to improve prompts from data.
  • Modular AI pipelines: build RAG systems, ReAct-style agents, and multi-stage workflows from reusable components.
  • Real-world workflows: create end-to-end systems that integrate retrieval, reasoning, and generation with safety guards and evaluation loops.

Quick Start

Try a minimal DSPy example by defining a simple signature and a Predict module to answer a question.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I build declarative AI pipelines without hard-coding prompts?

Declarative LM programming builds AI pipelines by defining tasks as composable signatures with typed inputs and outputs. This modular approach replaces ad-hoc prompts with reliable, reusable components for complex workflows.

What is the best way to optimize prompts automatically in language model applications?

Automatic prompt optimization uses teleprompters like BootstrapFewShot and MIPRO to improve prompts from data. This technique systematically refines language model instructions within declarative pipelines.

Can I build RAG systems and agents using declarative programming techniques?

Yes, declarative LM programming constructs RAG systems, ReAct-style agents, and multi-stage workflows from modular components. These systems integrate retrieval, reasoning, and generation with safety guards.

Does declarative LM programming work with OpenAI and Anthropic providers?

Declarative LM programming requires the DSPy framework and works with providers like OpenAI and Anthropic. It enforces type-safe interfaces across these language model providers.

Why should I use type-safe signatures for multi-stage language model workflows?

Type-safe signatures ensure modular composition and reliable interfaces for multi-stage language model pipelines. This declarative approach enables rapid construction of robust AI systems for research and production.

When do I need teleprompter-based optimization for AI pipelines?

Teleprompter-based optimization is needed when building complex AI systems that require automated prompt refinement from data. It improves reliability in declarative pipelines handling routing and evaluation loops.