dspy

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

3|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/ihatesea69/HieuNghi-AI-Skills --skill dspy-ihatesea69
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/ihatesea69/HieuNghi-AI-Skills/tree/main/airesearch_skills/16-prompt-engineering/dspy
Command: npx skills add https://github.com/ihatesea69/HieuNghi-AI-Skills --skill dspy-ihatesea69

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 LM Programming: Define AI tasks using signatures and modules instead of manual prompt engineering.
  • Automatic Prompt Optimization: Improve LM performance systematically using data-driven optimizers.
  • Modular AI Pipelines: Build maintainable and portable AI systems with reusable components.
  • Use Case: Develop a question-answering system that retrieves information from a knowledge base, reasons over it, and provides a concise answer, all while automatically optimizing the prompts for better accuracy.

Quick Start

Use the dspy skill to build a basic question-answering system by configuring an LM and defining a simple signature.

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 pipelines without manual prompt engineering?

You can build modular AI pipelines by using declarative programming to define tasks with signatures and modules, replacing manual prompt engineering with systematic LM programming.

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

The best way to automatically optimize prompts is by applying data-driven optimizers that systematically improve large language model outputs and enhance overall performance.

How do I create a question-answering system that retrieves information and reasons over a knowledge base?

To create a question-answering system, use modular RAG systems and agents to retrieve information from a knowledge base, reason over it, and provide concise answers.

Does declarative LM programming work for building complex agents and RAG systems?

Yes, declarative LM programming effectively builds complex agents and RAG systems by allowing developers to define AI tasks using signatures and reusable modular components.

Do I need Python and the dspy library to develop automatic prompt optimization systems?

Yes, you need Python and the dspy library installed in your environment to develop automatic prompt optimization systems and implement declarative LM programming.