Prompt Engineering Mastery
System Prompts, User Prompts, and Common Failures · 1/2

System prompts set the rules of the game

Most modern chat-based models accept two kinds of input: a system prompt, which sets persistent context, role, and rules for the whole conversation, and user prompts, which are the specific requests within that conversation. A system prompt like 'You are a patient coding tutor who never gives the full answer, only hints' shapes every single response afterward, while user prompts change turn by turn. This separation matters because it lets you set stable behavior once instead of repeating instructions in every message.

In practice, if you're building anything with an API, like a customer support bot or a coding assistant, the system prompt is where you define tone, constraints, and boundaries ('never discuss pricing, redirect to sales'), while the user prompt carries the actual question. Getting this split right is one of the biggest levers for building a reliable AI product, because a well-designed system prompt prevents whole categories of bad behavior before they happen.