dspy

Build AI pipelines by declaratively programming LM workflows with typed signatures.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

DSPy enables researchers and developers to build complex AI pipelines by declaratively programming LM workflows.

Core Features & Use Cases

  • Declarative task composition using signatures to enforce structure and promote reuse across projects.
  • Built-in optimizers and teleprompters (BootstrapFewShot, MIPRO, COPRO) to improve prompts and outputs with data.
  • Support for RAG, ReAct, and multi-stage pipelines for robust AI workflows across experimentation, tooling, and production.

Quick Start

Install DSPy, create a minimal Predict module, and run a quick QA example to verify the workflow.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I build modular LM pipelines for RAG and agents?

You can build modular LM pipelines by declaratively programming workflows using typed signatures, enabling reusable composition for RAG, agents, and classifiers across diverse tasks without manual prompt engineering.

What is declarative LM programming and how does it structure AI workflows?

Declarative LM programming structures AI workflows by enforcing typed signatures to define task inputs and outputs, promoting modularity and reuse across experimentation, tooling, and production environments for complex pipelines.

How do I optimize prompts automatically using training data?

You optimize prompts automatically by applying built-in teleprompters like BootstrapFewShot, MIPRO, and COPRO, which use data to improve prompts and outputs within your multi-stage reasoning pipelines.

Can I compose multi-stage reasoning and retrieval pipelines without manual prompt tuning?

Yes, you can compose multi-stage reasoning and retrieval pipelines using modular composition with signatures and optional teleprompters, supporting robust AI workflows like ReAct without manual prompt tuning.

Does declarative LM programming work for both experimentation and production environments?

Declarative LM programming supports both experimentation and production environments by providing reusable patterns, modular composition, and built-in optimizers to maintain robust AI workflows across diverse deployment contexts.

Why should I use typed signatures instead of manual prompt engineering for LM apps?

Typed signatures replace manual prompt engineering by enforcing structure that promotes reuse across projects, allowing built-in optimizers to systematically improve prompts and outputs with data rather than relying on fragile manual tuning.