English Vocabulary for DSPy Programmers

Learn the English vocabulary DSPy developers use — signatures, modules, teleprompters, compile(), and more. Essential for AI engineers working with LLM pipelines.

DSPy is a framework that replaces hand-written prompts with programmatic modules that can be compiled and optimized automatically. If you work with LLM pipelines and collaborate with English-speaking teams, knowing DSPy’s specific vocabulary will help you read documentation, contribute to discussions, and write clear code comments.

Key Vocabulary

Signature A signature defines the input and output fields of a DSPy module — essentially the interface of a language model call. Developers “define,” “declare,” or “write” signatures. A signature looks like a typed function definition and tells the framework what the module is supposed to do. Example: “I defined a signature question -> answer for the basic QA module so the optimizer knows what to improve.”

Module A module is a composable building block in a DSPy program. Modules wrap LLM calls and can be chained together. They behave similarly to PyTorch nn.Module objects. Developers “instantiate,” “call,” and “compose” modules. Example: “The retrieval-augmented pipeline chains three modules: a retriever, a summarizer, and a final answer module.”

Predictor A predictor is a low-level module that makes a single LLM call based on a signature. Higher-level modules like ChainOfThought wrap a predictor internally. Developers “configure” or “use” predictors. Example: “Under the hood, dspy.Predict is a basic predictor that maps your signature fields to a prompt and parses the output.”

Teleprompter (Optimizer) A teleprompter — now more commonly called an optimizer — is an algorithm that automatically improves a DSPy program by finding better prompts or few-shot examples. You “run,” “apply,” or “use” a teleprompter to optimize your program. The term is being phased toward “optimizer” in newer documentation. Example: “We ran the BootstrapFewShot teleprompter overnight and the accuracy on our validation set improved by 12 percent.”

compile() The compile() method takes your DSPy program and an optimizer (teleprompter) and produces an optimized version. This is the central action in a DSPy workflow. Developers say they “compile the program” or “run compilation.” Example: “After compiling the program with MIPROv2, the optimized prompts are stored in the compiled module’s state.”

ChainOfThought ChainOfThought is a built-in DSPy module that instructs the model to reason step by step before producing an answer. It extends a basic predictor with a reasoning field. Developers “use” or “wrap” a signature in ChainOfThought. Example: “I replaced the plain Predict call with ChainOfThought and the model’s answers on multi-step problems became much more reliable.”

Few-shot Examples Few-shot examples are sample input-output pairs that the optimizer injects into prompts to guide the model. Developers “bootstrap,” “provide,” or “sample” few-shot examples. The optimizer selects which examples to include. Example: “The teleprompter bootstrapped 16 few-shot examples from the training set and selected the 4 most useful ones.”

Dataset Evaluation DSPy programs are evaluated against a labeled dataset using a metric function. Developers “define a metric,” “evaluate the program,” and “report scores” on a dev or test set. Example: “We defined an exact-match metric and evaluated the compiled program on 500 held-out examples to verify the improvement.”

Common Phrases and Collocations

“optimize the prompt program” The standard way to describe running an optimizer on a DSPy pipeline. The object is always “the program” not “the prompt” alone. Example: “We plan to optimize the prompt program using COPRO once we have a larger labeled training set.”

“define a DSPy signature” Used when declaring the interface of a module. Always “define” — not “create” or “write” in formal DSPy discussions. Example: “Before implementing the module, define a DSPy signature that captures the exact inputs and outputs you expect.”

“compile with the optimizer” The standard phrasing for the compilation step. “With” introduces the optimizer name. Example: “Compile with the BootstrapFewShotWithRandomSearch optimizer if you want exploration over the example space.”

“bootstrap examples from the training set” Refers to the process of generating labeled examples automatically from your data to use as few-shot demonstrations. Example: “The teleprompter will bootstrap examples from the training set, so make sure your training labels are correct.”

“the program’s trace” A trace records all LLM calls made during a forward pass. Developers “inspect,” “log,” and “replay” traces for debugging. Example: “Inspect the program’s trace to see exactly what prompt was sent to the model at each step.”

Practical Sentences to Practice

  1. “I defined a three-field signature — context, question, and answer — and wrapped it in ChainOfThought.”
  2. “Compilation took about 20 minutes because the optimizer ran 50 trials on the training set.”
  3. “The teleprompter bootstrapped labeled examples automatically, so we didn’t need to write them by hand.”
  4. “After optimizing the prompt program, we saw a significant improvement on the held-out evaluation set.”
  5. “Make sure the metric function returns a float between 0 and 1 so the optimizer can rank candidate programs correctly.”

Common Mistakes to Avoid

Calling it “the compiler” instead of “the optimizer” The compile() function runs an optimizer, not a traditional code compiler. The framework uses “compile” as a verb (as in PyTorch), but the component doing the work is the optimizer (or teleprompter). Say “the optimizer improved the prompts” not “the compiler improved the prompts.”

Confusing “signature” with “prompt” A signature is a typed interface declaration; the actual prompt text is generated by DSPy from the signature. Saying “I wrote a prompt with DSPy” is imprecise — say “I defined a signature and DSPy generates the prompt.”

Using “train” instead of “compile” DSPy does not fine-tune model weights by default — it optimizes prompts and few-shot examples. Use “compile” or “optimize,” not “train the model.”

Summary

DSPy introduces a programming-oriented vocabulary — signatures, modules, predictors, optimizers, and compilation — that deliberately mirrors software engineering concepts rather than traditional prompt engineering jargon. Mastering this vocabulary lets you read DSPy’s documentation and research papers fluently, contribute to community discussions, and communicate clearly with teammates building LLM pipelines. The best practice is to read the DSPy GitHub repository’s examples directory, where real code comments show how native English-speaking researchers describe these concepts in context.