System prompt
A system prompt is a high-priority instruction or context supplied to an AI model to establish its role, task, behavioral guidance, or constraints.
Prompt Engineering in Practice
A system prompt is a prompt containing stable instructions that define a model's behavior across interactions.
- How it is used
- Defines reusable assistant behavior while user prompts carry changing requests and context.
- How deep it goes
- Specifies components, placement rules, mistakes, and worked decompositions without descending into model internals.
- Examples
- Uses issue creation, daily work reports, build triage exercises, and an HR policy conflict.
- What you can do after
- Build it from scratch by separating stable instructions from variable input and specifying constraints and output format.
Read how Prompt Engineering in Practice explains system prompt →
Build Applications with Local AI Models on a Mac
A system message supplies instructions that guide an AI model's behavior in a conversation.
- How it is used
- Guides a chatbot’s role, tone, and response rules before it answers user messages.
- How deep it goes
- Defines message roles and order, then demonstrates prompt changes and per-request chatbot assembly; stops short of changing model weights.
- Examples
- Contrasts science-teacher and dramatic-actor answers to a gravity question, then uses personality presets in a Streamlit chatbot.
- What you can do after
- Apply it via Ollama’s Python library and Streamlit to customize a chatbot’s personality and response style.
Read how Build Applications with Local AI Models on a Mac explains system prompt →
Related concepts
- promptcontrasts with · An input, typically containing instructions or context, supplied to an artificial-intelligence model to guide or elicit its output.
- role assignmenthas part · Role assignment is a prompting technique that directs a model to respond from a specified role, perspective, expertise, or voice.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

