Demonstration
A demonstration is an example pairing an input, request, or prompt with a corresponding output, answer, or label to illustrate a task or expected behavior.
Building LLM Applications with DSPy
An input paired with an appropriate output to illustrate a task to a language model.
- How it is used
- Uses input-output pairs in prompts to clarify the intended task and improve intent classification.
- How deep it goes
- Explains labeled selection, bootstrapping, similarity-based selection, and multistep generation, with an implementation example and evaluation results.
- Examples
- Shows a customer-message classification pair, flight-intent prompts, and a two-step DSPy module optimized with BootstrapFewShot.
- What you can do after
- Apply it via DSPy optimizers to select or bootstrap prompt demonstrations and compare candidates using a metric.
Read how Building LLM Applications with DSPy explains demonstration →
The Art of AI Product Development
A demonstration is an input-output example supplied in a prompt to illustrate the task and desired response format.
- How it is used
- Guides language-model responses by placing prior task examples before a new input.
- How deep it goes
- Defines input-output demonstrations, shows their placement, and weighs manual effort and context limits; does not detail automated example selection.
- Examples
- Uses sentiment analysis and previous LinkedIn announcements to illustrate classification and style replication.
- What you can do after
- Apply it via few-shot prompt templates to guide a new response while accounting for example-writing effort and token use.
Read how The Art of AI Product Development explains demonstration →
Data Without Labels
A single historical data record containing input variables and its corresponding target value.
- How it is used
- Frames each labeled historical record as an input-target unit for supervised prediction.
- How deep it goes
- Defines record structure and predictive purpose but stops short of data preparation or model-training procedures.
- Examples
- Uses telecom customer records and a height-weight dataset to illustrate labeled inputs and outcomes.
- What you can do after
- Evaluate whether a historical record contains the inputs and target required for supervised prediction.
Related concepts
- resulthas part · A result is an actual or possible outcome, state, or consequence of an event, action, decision, or process.
- promptpart of · An input, typically containing instructions or context, supplied to an artificial-intelligence model to guide or elicit its output.
- actionhas part · An action is a choice or operation selected or performed by an actor that can affect a system or environment or produce an outcome.
- contexthas part · Context is the surrounding information, state, or circumstances that condition how an entity, event, or task is interpreted or how a system behaves.
- Retrieverused by · A retriever is a software component that searches or queries an information source and returns items relevant to a query for use by downstream processes.
- optimizerproduced by · An optimizer is an algorithm or procedure that adjusts model parameters or other decisions to improve an objective function.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


