dspy

Build declarative language model programs and optimize prompts with DSPy.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/Gitnapp/Skills --skill dspy-gitnapp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy
Source: https://github.com/Gitnapp/Skills/tree/main/mlops/research/dspy
Command: npx skills add https://github.com/Gitnapp/Skills --skill dspy-gitnapp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the challenge of manually designing, tuning, and maintaining complex language model workflows by enabling declarative AI programming and data-driven optimization.

Core Features & Use Cases

  • Declarative LM Programming: Build modular language model applications with signatures, reusable components, and structured inputs and outputs.
  • Prompt Optimization and RAG Workflows: Automatically improve prompts, few-shot examples, retrieval pipelines, and agent behaviors using DSPy optimizers.
  • Use Case: Build and optimize a retrieval-augmented generation system that improves answer quality through evaluation metrics and training examples instead of manual prompt iteration.

Quick Start

Use the dspy skill to create and optimize a language model pipeline for a question answering application with DSPy.

Frequently Asked Questions about dspy

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

FAQPage Schema
How do I optimize prompts automatically for language model pipelines?

You can optimize prompts automatically by building declarative LM programs and using DSPy optimizers to tune few-shot examples, retrieval pipelines, and agent behaviors based on evaluation metrics and training data instead of manual iteration.

What is declarative programming for AI agents and RAG systems?

Declarative programming for AI agents and RAG systems involves building modular language model applications using structured signatures and reusable components to define inputs and outputs without hardcoding procedural logic.

How do I build a maintainable multi-stage language model application?

You build maintainable multi-stage LM applications by defining structured signatures and reusable components, then applying optimization algorithms to systematically improve workflows rather than manually tuning prompts.

Do I need specific language model providers to use DSPy optimizers?

Yes, you need compatible language model providers and DSPy-based modules to create maintainable AI pipelines, along with optimization algorithms and evaluation metrics to drive automated prompt tuning.

What is the best way to improve RAG answer quality without manual prompt iteration?

The best way to improve RAG answer quality is applying DSPy optimizers that use evaluation metrics and training examples to automatically improve retrieval pipelines and generation behaviors, replacing manual prompt iteration.