DSPy
Write LLM programs as declarative modules and let optimisers tune the prompts.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkWhat it is
DSPy, from Stanford, has you declare what each LLM step takes in and returns, then compiles and optimises the prompts and few-shot examples against a metric instead of you tuning them by hand.
Best for
Pipelines where a clear metric drives prompt optimisation.
Skills it helps with
Learn DSPy by doing
- Optimise a prompt automatically with DSPy
Write a signature and a metric, run three optimisers on 30 labelled examples, score 20 held-out ones, and see when hand-tuning wins.
Related tools
Instructor
Library for getting validated, typed structured outputs from LLMs using Pydantic models.
Pydantic AI
Type-safe Python agent framework from the Pydantic team.
AI SDK
TypeScript toolkit for streaming, tool calls and agents across model providers.
Agent Development Kit (ADK)
Google's code-first framework for building, evaluating and deploying agents.
Agno
Python framework for agents, teams and workflows, served as APIs with AgentOS.
Claude Agent SDK
Build agents on the same harness that powers Claude Code.