P

Persona Prompting: Definition and Examples

A prompt engineering technique that involves assigning a specific role, identity, or character to the AI to guide the style, tone, and expertise of its responses.

Full definition

Persona Prompting is a fundamental technique in prompt engineering that involves asking a language model to adopt a specific role or identity before responding to a request. By assigning a persona — for example 'You are a senior developer specialized in Python' or 'Act as a physics teacher for high school students' — the user frames the language register, level of detail, and approach angle that the AI will prioritize.

This technique relies on a simple principle: large language models have been trained on texts produced by people with very varied profiles (experts, popularizers, technical writers, etc.). By specifying a persona, one implicitly activates the linguistic patterns and knowledge associated with that type of profile in the training data. The result is a response that is more coherent, better targeted, and often more useful than that obtained with a generic request.

Persona Prompting can be used simply (a single line of context) or sophisticatedly, combining multiple attributes: professional expertise, communication style, target audience, specific constraints, and even personality traits. The more detailed and realistic the persona, the more adapted the response will be to the user's real need.

This approach is particularly effective in professional contexts where a specific expert perspective is needed: marketing writing, code review, simplified legal advice, pedagogy adapted to a given level, or even interview simulation. It often forms the first building block of a more complex prompt system.

Etymology

The term combines 'persona', borrowed from Latin (theatrical mask, then public character in Jungian psychology), and 'prompting', from English meaning the action of formulating instructions to an AI. The expression became popular in 2023 with the democratization of ChatGPT, when users discovered that prefixing their requests with 'Act as...' significantly improved the quality of responses.

Concrete examples

Marketing copywriting for a SaaS startup

You are a senior copywriter specialized in B2B SaaS with 15 years of experience. You master the PAS and AIDA frameworks. Write a sales page for a project management tool intended for development teams of 10 to 50 people.

Learning complex technical concepts

You are a machine learning professor known for your ability to explain complex concepts. Explain how transformers work as if I were a web developer who has never done ML.

Code review with specific expertise

You are a senior software architect specialized in distributed systems and Go. Analyze this code focusing on concurrency management, potential race conditions, and resilience patterns.

Practical usage

To apply Persona Prompting effectively, always start your prompt with a precise description of the desired role, including the domain of expertise, experience level, and target audience. Combine the persona with concrete constraints (output format, tone, length) for even more targeted results. Test multiple personas for the same task to discover which angle produces the most relevant response for your use case.

Related concepts

System PromptRole PromptingFew-Shot PromptingChain of Thought

FAQ

What is the difference between Persona Prompting and Role Prompting?
The two terms are often used interchangeably. However, Role Prompting is generally limited to assigning a professional role ("You are a lawyer"), while Persona Prompting can include personality traits, communication style, situational context, and richer behavioral constraints, creating a more complete and nuanced character.
Does Persona Prompting work with all language models?
Yes, this technique works with most large language models (Claude, GPT, Gemini, Llama, Mistral, etc.), but its effectiveness varies. The most recent and capable models respond better to detailed personas and maintain the role longer in a conversation. With smaller models, prefer simple and direct personas.
Can multiple personas be combined in a single prompt?
Yes, it is even a very powerful advanced technique. You can ask the AI to analyze a problem successively from the perspective of multiple experts (e.g., a developer, a UX designer, and a product manager), or to simulate a debate between personas with opposing viewpoints. This allows for a more complete and balanced view of a subject.

See also

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More definitions

Get new prompts every week

Join our newsletter.