liveBook · Manning

System/user separation

As explained in Prompt Engineering in Practice

Architectural separation is the separation of stable model instructions from variable user-provided input into distinct prompt components.

System/user separation divides stable instructions from changing input. System messages define behavior; user messages supply requests and context; assistant messages contain generated responses. section 6.5 section 6.1.1

Place each component by asking: “Does this configure the system, or does the user provide it?”

  • Put roles, instructions, procedures, constraints, output formats, and static context in the system message. section 6.5
  • Put questions, requests, context changes, and input parameters in the user message, often using delimited template variables. section 6.5

Use separation for repeated production applications, conversational or multiturn systems, and requests that need consistent behavior. A combined prompt is simpler for one-off tasks, prototypes, or work run only a handful of times. section 6.4.4

Customer-service email generation

For a high-volume service, keep the role, brand voice, apology guidance, and tone constraints in the system message. Put customer name, order number, issue, and resolution details in a user template, so standards can change in one place. For five to ten emails, a combined prompt may be sufficient. section 6.4.4

How Prompt Engineering in Practice covers it

How deep it goes
Defines message roles, gives a component-placement test, and demonstrates the separation with prompt templates.
Examples
Demonstrates customer-service email generation with a production template and an alternative combined prompt for a small batch.
What you can do after
Apply separation by putting stable behavior in system messages and variable inputs in user prompts.
How it connects
Connects chat APIs, multiturn context, prompt templates, and prompt caching.

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.