dspy

Compile declarative language model calls into self-improving pipelines with automated optimization.

1|Updated Jul 31, 2026
One-click install
npx skills add https://github.com/icyzh/hermes-web --skill dspy-icyzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/icyzh/hermes-web/tree/main/optional-skills/mlops/research/dspy
Command: npx skills add https://github.com/icyzh/hermes-web --skill dspy-icyzh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill solves the challenge of brittle, manual prompt engineering by providing a framework to program language models declaratively, allowing for systematic, data-driven optimization of AI pipelines.

Core Features & Use Cases

  • Declarative LM Programming: Define AI tasks using signatures (input/output structures) rather than raw prompt strings.
  • Automatic Prompt Optimization: Use built-in optimizers like BootstrapFewShot and MIPRO to iteratively improve prompt quality based on your specific training data.
  • Modular AI Pipelines: Build maintainable, complex systems like RAG, agents, and multi-stage classifiers that are portable across different language models.

Quick Start

Use the dspy skill to configure a language model and optimize a question-answering module using your provided training dataset.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I automate prompt optimization instead of manual prompt engineering?

Automated prompt optimization replaces manual prompt engineering by using optimizers like BootstrapFewShot to iteratively compile declarative language model calls into self-improving pipelines based on training data.

How does declarative LM programming work for building AI pipelines?

Declarative LM programming works by defining AI tasks using input and output signatures rather than raw prompt strings, enabling the creation of modular and maintainable pipelines for complex workflows.

Can I build RAG and agentic reasoning workflows that are portable across different LLM providers?

Yes, you can build portable RAG and agentic reasoning workflows across various LLM providers by defining modular AI pipelines that integrate with openai and anthropic libraries.

What is the best way to optimize a question-answering module using my own dataset?

The best way to optimize a question-answering module is to configure a language model and use teleprompter-based tuning with your provided training dataset to systematically improve prompt quality.

Do I need specific libraries to execute modular AI programs and teleprompter-based tuning?

Yes, executing modular AI programs and teleprompter-based tuning requires integration with dspy, openai, and anthropic libraries to function properly.

Why does manual prompt engineering become brittle for complex multi-stage classifiers?

Manual prompt engineering becomes brittle because it lacks systematic data-driven optimization, making it difficult to maintain complex multi-stage classifiers and agentic reasoning workflows.