System prompt
A system prompt is a high-priority instruction or context that guides an AI model’s behavior, role, task, 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 →
Retrieval Augmented Generation, The Foundational Ideas
A system prompt is a high-priority instruction context that establishes a language model's behavior and constraints.
- How it is used
- Directs query generation, summarization, or evaluation by making task behavior and output constraints explicit.
- How deep it goes
- Explains prompt design through task criteria, reasoning steps, domain constraints, and output formats, but not model training.
- Examples
- Uses laptop facet queries, technical-documentation extraction rules, legal-clause preservation rules, and faithfulness-evaluation instructions.
- What you can do after
- Apply it via structured prompts that broaden retrieval coverage, preserve domain details, or standardize evaluation behavior.
Read how Retrieval Augmented Generation, The Foundational Ideas 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
- Uses system prompts to customize chatbot personality, tone, response format, and behavior.
- How deep it goes
- Explains message roles and request placement, then builds from a simple Ollama call to selectable prompts in a Streamlit chatbot.
- Examples
- Compares science-teacher and Shakespearean-actor responses to a gravity question, and offers a concise expert preset.
- What you can do after
- Apply it via Ollama and Streamlit to create selectable or custom chatbot personalities.
Read how Build Applications with Local AI Models on a Mac explains system prompt →
Also covered in
- Context EngineeringIn early access (MEAP)
- Building LLM Applications with DSPy
- LLM Customization and Fine-TuningIn early access (MEAP)
- Grokking Software ArchitectureIn early access (MEAP)
- Agent Design PatternsIn early access (MEAP)
- AI Model EvaluationIn early access (MEAP)
- Financial AI in Practice
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- large language modelA large language model is a machine-learning model trained on extensive text data to process and generate natural language.
- contextContext is the relevant information, state, or circumstances surrounding an input, decision, or activity that influence its interpretation or behavior.
- promptA prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
Related concepts
- promptcontrasts with · A prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
- role assignmenthas part · Role assignment is a prompting technique that directs a model to respond from a specified role, perspective, expertise, or voice.
Questions about system prompt
What is system prompt?
A system prompt is a high-priority instruction or context that guides an AI model’s behavior, role, task, or constraints.
Which Manning books explain system prompt?
Prompt Engineering in Practice, Retrieval Augmented Generation, The Foundational Ideas and Build Applications with Local AI Models on a Mac.
What should I know before learning system prompt?
Manning books that teach system prompt usually introduce language model, large language model, context and prompt first.
What is the difference between system prompt and prompt?
A system prompt is a high-priority instruction or context that guides an AI model’s behavior, role, task, or constraints. A prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
What is system prompt a kind of?
System prompt is a kind of instruction layer. An instruction layer is a distinct level or mechanism through which directives are supplied to an LLM-based system.
What are the parts of system prompt?
System prompt includes role assignment.
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.


