If you're tired of manually tuning prompts or building fragile LM pipelines, DSPy from Stanford NLP gives you a declarative framework that optimizes them automatically. You define signatures (inputs to outputs), compose modules like ChainOfThought or ReAct, then run optimizers like BootstrapFewShot to improve performance using your training data. It's designed for complex systems like RAG pipelines, multi-hop reasoning, or agents where you need reliability and maintainability. The learning curve is real, but once you get past the abstraction layer, you stop writing brittle prompt strings and start building systems that actually improve themselves. Worth it if you're building production AI workflows that need to scale beyond one-off prompts.

skills.sh installs
1K
GitHub stars
14.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill dspy --agent claude-code

Installs into .claude/skills of the current project.

Files

DSPy: Declarative Language Model Programming

When to Use This Skill

Use DSPy when you need to:

  • Build complex AI systems with multiple components and workflows
  • Program LMs declaratively instead of manual prompt engineering
  • Optimize prompts automatically using data-driven methods
  • Create modular AI pipelines that are maintainable and portable
  • Improve model outputs systematically with optimizers
  • Build RAG systems, agents, or classifiers with better reliability

GitHub Stars: 22,000+ | Created By: Stanford NLP

Installation

# Stable release
pip install dspy

# Latest development version
pip install git+https://github.com/stanfordnlp/dspy.git

# With specific LM providers
pip install dspy[openai]        # OpenAI
pip install dspy[anthropic]     # Anthropic Claude
pip install dspy[all]           # All providers

Quick Start

Basic Example: Question Answering

import dspy

# Configure your language model
lm = dspy.Claude(model="claude-sonnet-4-5-20250929")
dspy.settings.configure(lm=lm)

Sponsors

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
DevOps & CI/CD, AI & Agent Building, Data Science & ML
First seen
Jun 3, 2026

More from orchestra-research/ai-research-skills

All 95
1jezweb avatardesign-loopjezweb/claude-skillsAutonomous multi-page site builder using a baton-passing loop. Each iteration reads a task from .design/next-prompt.md, generates a page in HTML/Tailwind, integ1Kskills.sh installs
2railwayapp avatardeploymentrailwayapp/railway-skillsThis skill should be used when the user wants to manage Railway deployments, view logs, or debug issues. Covers deployment lifecycle (remove, stop, redeploy, re1Kskills.sh installs
3sbroenne avatarexcel-clisbroenne/mcp-server-excelExcel CLI automation skill for Windows workbooks. Use when a coding agent needs token-efficient, scriptable, or unattended Excel automation via excelcli command1Kskills.sh installs
4inference-sh avatarexplainer-video-guideinference-sh/skillsExplainer video production guide: scripting, voiceover, visuals, and assembly. Covers script formulas, pacing rules, scene planning, and multi-tool pipelines. U1Kskills.sh installs
5jwynia avatargodot-asset-generatorjwynia/agent-skillsGenerate game assets using AI image generation APIs (DALL-E, Replicate, fal.ai) and prepare them for Godot. Covers the full art pipeline from concept art and st1Kskills.sh installs
6orchestra-research avatarguidanceorchestra-research/ai-research-skillsControl LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance -1Kskills.sh installs