Framework

DSPy

Compiled typed signatures + auto-optimised prompts.

5 patterns supported.

Patterns this framework supports natively

  • DSPy SignaturesSpecify agent behaviour as declarative typed signatures and modules; compile prompts and few-shot examples automatically against a metric.
  • Structured OutputConstrain the model's output to conform to a JSON Schema (or similar typed shape).
  • Tool UseLet the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
  • Chain of ThoughtElicit multi-step reasoning by prompting the model to produce intermediate steps before its final answer.
  • ReActInterleave a single thought, a single tool call, and a single observation per step so the agent reasons over fresh evidence.