AI / A CONCEPT NOTE
System Prompt
setting the model's behavior and constraints
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
The foundational instruction injected at the start of a conversation that defines the model's persona, tone, safety limits, and execution rules.
02 / FOLLOW THE MECHANISM
How system instructions guide runs
System setup
developer sets instructions: 'You are a senior DevOps assistant. Speak in short sentences.'
Injection
API appends the system message prefix to prompt.
LLM generation
model reads prefix, applying constraints across response paths.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
set system prompt locally in Ollama
curl -X POST -d '{"model":"llama3","system":"You are a code compiler","prompt":"2+2"}' http://localhost:11434/api/generate05 / CHECK YOURSELF
Could you explain System Prompt to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in AI engineeringUser Promptthe question or task from the end user