liveBook · Manning

User message

As explained in Prompt Engineering in Practice

A conversation message containing a user's query, request, or contextual information for a model to process.

A user message carries the query, request, or context that a person provides for a model to process. Unlike stable system instructions, its content can change with each interaction. section 6.1.1 section 6.5

Place content according to whether it configures model behavior or supplies input for a particular request:

  • Put changing queries, requests, context, and template variables in user messages; delimit variable content in templates. section 6.1.2
  • Keep stable roles, instructions, procedures, constraints, and output formats in system messages. A conversation needs at least one user message to trigger a response. section 6.1.2

API troubleshooting request

A user might write, “My API calls keep failing. How do I fix this?” The request supplies the changing issue; the assistant can then ask for the error, endpoint, request details, and environment. section 6.1.1

Figure 6.1 Prompt types in a chat conversation: system and user prompts are designed; assistant messages are generated.

Compare the designed system and user prompts with the assistant message generated in response. section 6.1.1

How Prompt Engineering in Practice covers it

How deep it goes
Defines message contents and placement, including delimited template variables, without descending into model internals.
Examples
Uses an API troubleshooting query and an incident-report template to illustrate changing user input.
What you can do after
Configure chat inputs by placing changing requests and context in user messages and stable behavior in system messages.
How it connects
Distinguishes user messages from system messages and model-generated assistant messages, and connects templates to variable placement.

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.