liveBook · Manning

Prompt

As explained in Context Engineering

A prompt is an input supplied to a language model to elicit a response or guide its behavior.

A prompt is input supplied to a language model to elicit a response or guide its behavior. A user prompt expresses the immediate question or task and sets the goal for other context sources, such as retrieval, memory, and tools. section 1.1 section 1.5.6

A user prompt may be passed directly to a model, but an application can instead assemble a final prompt from user input, instructions, external knowledge, tools, memory, and state. Prompt engineering focuses on shaping the input; context engineering also manages what else enters the context window. section 6.1 section 1.1

Treat a prompt as a task specification rather than a casual query:

  • Give direction: state the desired outcome, audience, purpose, and relevant constraints. section 6.2.1
  • Specify the output format, including field names, units, ordering, and missing-value behavior when downstream software needs structured results. section 6.2.1
  • Provide representative input-output examples to clarify the desired pattern. section 6.2.1
  • Break complex tasks into interpretable steps, including multiple model calls where appropriate. section 6.2.1

From question to specification

Instead of asking “What is context engineering?”, ask: “Define context engineering in 3–4 sentences for a software engineering audience. Focus on its practical benefits, clearly distinguish it from prompt engineering, and use technical but accessible language.” The second prompt specifies length, audience, focus, and tone, leaving less room for the model to guess. section 6.1

Techniques such as few-shot prompting, ReAct, and chaining offer different ways to structure a task, while frameworks such as COSTAR and CRISPE make prompt construction more repeatable. With reasoning models, emphasis can shift from procedural scaffolding toward precise task specification, grounding data, and tool definitions. section 6.7

Figure 6.1 Context-aware prompt builder: a structured template for using prompt frameworks
context aware prompt builder v8

The prompt builder illustrates how framework fields can be assembled into a reusable prompt, with samples for software development roles. section 6.6.4

In production, treat user prompts as untrusted input and use delimiter isolation against injection attacks. Version-control templates and regression-test changes. Prompt design is only one part of reliability: the surrounding system must also select and manage its context sources. section 6.7 section 6.6.4

How Context Engineering covers it

How deep it goes
Explains four prompt design principles and surveys techniques, frameworks, and production safeguards.
Examples
Contrasts a broad definition question with a constrained request specifying audience, length, focus, and tone.
What you can do after
Apply prompt design principles to specify tasks and output formats, and manage templates with version control and regression testing.
How it connects
Connects prompt engineering with context engineering, retrieval, memory, tools, and context windows.

Also explained in

Compare how 64 books explain prompt →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.