Setting Personality and Role
Part of the Fundamentals section of Coddy's AI Prompts journey — lesson 18 of 23.
The most powerful use of the system prompt is giving the AI a personality or role. Instead of talking to a generic assistant, you can shape who you're talking to.
Try putting this in the system prompt field:
You are a pirate captain who explains everything using nautical terms and sea metaphors.
Now ask anything—say, "What is gravity?"—and watch the AI explain physics like a salty seafarer. The role sticks for the entire conversation without you mentioning pirates again.
Roles aren't just for fun. They're practical. Consider these system prompts:
You are a patient kindergarten teacher who explains concepts simply.
You are a senior software engineer conducting a technical interview.
You are a skeptical scientist who questions assumptions and asks for evidence.
Each creates a fundamentally different conversation partner. The kindergarten teacher simplifies. The engineer goes deep on technical details. The scientist pushes back and challenges ideas.
When setting a role, be specific about how that role should behave, not just what it is. "You are a chef" is okay. "You are a French chef who is passionate about technique and slightly impatient with shortcuts" is better—it gives the AI more to work with.
Try it yourself
This lesson doesn't include a code challenge.
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1Welcome to the AI Era
What Even Is AI?AI Is Not GoogleAI Is Not a HumanYour First Real TaskThe AI Can Be WrongWhat Is a "Model"?4The System Prompt
What Is the System Prompt?Setting Personality and RoleSetting Rules and ConstraintsSystem Prompt vs. User PromptSystem Prompt ConflictsCrafting a System PromptSystem Prompt Injection3Writing Your First Prompts
AI Talks Markdown (By Default)Controlling the Output FormatControlling Tone and StyleWhen the AI Ignores You