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.

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.

When to use Predict vs ChainOfThought

Use dspy.Predict when... Use dspy.ChainOfThought when...
The task is straightforward (classification, extraction, formatting) The task benefits from step-by-step reasoning
You want minimal latency and token usage Accuracy matters more than speed
The mapping from input to output is direct The LM needs to "think through" intermediate steps
You're building a simple sub-step inside a larger pipeline You need to inspect the model's reasoning

Rule of thumb: Start with Predict. If accuracy is too low, switch to ChainOfThought -- it's a one-word change.

Related skills

More from lebsral/dspy-programming-not-prompting-lms-skills

Installs
5
GitHub Stars
5
First Seen
Mar 17, 2026