| NamedThing |
Abstract base for any identifiable DSPy artefact |
no |
| LMToolCallPart |
Model-issued request to call a tool (LMToolCallPart) |
yes |
| LMMessage |
Role-attributed sequence of LM parts (``dspy |
no |
| LMToolSpec |
Provider-independent tool schema attached to an LMRequest |
no |
| Example |
Flexible data container for DSPy examples (trainset rows) |
no |
| Completions |
Container of candidate completions associated with a Prediction (``dspy |
no |
| Prediction |
Output of a DSPy module |
no |
| Signature |
Declarative input/output contract for a DSPy predictor (``dspy |
no |
| Tool |
A function-call tool usable by an LM (``dspy |
no |
| ToolCall |
A model request to invoke a tool (``dspy |
yes |
| ToolResult |
A tool execution result returned to the model (``dspy |
no |
| ToolCalls |
Container for the set of tool calls returned by the model (``dspy |
no |
| ToolCallResults |
Container for tool-call execution results (``dspy |
no |
| Type |
Abstract DSPy custom type (``dspy |
no |
| Image |
Image content usable as an input/output field type (``dspy |
no |
| Audio |
Audio content (``dspy |
no |
| File |
Arbitrary file payload (``dspy |
no |
| Code |
Code content typed by programming language (``dspy |
no |
| History |
Conversation history (``dspy |
no |
| Reasoning |
Native model reasoning content surfaced to the user (``dspy |
no |
| Citation |
A single citation entry (``dspy |
no |
| Document |
Citation-enabled document content (``dspy |
no |
| BaseLM |
Abstract base class for DSPy language models (``dspy |
no |
| LM |
Concrete LiteLLM-backed language model (``dspy |
no |
| Embedder |
Text embedding model (``dspy |
no |
| Cache |
DSPy cache configuration (``dspy |
no |
| Provider |
Backend provider abstraction (``dspy |
no |
| OpenAIProvider |
OpenAI fine-tuning provider (``dspy |
no |
| DatabricksProvider |
Databricks Foundation Models provider (``dspy |
no |
| LocalProvider |
Local-server provider used for ``dspy |
no |
| TrainingJob |
Asynchronous fine-tuning job (``dspy |
no |
| ReinforceJob |
Reinforcement-learning fine-tuning job (``dspy |
no |
| Adapter |
Base class for prompt-format adapters (``dspy |
no |
| ChatAdapter |
Markdown-formatted chat adapter (``dspy |
no |
| JSONAdapter |
Structured-JSON adapter (``dspy |
no |
| XMLAdapter |
XML output adapter (``dspy |
no |
| BAMLAdapter |
BAML schema-language adapter (``dspy |
no |
| TwoStepAdapter |
Two-step plan + finalize adapter (``dspy |
no |
| Module |
Base class for DSPy programs (``dspy |
no |
| Predictor |
Module that wraps a Signature + LM and produces a Prediction |
no |
| Predict |
Basic input-to-output predictor (``dspy |
no |
| ChainOfThought |
Predictor that injects a free-form rationale field (``dspy |
no |
| MultiChainComparison |
Generates N chains and selects the best (``dspy |
no |
| BestOfN |
Sample N candidates and select the highest-rewarded (``dspy |
no |
| Refine |
Iterative refinement loop (``dspy |
no |
| ReAct |
Reasoning + Acting agent with tool use (``dspy |
no |
| ReActV2 |
Next-generation ReAct agent (``dspy |
no |
| ProgramOfThought |
Tool-using predictor that emits and executes Python code (``dspy |
no |
| CodeAct |
Code-acting agent (``dspy |
no |
| KNN |
K-nearest-neighbor demo selector (``dspy |
no |
| Parallel |
Run modules in parallel across batched inputs (``dspy |
no |
| RLM |
Reinforcement-learning model wrapper (``dspy |
no |
| Aggregator |
Aggregation helper (``dspy |
no |
| Teleprompter |
Base class for DSPy optimizers (``dspy |
no |
| LabeledFewShot |
Trivial optimizer that injects labelled few-shot demos (``dspy |
no |
| BootstrapFewShot |
Bootstraps demos by running the teacher program (``dspy |
no |
| BootstrapFewShotWithRandomSearch |
BootstrapFewShot + random search over program variants (``dspy |
no |
| BootstrapFewShotWithOptuna |
BootstrapFewShot driven by an Optuna hyperparameter search (``dspy |
no |
| KNNFewShot |
KNN-selected few-shot optimizer (``dspy |
no |
| COPRO |
Coordinate-prompt optimizer (``dspy |
no |
| MIPROv2 |
Multi-prompt instruction-program optimizer v2 (``dspy |
no |
| SIMBA |
Stochastic Introspective Mini-Batch Ascent optimizer (``dspy |
no |
| GEPA |
Genetic-evolutionary Prompt Adaptation optimizer (``dspy |
no |
| Ensemble |
Ensembles multiple compiled programs (``dspy |
no |
| BetterTogether |
Compose prompt + weight optimization (``dspy |
no |
| InferRules |
Optimizer that infers natural-language rules from training data (``dspy |
no |
| BootstrapFinetune |
Bootstrap demos then fine-tune the underlying LM (``dspy |
no |
| AvatarOptimizer |
Optimizer specialized for Avatar agents (``dspy |
no |
| Evaluate |
Parallel program evaluator (``dspy |
no |
| EvaluationResult |
Aggregate evaluation result (``dspy |
no |
| Metric |
A scoring function used by Evaluate or teleprompters |
no |
| Retriever |
Abstract retrieval module |
no |
| Retrieve |
Generic retrieve module that calls ``dspy |
no |
| Embeddings |
Embedding-based nearest-neighbour retriever (``dspy |
no |
| EmbeddingsWithScores |
Embeddings retriever that also returns similarity scores (``dspy |
no |
| ColBERTv2 |
Remote ColBERTv2 retrieval server (``dspy |
no |
| Dataset |
Base dataset container (``dspy |
no |
| DataLoader |
Pluggable loader that materializes HuggingFace / pandas data into Examples (`... |
no |
| Colors |
Synthetic color-name dataset (``dspy |
no |
| HotPotQA |
HotPotQA multi-hop QA dataset (``dspy |
no |
| MATH |
Competition mathematics dataset (``dspy |
no |
| AlfWorld |
AlfWorld text-game agent dataset (``dspy |
no |
| GSM8K |
GSM8K grade-school math word problems (``dspy |
no |
| Settings |
Global DSPy configuration singleton (``dspy |
no |
| Interpreter |
Abstract code interpreter used by ProgramOfThought and CodeAct |
no |
| PythonInterpreter |
Local in-process Python REPL (``dspy |
no |
| CodeInterpreter |
Sandboxed code interpreter (``dspy |
no |
| StreamListener |
Per-field listener that turns provider chunks into StreamResponse events ... |
no |
| DSPyError |
Root of the public DSPy exception hierarchy (``dspy |
no |
| AdapterParseError |
Raised when an Adapter fails to parse an LM response (``dspy |
no |
| LMError |
Abstract base for LM-related errors (``dspy |
no |
| LMTransportError |
Transport-level LM error |
no |
| LMConfigurationError |
Misconfigured LM |
no |
| LMNotConfiguredError |
Raised when no LM is configured |
no |
| LMUnsupportedFeatureError |
Feature not supported by the underlying LM |
no |
| LMProviderError |
Provider-side LM error |
no |
| LMUnexpectedError |
Unexpected / unclassified LM error |
no |
| LMAuthError |
LM authentication error |
no |
| LMBillingError |
LM billing / quota error |
no |
| LMRateLimitError |
LM rate-limit error |
no |
| LMInvalidRequestError |
LM rejected the request |
no |
| ContextWindowExceededError |
Context window exceeded |
no |
| LMUnsupportedModelError |
Model is not supported |
no |
| LMTimeoutError |
Request timed out |
no |
| LMServerError |
Server-side LM error |
no |