Skip to main content
7BBusyBoss

Framework for programming — rather than prompting — language models. Compiles LLM pipelines into self-improving, reproducible programs.

19,000 stars🍴 0 forksPythondspyprogrammingoptimizer

About DSPy

DSPy is a Python open-source ai frameworks project by stanfordnlp. Framework for programming — rather than prompting — language models. Compiles LLM pipelines into self-improving, reproducible programs. With 19,000 GitHub stars and 0forks, it's one of the AI Frameworks tools worth knowing. You can download the source, browse it on GitHub, or read the full setup guide in the README below.

From the project README

DSPy: _Programming_—not prompting—Foundation Models

Documentation: DSPy Docs

[[image: PyPI Downloads]](https://pepy.tech/projects/dspy)


DSPy is the framework for _programming—rather than prompting—language models_. It allows you to iterate fast on building modular AI systems and offers algorithms for optimizing their prompts and weights, whether you're building simple classifiers, sophisticated RAG pipelines, or Agent loops.

DSPy stands for Declarative Self-improving Python. Instead of brittle prompts, you write compositional _Python code_ and use DSPy to teach your LM to deliver high-quality outputs. Learn more via our official documentation site or meet the community, seek help, or start contributing via this GitHub repo and our Discord server.

Documentation: dspy.ai

Please go to the DSPy Docs at dspy.ai

Installation

pip install dspy

To install the very latest from main:

pip install git+https://github.com/stanfordnlp/dspy.git

📜 Citation & Reading More

If you're looking to understand the framework, please go to the DSPy Docs at dspy.ai.

If you're looking to understand the underlying research, this is a set of our papers:

This is an excerpt from the project's own README, quoted here for reference. Read the full README on GitHub →

DSPy — FAQ

What is DSPy?

Framework for programming — rather than prompting — language models. Compiles LLM pipelines into self-improving, reproducible programs.

Is DSPy free to use?

Yes. DSPy is open-source and free. You can browse the source on GitHub or download it here at no cost — no signup required.

How do I install and run DSPy?

Download the latest source as a ZIP from GitHub (or clone the main branch), then follow the setup steps in the README below.

What language is DSPy written in?

DSPy is primarily written in Python.

How popular is DSPy?

DSPy has 19,000 stars and 0 forks on GitHub — a useful signal of how actively it's maintained and trusted by developers.

More AI Frameworks skills

See all AI Frameworks