Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesPrompt Engineering Interactive Tutorial: Based on Anthropic MaterialsAssigning Roles (Role Prompting)
Email data separated from the instruction by email tagsA language model continues the phrase “Unfortunately,” and picks the next word from three optionsA prompt made of four parts: role, task, context, format
Course

Prompt Engineering Interactive Tutorial: Based on Anthropic Materials

Module 1 · Structure and Clarity Foundations
01Basic Prompt Structure02Being Clear and Direct
Module 2 · Roles, Data, and Formatting
03Assigning Roles (Role Prompting)04Separating Data and Instructions05Formatting Output: XML Tags and Structured Outputs
Module 3 · Thinking, Examples, and Hallucinations
06Precognition: Thinking Step by Step07Using Examples (Few-Shot Prompting)08Avoiding Hallucinations
Module 4 · Complex Prompts and Chaining
09Complex Prompts from Scratch10Chaining Prompts
Prompt Engineering Interactive Tutorial: Based on Anthropic Materials · Lesson 3

Assigning Roles (Role Prompting)

How a role in the system prompt changes the tone and focus of a reply, from a cat to a logic bot, how to set a role with the system parameter in the API, and why the tutorial's logic example needs retesting on current models.

20 min readUpdated Dec 2, 20263 questions in quizReady prompt included
🔒

Full lesson access

Assigning Roles (Role Prompting) opens after free sign-up: 7 days of full access to every course, no card needed.

Start 7-day free trial
Then Pro: $9/mo or $79/yr

View plans →

One trial lesson is open without sign-up: what a large language model is →

In this lesson
Why Give Claude a RoleSetting a Role Through the APIRoles and Logic: an Example From the TutorialBonus: Audience ContextWhere to Specify the RolePracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free