IndexMapAnti-DoomscrollAbout
Tool / RuntimeLLMCross-Modal

DSPy

Also known as: Declarative Self-improving Python · DSPy optimizers

Plain English

DSPy is a Python framework for building language-model workflows from reusable pieces. It can tune parts of the workflow by running examples and scoring the answers.

Technical Overview

Signatures declare inputs and outputs, while modules compose language-model calls into steps such as retrieval and generation. Optimizers search for instructions or demonstrations using a developer-supplied metric and examples. The resulting behavior depends on the chosen model and how well the optimization data represents production requests.

Timeline (4)

RSS
  1. 2023

  2. 2024

  3. 2025

  4. 2026

    Release

    DSPy 3.3 introduced experimental Flex, which can search over program structure as well as instructions. An optimization run can change how a task is split into model calls while scoring the result with the same metric.

See also (3)

Open full graph