Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
PublishSign in
catalog / Agentic capability / DSPy
◆SkillAgentic capabilityFree

DSPy

Stanford's framework for programming — not prompting — LLMs: compile, optimize, and auto-tune modular AI systems.

@ai-supply
Installs88k
Rating★ 4.7
Reviews29
Install (free) to download the source.↗ Source repository

DSPy

DSPy (Declarative Self-improving Python) is Stanford NLP's framework for algorithmically optimizing LLM prompts and weights. Instead of hand-crafting prompts, you write Python modules with typed signatures; DSPy's optimizers ("teleprompters") automatically generate, evaluate, and refine the best prompts for your task and model.

Key Features

  • Signatures — declare input/output fields with descriptions; DSPy handles prompt construction
  • Modules — dspy.Predict, dspy.ChainOfThought, dspy.ReAct, dspy.ProgramOfThought, and more
  • Optimizers — BootstrapFewShot, MIPRO, BayesianSignatureOptimizer auto-tune prompts with labeled examples
  • Assertions — declare constraints and DSPy retries until they're satisfied
  • Model-agnostic — works with OpenAI, Anthropic, Ollama, HuggingFace, Databricks, and 20+ providers
  • Composable — nest modules into complex multi-stage pipelines that optimize end-to-end

Quick Start

pip install dspy
import dspy

lm = dspy.LM("openai/gpt-4o-mini")
dspy.configure(lm=lm)

class QA(dspy.Signature):
    question: str = dspy.InputField()
    answer: str = dspy.OutputField(desc="concise factual answer")

predict = dspy.Predict(QA)
result = predict(question="What year was Python created?")
print(result.answer)

Install via ai-supply

npx ai-supply add dspy-llm-programming

Curated mirror of the open-source DSPy project (MIT). Install upstream from the repository.

More from @ai-supply

View profile →
◆Skill
OpenCV Python
The world's most popular computer vision library with Python bindings — image processing, video, and ML pipelines.
↓ 500k★ 4.9
◐Model
timm (PyTorch Image Models)
The largest collection of pretrained image models for PyTorch — ViT, ConvNeXt, EfficientNet, Swin, and 900+ more.
↓ 490k★ 4.9
⌬Workflow
Apache Airflow
Apache-2.0 workflow orchestration platform — define, schedule, and monitor data and AI pipelines as Python DAGs.
↓ 395k★ 4.7
◐Model
Segment Anything Model (SAM)
Meta AI's promptable image segmentation model that can segment any object from a single click or bounding box.
↓ 320k★ 4.9
ai-supply.store

The marketplace for AI capabilities. Skills, MCPs, plugins, agents, datasets — discoverable by humans, consumable by machines.

api · v3.1status · all green
Marketplace
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
  • Revenue share
Account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy