dspy

Program language model calls declaratively with DSPy for automatic prompt optimization.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/choice5346/BiSHE --skill dspy-choice5346
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/choice5346/BiSHE/tree/main/.github/skills/dspy
Command: npx skills add https://github.com/choice5346/BiSHE --skill dspy-choice5346

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the creation of complex AI systems by enabling declarative programming, automatic prompt optimization, and modular RAG systems and agents.

Core Features & Use Cases

  • Declarative Programming: Define AI tasks using signatures instead of manual prompt engineering.
  • Automatic Optimization: Improve prompts and model performance systematically using data-driven methods.
  • Modular Design: Build reusable components for RAG, agents, and complex pipelines.
  • Use Case: Develop a sophisticated question-answering system that can retrieve relevant documents, reason over them, and provide accurate answers, all while automatically optimizing its prompts for better performance.

Quick Start

Use the dspy skill to answer the question "What is the capital of France?" using the Claude Sonnet model.

Frequently Asked Questions about dspy

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

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

You can build complex AI systems declaratively using DSPy by defining tasks with signatures instead of manual prompt engineering. This framework facilitates modular RAG pipelines and agent development while replacing manual prompt tuning with systematic programming.

What is automatic prompt optimization and how does it work for LLM programming?

Automatic prompt optimization improves LLM calls systematically using data-driven methods. Instead of manually tweaking prompts, DSPy automatically optimizes them within your declarative pipelines to ensure structured output and better reasoning across complex AI tasks.

Can I use DSPy with OpenAI and Anthropic language models?

Yes, DSPy supports various LM providers including OpenAI and Anthropic. You can configure your declarative AI pipelines to route calls to models like Claude Sonnet for structured output, reasoning, and self-consistency tasks.

What is the best way to create a modular RAG system with reasoning capabilities?

The best way to create a modular RAG system is using declarative AI programming to define reusable components. DSPy facilitates building sophisticated question-answering pipelines that retrieve documents, reason over them, and automatically optimize prompts for accurate answers.

Do I need manual prompt engineering if I use declarative AI frameworks?

No, declarative AI frameworks replace manual prompt engineering with signature-based definitions. By leveraging DSPy, you achieve automatic prompt optimization and structured output, eliminating the need to manually write and adjust prompts for complex AI systems.