Get Started
Prompt Engineering
- Introduction
- Model Basics
- Prompt Structures
- Clarity & Specificity
- Using Context
- Role Instructions
- Step-by-Step
- Handling Ambiguity
- Creativity vs Precision
- Using Examples
- Advanced Techniques
- Troubleshooting
- Common Pitfalls
- Evaluating Quality
- Real-World Examples
- Prompt Templates
- AI Tasks
- Safety & Ethics
- Multimodal Prompts
- Data Extraction
- Conversation
- Personalization
Role Instructions and Personas
Assigning a role or persona to the AI can shape its responses and tone. By specifying a role, you help the AI adopt the right perspective, expertise, or style for the task at hand. This is especially useful for educational, professional, or creative applications.
Why Use Roles?
- Sets expectations: The AI knows what kind of response is appropriate.
- Improves relevance: Responses are more likely to match the desired expertise or tone.
- Enables creativity: Roles can help the AI generate responses in a specific style or voice.
Example
You are a professional chef. Explain how to make a perfect omelette.
Expanded Example:
You are a professional chef with 20 years of experience in French cuisine. Explain how to make a perfect omelette, including tips for choosing ingredients, cooking techniques, and common mistakes to avoid.
Use roles to get responses in a specific style or expertise. Try combining roles with context for even more tailored outputs.
Best Practices for Role Instructions
- Be specific about the role or persona (e.g., "You are a math teacher" or "You are a customer support agent").
- Combine roles with context and instructions for best results.
- Use roles to control tone, formality, or expertise level.
