skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
zpankz/mcp-skillset7 installs

dspy

Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming. Use when you need to build complex AI systems, program LMs declaratively, optimize prompts automatically, create modular AI pipelines, or build RAG systems and agents.

How do I install this agent skill?

npx skills add https://github.com/zpankz/mcp-skillset --skill dspy
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubwarn

    This skill provides documentation and implementation examples for the DSPy framework. The analysis identified potential risks including dynamic Python code execution through the ProgramOfThought module, exposure of local development environment paths in multiple utility scripts, and an indirect prompt injection surface due to the ingestion of external medical curriculum data without sanitization.

  • Socketpass

    No alerts

  • Snykwarn

    Risk: MEDIUM · No issues

What does this agent skill do?

DSPy: Declarative Language Model Programming

Stanford NLP's framework for programming—not prompting—language models.

Quick Start

import dspy

# 1. Configure
dspy.settings.configure(lm=dspy.OpenAI(model='gpt-4o-mini'))

# 2. Define Module
qa = dspy.ChainOfThought("question -> answer")

# 3. Run
response = qa(question="What is the capital of France?")
print(response.answer)

Learning Path (DAG)

The DSPy framework follows a natural progression from core concepts through optimization to advanced applications. Use this directed acyclic graph to understand dependencies and navigate the skill components.

Foundation Layer (Start Here)

  1. Configuring Language Models

    • Prerequisites: None
    • Next: Signatures, Modules, Datasets
  2. Designing Signatures

    • Prerequisites: LM Configuration
    • Next: Modules, Optimization
  3. Building Modules

    • Prerequisites: Signatures
    • Next: Optimization, Applications
  4. Creating Datasets

    • Prerequisites: None
    • Next: Optimization

Optimization Layer

  1. Few-Shot Learning

    • Prerequisites: Modules, Datasets
    • Techniques: LabeledFewShot, BootstrapFewShot, KNNFewShot
    • Next: Applications
  2. Instruction Optimization

    • Prerequisites: Modules, Datasets
    • Techniques: COPRO, MIPROv2, GEPA
    • Next: Applications
  3. Finetuning Models

    • Prerequisites: Modules, Datasets
    • Techniques: BootstrapFinetune
    • Next: Applications
  4. Ensemble Strategies

    • Prerequisites: Multiple trained modules
    • Next: Applications

Application Layer

  1. Building RAG Pipelines

    • Prerequisites: Modules, Optimization (recommended)
  2. Evaluating Programs

    • Prerequisites: Modules, Datasets
  3. Integrating Haystack

    • Prerequisites: Modules, Haystack knowledge

Advanced Features (Cross-Cutting)

  1. Assertions & Validation

    • Prerequisites: Modules
  2. Typed Outputs

    • Prerequisites: Signatures
  3. Multi-Chain Comparison

    • Prerequisites: ChainOfThought module

Reference Documentation

Common Workflows

Workflow 1: Basic QA System

  1. Configure LM → Design Signature → Build Module
  2. Path: configuring-language-models.md → designing-signatures.md → building-modules.md

Workflow 2: Optimized RAG System

  1. Configure LM → Build RAG Module → Optimize with Few-Shot → Evaluate
  2. Path: configuring-language-models.md → building-rag-pipelines.md → few-shot-learning.md → evaluating-programs.md

Workflow 3: Production Agent

  1. Configure LM → Design Signature → Build ReAct Module → Add Assertions → Optimize Instructions → Evaluate
  2. Path: configuring-language-models.md → designing-signatures.md → building-modules.md → assertions-validation.md → instruction-optimization.md → evaluating-programs.md

Installation

pip install dspy
# Or with specific providers
pip install dspy[anthropic]  # Claude
pip install dspy[openai]     # GPT
pip install dspy[all]        # All providers

Additional Resources

  • Official Docs: dspy.ai
  • GitHub: github.com/stanfordnlp/dspy

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/zpankz/mcp-skillset/dspy">View dspy on skillZs</a>