Course එකට ආපසු

Role Playing

20 මිනිත්තු📖Lecture

🎯 පාඩමේ අරමුණු

මේ පාඩම ඉවර වෙද්දී ඔයාට:

  • Roles assign කිරීම AI output dramatically improve කරන්නේ ඇයි තේරුම් ගන්න පුළුවන් වෙයි
  • Role categories හතර සහ ඒවා use කරන්න ඕන වෙලාවන් දැනගන්න පුළුවන් වෙයි
  • Complex tasks වලට role stacking master කරන්න පුළුවන් වෙයි
  • Common scenarios වලට ready-to-use role templates ලැබෙයි

📖 Roles වල Power එක

Fascinating දෙයක් තියෙනවා: එකම question different roles එක්ක completely different answers produce කරනවා.

Roles Work කරන්නේ ඇයි

ඔයා role එකක් assign කරනකොට, AI:

  • Vocabulary adjust කරනවා — Appropriate terminology use කරනවා
  • Depth change කරනවා — Technical අවශ්‍ය විදියට වැඩි අඩු කරනවා
  • Perspective shift කරනවා — Teacher explain කරනවා, expert deliver කරනවා
  • Expectations match කරනවා — Professional roles වලට professional output

🔬 එකම Question, Different Roles

Question: "CSS වල div එකක් center කරන්නේ කොහොමද?"

Role නැතුව
Specific Roles එක්ක
Generic response: 'margin: auto, flexbox, grid ඇතුළු ways කිහිපයක් තියෙනවා...'
Patient Teacher: 'හොඳ question එකක්! ඔයාගේ div එක wall එකක හරියටම මැද එල්ලන්න ඕන picture එකක් වගේ හිතන්න...'
Guidance නැතුව options හැම එකම list කරනවා
Senior Developer: 'Modern browsers වලට flexbox use කරන්න: display: flex; justify-content: center; align-items: center; parent එකේ.'
Beginners overwhelm වෙන්න පුළුවන්
Code Reviewer: 'ඔයාගේ current approach එක work කරනවා but browser compatibility issues තියෙනවා. More robust solution එකක් මෙන්න...'

Role එකෙන් response style එකයි usefulness එකයි completely change වෙනවා!


📚 Role Categories හතර

1. 🎓 Expertise Roles

Purpose: Best practices එක්ක professional-quality output ගන්න

RoleBest For
"Senior frontend developer"Web development tasks
"Python expert"Python-specific coding
"Database architect"Database design questions
"Security specialist"Security-related code
"DevOps engineer"Deployment, infrastructure

Example:

You are a senior React developer with 10 years of experience. Create a reusable button component with TypeScript.

2. 👨‍🏫 Teaching Roles

Purpose: Clear explanations සහ learning-focused responses ගන්න

RoleBest For
"Patient coding teacher"New concepts ඉගෙන ගන්න
"Tutor explaining to a 10-year-old"Very simple explanations
"Bootcamp instructor"Practical, hands-on guidance
"College professor"Thorough, academic explanations

Example:

You are a patient coding teacher who uses simple analogies. Explain what an API is to someone who has never programmed.

3. 🔍 Quality Roles

Purpose: Code quality improve කරන්න සහ issues catch කරන්න

RoleBest For
"Code reviewer"Bugs හොයන්න, code improve කරන්න
"UX designer who codes"User-friendly interfaces
"Performance expert"Code faster කරන්න
"Clean code advocate"Readable, maintainable code

Example:

You are a code reviewer focused on best practices. Review this code and suggest improvements: [code]

4. 🎨 Style Roles

Purpose: Specific tone, approach, හෝ aesthetic ගන්න

RoleBest For
"Minimalist developer"Simple, no-frills code
"Creative web designer"Visually interesting designs
"Practical engineer"No-nonsense, working solutions
"Encouraging mentor"Motivation සහ confidence building

Example:

You are a minimalist developer who values simplicity. Create the simplest possible navigation bar using only HTML and CSS.

🎭 Role Decision Guide

Right role එක choose කරන්න මේ table use කරන්න:

ඔයාට ඕනේ...මේ Role එක Use කරන්න
Work කරන Code"Senior [language] developer"
Concept එකක් තේරුම් ගන්න"Patient teacher"
Better code"Code reviewer"
Nice-looking design"UX designer who codes"
Simple solution"Minimalist developer"
Fast code"Performance expert"
Secure code"Security specialist"
Learning explanation"Tutor for beginners"

🔗 Advanced: Role Stacking

Complex tasks වලට multiple roles combine කරන්න:

Role Stacking

Formula: "You are a [role 1] AND [role 2]"

මේකෙන් perspectives දෙකෙනුම benefits ලැබෙනවා!

Role Stacking Examples:

Builder + Explainer:

You are an expert React developer AND a patient teacher. First, create a toggle switch component. Then, explain each line like I'm a beginner.

Creator + Critic:

You are a web developer AND a code reviewer. First, create a login form. Then, review your own code and suggest improvements.

Designer + Developer:

You are a UX designer AND a frontend developer. Create a pricing table that is both visually appealing and well-coded.

📝 Activity: Role Comparison

Roles action එකේදී බලන්න මේ experiment try කරන්න:

Role Responses Compare කරන්න

0/4

📋 Role Prompt Templates

මේ templates copy කරලා use කරන්න:

Features Build කරන්න:

Building Template
You are a senior [technology] developer building a professional [project type]. Create [specific feature] that [does what].
ChatGPTClaude

Learning වලට:

Learning Template
You are a patient coding teacher who uses simple analogies. Explain [concept] to someone who has never programmed before. Include a real-world example.
ChatGPTClaude

Code Review වලට:

Code Review Template
You are a senior developer doing a code review. Review this code for: - Bugs or potential errors - Performance issues - Readability improvements - Best practice violations [paste code here]
ChatGPTClaude

Design + Code වලට:

Design + Code Template
You are a UX designer who also writes clean code. Create [UI element] that is both visually appealing and well-implemented. Use [technologies].
ChatGPTClaude

⚠️ Common Role Mistakes

❌ Mistake
✅ Fix
Role task එකට match නැහැ: CSS question එකට 'Python expert'
CSS ගැන අහනකොට 'CSS expert' use කරන්න
Role vague: 'You are smart'
Specific වෙන්න: 'Senior developer with performance expertise'
Conflicting roles: 'Minimalist who writes extensive docs'
Task එකකට එක focus එකක් choose කරන්න
Follow-ups වලදී role අමතක වෙනවා
Responses drift වුනොත් AI ට role එක remind කරන්න

✅ පාඩමේ සාරාංශය

Key Takeaways

  1. Roles AI responses dramatically change කරනවා — එකම question, different answers
  2. Categories හතරක්: Expertise, Teaching, Quality, Style
  3. Role task එකට match කරන්න — Decision guide use කරන්න
  4. Role stacking complex tasks වලට benefits combine කරනවා
  5. Specific වෙන්න — "developer" නෙමෙයි "Senior React developer"

📝 Mini Quiz

📝 ඔයාගේ Understanding Check කරන්න

1/3

Which role is best for learning a new concept?