Assign the AI a persona or role to shape its tone, expertise, and style.
Language models are trained on an enormous breadth of human-written text — including text written by experts in every conceivable domain, in every conceivable style. When you assign a role, you're essentially activating a cluster of that knowledge and style. "You are a senior iOS engineer" tells the model to draw on Swift-specific vocabulary, architectural patterns common in iOS development, and the blunt, code-focused feedback style of an experienced engineer. The role primes the model's probability distribution toward domain-appropriate outputs.
Roles can be set in two places. In the system prompt (the hidden instruction layer that many apps and API users configure before the conversation starts), a role establishes persistent behaviour across the entire session. In a user message, a role instruction scopes to that specific request. For one-off tasks, putting the role in your user message is fine. For building an app or a multi-turn assistant, set the role in the system prompt so you don't have to repeat it.
"You are an expert" is much weaker than "You are a board-certified cardiologist who communicates complex concepts using patient-friendly analogies." Specificity on three axes produces the best results: domain (what field), experience level (senior, junior, world-leading), and communication style (concise, educational, Socratic, blunt). The more concrete and realistic the role, the more tightly the model can conform to it.
Example
You are a senior iOS engineer with 10 years of Swift experience. Review this code and point out any memory leaks or anti-patterns:
Try this skill with our AI assistant
Try it →