dspy-signatures
Installation
SKILL.md
DSPy Signatures
Guide the user through defining DSPy Signatures — typed declarations of what goes into and comes out of an LM call.
Step 1: What kind of signature?
Ask the user before diving in:
- How complex is your I/O? One input, one output (use inline)? Multiple fields, type constraints, or nested objects (use class-based)?
- Do you need structured output? If the output maps to a database model or API response, you likely want a Pydantic model as the output type.
- Are outputs constrained? If you need categories, booleans, or numeric ranges, you need type annotations.
Then jump to the relevant section below.
What is a Signature
A Signature declares the input/output contract for an LM call -- field names, types, and descriptions. DSPy compiles it into an optimized prompt automatically. You define the I/O spec; DSPy handles the prompting.