dspy

Develop AI systems with declarative programming and automatic prompt optimization in DSPy.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill simplifies the development of complex AI systems by enabling declarative programming for Large Language Models (LLMs), automating prompt optimization, and facilitating the creation of modular AI pipelines.

Core Features & Use Cases

  • Declarative LM Programming: Define AI tasks using signatures and modules, abstracting away manual prompt engineering.
  • Automatic Prompt Optimization: Improve LM performance systematically using data-driven optimizers.
  • Modular RAG and Agents: Build reusable components for Retrieval-Augmented Generation and agentic systems.
  • Use Case: Develop a customer support chatbot that can understand user queries, retrieve relevant information from a knowledge base, and generate accurate, context-aware responses, all while continuously improving its performance through DSPy's optimization features.

Quick Start

Use the dspy skill to build a basic question-answering system by defining a signature and a Predict 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 large language models?

Automate prompt optimization by using DSPy's data-driven optimizers to systematically improve large language model performance. This declarative framework replaces manual prompt engineering with programmatic signature definitions and modular pipelines.

What is declarative AI programming and how does it work?

Declarative AI programming abstracts manual prompt engineering by defining tasks using signatures and modules. It allows developers to build complex pipelines by specifying what the AI should do rather than manually crafting instructions for the model.

How do I build a retrieval augmented generation pipeline with DSPy?

Build a retrieval augmented generation pipeline by utilizing DSPy's modular components to retrieve relevant information and generate context-aware responses. Define signatures for your tasks and assemble reusable modules to structure the RAG system.

Do I need OpenAI or Anthropic to use this declarative AI framework?

Yes, integrating with large language model providers like OpenAI or Anthropic is required to use this declarative AI framework. You must connect a provider to supply the underlying language model capabilities for the pipelines.

Does DSPy support building modular AI agents?

Yes, DSPy supports building modular AI agents by providing reusable components for agentic systems. You can assemble these modules to create agents that understand queries, retrieve information, and generate accurate context-aware responses.