liveBook · Manning

Trusted input

As explained in Prompt Engineering in Practice

Model-provided content treated as authoritative or safe to follow within a prompt's trust model.

Trusted input is prompt text the application controls, such as system instructions, few-shot examples, and task framing. Trust depends on who controls the text, not whether it is benign: runtime content from users, retrieved documents, or external APIs is untrusted because its contents cannot be guaranteed. A prompt does not inherently distinguish these sources, so their interaction must be managed explicitly. section 10.1 section 10.0

Classify prompt content by control:

  • Trusted: system instructions, few-shot examples, and task framing established before user input. section 10.1
  • Untrusted: runtime user messages, retrieved documents, and external API responses, whether malicious or benign. section 10.1

A mixed prompt

A chatbot places system instructions alongside a user request to reveal customer names and contact details. The system text is controlled; the request is runtime input. Without a boundary, the model may treat the combined text as one continuous block and let the later request influence its behavior. section 10.0 section 10.1

Figure 10.1 How a language model processes a prompt with no boundary between trusted and untrusted input

Illustrates how trusted instructions and untrusted content can appear as one continuous prompt when no boundary separates them. section 10.1

How Prompt Engineering in Practice covers it

How deep it goes
Defines trust by control and explains the risk of mixed prompt text, without detailing boundary implementation.
Examples
Uses system instructions, few-shot examples, task framing, user messages, retrieved documents, and API responses as examples.
What it assumes
Assumes familiarity with system prompts, delimiters, constraints, and separating stable instructions from variable inputs.
What you can do after
Evaluate/understand which prompt text the application controls and why externally supplied content requires explicit management.
How it connects
Connects trusted input to system prompts, few-shot examples, prompt templates, untrusted input, and prompt injection.

Related concepts

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