dspy

Program LLMs declaratively with DSPy signatures and automatic prompt optimization.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/helix4u/hermes-agent-private --skill dspy-helix4u
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/helix4u/hermes-agent-private/tree/main/skills/mlops/dspy
Command: npx skills add https://github.com/helix4u/hermes-agent-private --skill dspy-helix4u

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the development of complex AI systems by enabling declarative programming, automatic prompt optimization, and modular RAG systems and agents, moving beyond manual prompt engineering.

Core Features & Use Cases

  • Declarative LM Programming: Define AI tasks using signatures (input/output schemas) instead of writing complex prompts.
  • Automatic Prompt Optimization: DSPy's optimizers (teleprompters) systematically improve prompts and LM calls using your data.
  • Modular AI Pipelines: Build reusable components for RAG, agents, classification, and more.
  • Use Case: Develop a customer support chatbot that can understand user intent, retrieve relevant documentation, and generate helpful responses, all while automatically optimizing its performance over time.

Quick Start

Use the dspy skill to build a question-answering system by defining a signature and using a DSPy module.

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 for LLM applications?

Automate prompt optimization by using declarative programming to define input and output schemas, allowing DSPy optimizers to systematically improve prompts using your data. This replaces manual prompt engineering with automated tuning.

What is declarative programming for large language models?

Declarative LLM programming involves defining AI tasks using signatures or schemas instead of writing complex manual prompts. This approach simplifies development by focusing on inputs and outputs rather than intricate prompt phrasing.

How do I build modular AI pipelines for RAG and agents?

Build modular AI pipelines by creating reusable components for retrieval-augmented generation and agent development using declarative signatures. These components can be systematically assembled and optimized for complex tasks like customer support.

Can I use declarative AI programming for classification tasks?

Yes, declarative AI programming supports classification tasks by allowing you to define input and output schemas for categorization. Optimizers can then automatically tune the underlying prompts to improve classification accuracy.

Do I need specific LLM providers to use declarative AI frameworks?

You need compatible LLM providers and the DSPy Python library installed to execute declarative AI programs. The framework systematically programs the models through these external providers.

Why should I move away from manual prompt engineering?

Manual prompt engineering becomes difficult to scale and maintain for complex AI systems. Declarative programming solves this by using optimizers to automatically tune prompts, improving modularity and performance over time.