dspy

Program language models declaratively and optimize prompts with dspy.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill allows you to build complex AI systems using declarative programming, optimize prompts automatically, and create modular RAG systems and agents. It streamlines the process of creating AI-powered applications.

Core Features & Use Cases

  • Declarative Programming: Program LMs declaratively, avoiding manual prompt engineering.
  • Automatic Optimization: Optimize prompts using data-driven methods.
  • Modular AI: Create modular RAG systems and agents for maintainable and portable AI pipelines.
  • Use Case: Build a RAG system that retrieves relevant documents and generates coherent answers to questions about the content of those documents.

Quick Start

Use the dspy skill to create a simple question-answering module that retrieves information from a provided context and answers questions about it.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I build modular AI systems without manual prompt engineering?

Declarative programming for modular AI systems allows you to program language models declaratively, avoiding manual prompt engineering by defining modular pipelines. This streamlines creating complex AI-powered applications.

What's the best way to optimize prompts automatically for language models?

Automatic prompt optimization uses data-driven methods to improve language model performance. The framework systematically adjusts prompts to enhance model outputs and generates reasoning steps for better decision-making.

Do I need OpenAI and Anthropic dependencies to build RAG systems?

Yes, building RAG systems requires OpenAI and Anthropic dependencies for specific language model functionality. These associated dependencies provide the underlying LM APIs for retrieving documents and generating coherent answers.

How do I create a modular RAG system for question answering?

Creating a modular RAG system involves building a question-answering module that retrieves relevant documents from provided context and generates coherent answers. This approach ensures maintainable and portable AI pipelines.

Does declarative LM programming work with existing AI pipelines?

Declarative LM programming integrates with existing AI pipelines by creating modular agents and components. This approach ensures maintainability and portability across complex AI-powered applications without manual prompt adjustments.