dspy-predict
Installation
SKILL.md
Direct LM Calls with dspy.Predict
Guide the user through using dspy.Predict -- the simplest and fastest DSPy module for calling a language model. It takes inputs, calls the LM, and returns typed outputs. No intermediate reasoning, no extra steps.
Step 1: Gather context
Before writing code, clarify:
- What is the task? Classification, extraction, formatting, or Q&A?
- What output type is needed? A plain string, a constrained
Literallist, or a structured Pydantic model? - Do you need batch processing? Thousands of items at once, or single calls?
- Is there an existing signature, or does it need to be designed from scratch? (If from scratch, see
/dspy-signatures.)
What is dspy.Predict
dspy.Predict is the atomic building block of every DSPy program -- one LM call, no reasoning chain, no tool loops. It takes a signature and calls the LM once to produce the output fields. Every other DSPy module (ChainOfThought, ReAct, etc.) builds on top of it.