Personas
In this step, you’ll add a persona to your prompt. You’ll learn how assigning the AI a role and perspective can radically change its output. By the end, you’ll know how to tune your own custom prompt to a specific tone, goal, and personality.
Problem
Your task is to add a persona to your prompt. Right now, your prompt produces generic results: sometimes too casual, sometimes too technical, etc. You need to give the AI a clear role and audience so it knows how to “speak” and what to prioritize.
By defining the persona (for example, “You are a senior engineer writing for junior developers”), you’ll make the model’s output more consistent, focused, and aligned with your goal.
What you need to know
With a persona, the AI writes like an expert in a specific role: structured, confident, and context-aware.
It also helps you maintain consistency across sessions or projects.
You can define a persona for an AI by explicitly telling it who/what it is, and then using language and phrasing throughout your prompt to back that up:
“You are a senior backend engineer with a degree in cyber security… implement this feature using the Go programming language…”
This defines a persona explicitly and frames the type of output you’ll get from the prompt (backend code written in Go with an emphasis on security)
Selecting a persona doesn’t just set “who” the AI is; it also sets tone, vocabulary, priorities, and the kinds of examples it uses. A “principal engineer” will emphasize trade-offs and risk; a “technical writer for beginners” will slow down, define terms, and show simple examples; a “security engineer” will default to threat surfaces and mitigations. Use personas to align the voice, depth, and focus of the output with your audience and goal.
Tips for choosing and writing personas
Be specific about role + audience: “Senior backend engineer writing for a junior developer” yields different language than “for an executive sponsor.”
Set goals and constraints: “Optimize for safety and maintainability,” “minimize cognitive load,” “assume limited context.”
Pick an authority level: junior / senior / principal / architect / reviewer / mentor: this shifts rigor, scope, and decisiveness.
Narrow domain focus when helpful: testing, performance, security, accessibility, DX, data, operations.
Add tone/style modifiers: professional, concise, friendly, Socratic, standards-driven, risk-averse.
Optionally cite a house style: “Follow our docs style guide,” “use Conventional Commits terms,” etc.
Selecting a persona early on in the prompt engineering process can also influence the type of prompt you write and the language you use throughout the prompt.
Example
Below you’ll find examples of prompts for explaining what an API is. Each prompt is written using a specific persona. We’ll start with the simplest version of a persona, and build up to include things like tone, format, and audience.
✏️ Feel free to run the prompts and compare, or simply imagine what the output might look like.
Part 1: Core Persona Only
These prompts define just the role. Run or imagine each and compare.
👩💼 Technical Writer
You are a technical writer. Explain what an API is.
🧑🔧 Principal Engineer
You are a principal engineer. Explain what an API is.
🎓 Customer Education Trainer
You are a customer education trainer. Explain what an API is.
Reflection
How might the output change by simply redefining the role?
Part 2: Expanded Persona with Style & Audience
Now we’ll add tone, format, and audience details to the prompt. This is part of the expanded persona of the prompt, as it reinforces and further expands on the core roles outlined above.
When you think about defining a persona, it’s often more than just “You are xyz…”. The persona is defined throughout the prompt and should influence the language and format you’re using to describe the output.
👩💼 Technical Writer (Beginner Audience)
You are a technical writer creating onboarding docs for beginners.
Explain what an API is in clear, simple terms. Use everyday examples and avoid jargon.
Make it scannable with short paragraphs or bullets.
🧑🔧 Principal Engineer (Internal Training)
You are a principal engineer creating training materials for new engineers.
Explain what an API is, focusing on internal architecture, standard interfaces, and versioning practices.
Use concise language and assume familiarity with basic concepts.
🎓 Customer Education Trainer (Workshop Setting)
You are a customer education trainer teaching a workshop for new users.
Explain what an API is using practical examples, like calling weather data or integrating tools.
Be friendly and confident; make it feel hands-on and useful.
Reflection
How do these prompts feel more “shaped” than the basic ones?
How is the persona defined and reinforced throughout the prompt?
How might you combine or remix traits from multiple personas?
Technical Requirements
✏️ Complete the following steps to add a persona to your prompt:
Tell the AI who it is
“You are a senior engineer.”, “You are a marketing manager.”
Define the audience
Explicitly define who the AI is writing for: “You are writing for a TPO”, “This email will be sent to a senior developer”.
Describe the output
With the persona in mind, describe what the AI’s output looks like. Use strong adjectives (friendly, concise, technical, etc) and describe the basic structure of what you’re looking for (5 sections, a bulleted list, etc.)
Test your prompt
Run the prompt a few times, and play around with different personas and prompt structures.
Tip: Ask the AI to help you generate ideas for the perfect combination of adjectives and persona descriptors.
Solution
Here’s a potential solution using the prompt for generating an instructions.md file.
You are a senior full-stack engineer documenting a codebase for a new AI teammate.
Generate aninstructions.mdfile that explains the purpose, architecture, dependencies, and coding conventions of the project.
Notice how it defines the AI as a full-stack engineer writing documentation for an AI teammate. It then goes on to describe the output as a markdown file and lays out the basic sections the AI should generate.
Next Steps
Your prompt now includes an explicit persona and should be outputting results that match the basic shape, tone, and personality you’re looking for!
In the next step, you’ll enhance your prompt with examples to help further guide the AI’s output.
Sources