DSPy
Compiled typed signatures + auto-optimised prompts.
5 patterns supported.
Patterns this framework supports natively
- DSPy Signatures — Specify agent behaviour as declarative typed signatures and modules; compile prompts and few-shot examples automatically against a metric.
- Structured Output — Constrain the model's output to conform to a JSON Schema (or similar typed shape).
- Tool Use — Let the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
- Chain of Thought — Elicit multi-step reasoning by prompting the model to produce intermediate steps before its final answer.
- ReAct — Interleave a single thought, a single tool call, and a single observation per step so the agent reasons over fresh evidence.