skills/dspy/SKILL.md
Programming (not prompting) framework for building and optimizing LLM pipelines with declarative Python modules, typed signatures, and automatic prompt/weight optimization. MANDATORY TRIGGERS: dspy, dspy.Predict, dspy.ChainOfThought, dspy.ReAct, dspy.Signature, dspy.Module, dspy.Optimize, BootstrapFewShot, MIPRO, MIPROv2, dspy.Evaluate, dspy.Retrieve, dspy compile, dspy optimizer. Also trigger when user wants to replace hand-written prompts with structured modules, automatically tune few-shot examples, build typed LLM pipelines with assertions, optimize a pipeline against a metric, compile a DSPy program, or build multi-hop RAG with declarative modules. When in doubt about whether to use this skill for any DSPy or LLM-pipeline-compiling task, use it.
npx skillsauth add abhisheksharma-17/skills-graph dspyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Program — don't prompt — foundation models. DSPy lets you define LLM pipelines as typed Python modules with declarative
Signatures, then compile (optimize) them against a metric using optimizers likeBootstrapFewShotandMIPROv2.
Source: dspy.ai | Python: v2.5.x | License: MIT | GitHub: stanfordnlp/dspy
| Reference | File | Read When |
|-----------|------|-----------|
| Overview & Quickstart | references/00-overview.md | First install, core concepts, dspy.configure, the compile loop |
| Signatures | references/01-signatures.md | Inline "q -> a" strings, class-based signatures, InputField/OutputField, typed fields |
| Modules (Predict, CoT, ReAct, PoT) | references/02-modules.md | dspy.Predict, ChainOfThought, ReAct, ProgramOfThought, composing dspy.Module |
| LM Configuration | references/03-lm-configuration.md | dspy.LM, providers (OpenAI, Anthropic, Ollama, vLLM), caching, temperature, context settings |
| Optimizers (Compilers) | references/04-optimizers.md | BootstrapFewShot, BootstrapFewShotWithRandomSearch, MIPROv2, COPRO, BootstrapFinetune |
| Metrics & Evaluation | references/05-metrics-evaluation.md | Writing metric functions, dspy.Evaluate, answer-exact-match, LLM-as-judge metrics |
| Retrieval & RAG | references/06-rag-retrieval.md | dspy.Retrieve, ColBERTv2, Qdrant/Chroma/Weaviate integrations, multi-hop RAG patterns |
| Assertions & Suggestions | references/07-assertions.md | dspy.Assert, dspy.Suggest, self-refinement loops, constraint-driven retries |
| Deployment & Production | references/08-deployment.md | Saving/loading compiled programs, streaming, async, FastAPI serving, observability |
# SDK
pip install dspy
# With optional integrations
pip install 'dspy[anthropic]'
pip install 'dspy[qdrant]'
pip install 'dspy[chromadb]'
development
High-throughput LLM inference and serving engine with PagedAttention, continuous batching, and OpenAI-compatible API. MANDATORY TRIGGERS: vLLM, vllm, LLM serving, LLM inference engine, PagedAttention. Also trigger when the user wants to serve LLMs in production, deploy models with tensor parallelism, use speculative decoding, quantize models for inference, build OpenAI-compatible API servers, or optimize LLM throughput and latency. When in doubt about whether to use this skill for LLM serving tasks, use it.
tools
Type-safe Python agent framework for building production-grade GenAI applications with Pydantic validation, structured outputs, and dependency injection. MANDATORY TRIGGERS: pydantic-ai, pydantic_ai, PydanticAI, pydantic ai agent. Also trigger when the user wants to build type-safe AI agents in Python, create structured LLM outputs with Pydantic models, implement dependency injection for agents, use tools/capabilities with LLMs, or build multi-agent systems with Python type safety. When in doubt about whether to use this skill for Python AI agent tasks, use it.
development
Durable execution platform for building fault-tolerant workflows, long-running processes, and resilient distributed applications. MANDATORY TRIGGERS: temporal, temporal.io, temporalio, durable execution, workflow orchestration engine. Also trigger when the user wants to build fault-tolerant workflows, implement saga patterns, create long-running distributed processes, orchestrate microservices with retries and timeouts, or build durable AI agent pipelines. When in doubt about whether to use this skill for workflow orchestration or durable execution tasks, use it.
tools
AI framework for building RAG pipelines, agents, workflows, and data-augmented LLM applications with 300+ integrations. MANDATORY TRIGGERS: llamaindex, llama-index, llama_index, LlamaIndex, VectorStoreIndex, SimpleDirectoryReader, LlamaHub, LlamaParse. Also trigger when the user wants to build RAG applications with LlamaIndex, create document indexing pipelines, build agentic workflows with tool calling, implement structured data extraction from documents, or connect LLMs to custom data sources. When in doubt about whether to use this skill for RAG, document indexing, or LLM data augmentation tasks, use it.