Program LLMs instead of prompting them, by Stanford.

What is DSPy?

DSPy is a framework from Stanford NLP for programming language models: define signatures and modules, then let optimisers tune prompts and weights automatically.

Developers and researchers who want reliable, optimised LLM programs

What you can do

  • Programs, not prompts — Compose LM calls as typed modules with clear inputs and outputs
  • Automatic optimisation — Teleprompters tune prompts and few-shot examples against metrics
  • Model agnostic — Works with OpenAI, Anthropic, local models and more
  • Research backed — From Stanford NLP, widely used in LLM research and production

Where it fits

Useful for

  • Reliable LLM programs
  • Automatic prompt optimization
  • Multi-hop question answering

Before you choose

  • A steeper learning curve than plain prompting

Capabilities

Text chat

Programs built with DSPy drive chat completions; no chat app itself.

File upload & analysis

Retrieve module works with retrieval models and vector DBs; RAG via LlamaIndex integration.

Web search

Retrieve module composes retrieval and language models for knowledge-intensive NLP.

Code generation & execution

ProgramOfThought uses code-based reasoning; developers write LLM programs in Python.

Reasoning & deep research

ChainOfThought and ReAct modules; optimizers tune programs against metrics; built-in evaluation.

Autonomous agent

ReAct module reasons and acts with tools; focus is program optimization, not multi-agent orchestration.

API access

Library framework; 100+ providers via LiteLLM; MLflow deployment.

Pricing & plans

Prices checked 11/25/2026

Open Source

$0

Building optimised LLM programs

  • Full framework, Apache-2.0 licensed
Plan details ↗

Official pricing ↗

Explore similar tools

OpenRouter

AI Dev Platforms

A single key calls hundreds of models, real-time price and availability comparison, supports automatic failover and cost-based routing, unified billing, suitable for multi-model access and backup solutions, and some smal…

Free / FreemiumWeb · API
14

Hugging Face

AI Dev Platforms

Open-source model and dataset hub with inference APIs.

Free / FreemiumWeb · iOS · Android
14

Scikit Learn

AI Dev Platforms

The most popular open-source machine learning library, complete with classic algorithms and unified APIs, covering everything from classification regression to clustering and dimensionality reduction, with abundant docum…

FreeWindows · macOS · Linux
13

PaddlePaddle

AI Dev Platforms

Baidu's open-source deep learning framework, free to use.

FreeWindows · macOS · Linux
13
Comments Be the First to Comment

Please log in to comment

    No comments yet