liveBook · Manning

Prompt

As explained in LLMs in Production

A persistent prompt instruction applied to requests to establish consistent model behavior or interaction style.

A user may ask a company chatbot a vague question, but the chatbot still needs a consistent role and response style. A system prompt supplies instructions for every task, such as staying on company topics, being courteous, and admitting when it does not know an answer. It is normally hidden from the user. section 7.2.1 section 7.5

Keep the system prompt distinct from the other parts of the assembled prompt:

  • Input is what the user writes; it may be informal or contain mistakes. section 7.2.1
  • Instruction encodes task-specific directions, while context adds information from retrieval or database lookups. section 7.5
  • System instructions establish behavior across tasks, rather than supplying a particular user question or retrieved fact. section 7.5

Company-policy assistant

For a question about a 401(k) match, the system instructions can ask the assistant to answer only company-policy questions, offer documentation links when available, and say when it does not know. The user’s question and retrieved policy information are separate inputs. This structure improves the chance of a useful answer; it does not make every answer reliable. section 7.2.1

Treat the wording as something to test and refine. Small phrasing changes can produce very different responses, and adding examples alone does not guarantee better results. Prompting guides behavior at run time without expensive retraining. section 5.2.3 section 10.5

How LLMs in Production covers it

How deep it goes
Defines the system component and works through an assembled chatbot prompt, without specifying a guaranteed way to enforce its instructions.
Examples
Uses a company-policy chatbot answering a 401(k) question and a Python coding prompt assembled with retrieved examples.
What it assumes
Defines a prompt from basic model input before distinguishing its parts; assumes no prior prompt terminology.
What you can do after
Practice/perform it by drafting reusable behavior instructions and testing their wording alongside user input and context.
How it connects
Distinguishes system instructions from user input, task instructions, retrieval-augmented generation context, and prompt engineering.

Also explained in

Compare how 50 books explain prompt →

Related concepts

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