Skip to main content
>_ supraj.dev
TOPIC AI
System Prompt setting the model's behavior and constraints
IN 10 SECONDS

The foundational instruction injected at the start of a conversation that defines the model's persona, tone, safety limits, and execution rules.

GOTCHA User prompts can contain 'jailbreak' instructions that try to override the system prompt rules. Keep critical checks out of prompts.
HOW SYSTEM INSTRUCTIONS GUIDE RUNS
01 System setup developer sets instructions: 'You are a senior DevOps assistant. Speak in short sentences.'
02 Injection API appends the system message prefix to prompt.
03 LLM generation model reads prefix, applying constraints across response paths.
POKE IT YOURSELF
curl -X POST -d '{"model":"llama3","system":"You are a code compiler","prompt":"2+2"}' http://localhost:11434/api/generate — set system prompt locally in Ollama