dspy

Build declarative AI pipelines with automatic prompt optimization and retrieval-augmented generation.

Updated May 11, 2026
One-click install
npx skills add https://github.com/richardnguyen0715/keep-it-real --skill dspy-richardnguyen0715
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/richardnguyen0715/keep-it-real/tree/main/refer-projects/hermes-agent/skills/mlops/research/dspy
Command: npx skills add https://github.com/richardnguyen0715/keep-it-real --skill dspy-richardnguyen0715

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 solves the problem of complex AI system building with multiple components and workflows, offering declarative programming, prompt optimization, and retrieval-augmented generation capabilities.

Core Features & Use Cases

  • Declarative Programming: Build complex AI systems programmatically.
  • Prompt Optimization: Automate prompt optimization using data-driven methods.
  • RAG: Create modular AI pipelines that can use external data sources for better reasoning.
  • Use Case: Imagine you need to create a system that answers complex questions by retrieving information from various sources and generating coherent answers. This Skill can help you build such a system with minimal code.

Quick Start

Use the dspy skill to create a QA system that retrieves information from the web and generates answers.

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 my language model pipelines?

Automate prompt optimization by using declarative LM programming to build data-driven pipelines. This approach programmatically refines prompts and constructs modular AI systems without manual tuning.

What is declarative LM programming and when do I need it for AI system building?

Declarative LM programming is a method to build complex AI systems by defining logic programmatically rather than manually. Use it when constructing modular pipelines that require prompt optimization or retrieval-augmented generation.

How do I build retrieval-augmented generation workflows with external data sources?

Build retrieval-augmented generation workflows by defining modular AI pipelines declaratively. This allows your language model to retrieve information from external data sources and generate coherent answers with minimal code.

Do I need dspy and anthropic libraries to use declarative prompt optimization?

Yes, you need the dspy, openai, and anthropic libraries installed. These dependencies provide the foundational framework for declarative programming, prompt optimization, and retrieval-augmented generation.

What is the best way to programmatically construct modular AI pipelines for question answering?

The best way to construct modular AI pipelines is through declarative LM programming. This method allows you to build complex question-answering systems that retrieve information and generate coherent answers programmatically.

Can I use declarative programming to build RAG systems that query the web?

Yes, you can use declarative LM programming to create RAG systems. It enables you to build pipelines that retrieve information from sources like the web and generate coherent answers automatically.