dspy

Program language models declaratively and optimize prompts automatically.

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

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 manual, brittle prompt engineering by providing a framework to program language models declaratively and optimize them automatically using data-driven methods.

Core Features & Use Cases

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

Quick Start

Use the dspy skill to configure your 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 optimize LLM prompts automatically instead of manual tuning?

Declarative language model programming allows you to define AI tasks using input-output signatures rather than hard-coded prompts. This approach shifts control from brittle manual prompt engineering to systematic, modular pipeline construction that remains portable across different models.

Can I build modular RAG systems and agentic workflows without hard-coded prompts?

Yes, you can build modular RAG systems and agentic workflows by defining declarative input-output signatures instead of hard-coded prompts. This framework facilitates constructing maintainable, multi-stage AI pipelines that remain portable across different language model providers.

Do I need training datasets to perform automatic prompt optimization?

Yes, training datasets are required to perform systematic automatic prompt optimization. Data-driven optimizers like MIPRO and BootstrapFewShot leverage your training data to evaluate and iteratively refine prompt quality for language model tasks.

What is the best way to make AI pipelines portable across different language model providers?

The best way to make AI pipelines portable across different language model providers is using declarative programming with input-output signatures. This approach decouples pipeline logic from specific providers, requiring only integration with APIs like OpenAI and Anthropic to switch underlying models.