0
0
Prompt Engineering / GenAIml~20 mins

Message roles (system, user, assistant) in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Message Roles Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the role of the system message
In a chat-based AI model, what is the primary purpose of the system message role?
ATo provide instructions and set the behavior of the AI assistant
BTo generate the AI's responses to the user
CTo ask questions and provide user input to the AI
DTo store conversation history for later analysis
Attempts:
2 left
💡 Hint
Think about who controls the AI's style and rules.
Predict Output
intermediate
2:00remaining
Output of a chat message sequence
Given the following chat messages, what will the AI assistant reply? Messages: 1. System: "You are a helpful assistant." 2. User: "What is 2 + 2?" Assuming the AI correctly follows instructions, what is the assistant's reply?
A"I don't know."
B"2 + 2 equals 22."
C"Please provide more details."
D"4"
Attempts:
2 left
💡 Hint
The system message says the AI is helpful.
Model Choice
advanced
2:00remaining
Choosing the correct message role for user input
When sending a message to a chat AI model, which message role should be used to represent the human asking questions or giving commands?
Auser
Bsystem
Cassistant
Dmoderator
Attempts:
2 left
💡 Hint
Think about who is talking to the AI.
Metrics
advanced
2:00remaining
Evaluating assistant message quality
Which metric best measures how well the assistant messages follow the instructions given in the system message?
APerplexity on training data
BNumber of tokens generated
CInstruction adherence score from human evaluation
DModel size in parameters
Attempts:
2 left
💡 Hint
Think about measuring if the AI listens to the system message.
🔧 Debug
expert
3:00remaining
Identifying the cause of incorrect assistant behavior
A developer notices the AI assistant ignores the system message instructions and gives unrelated answers. Which is the most likely cause?
AThe user message was too short
BThe system message was not included in the chat messages sent to the model
CThe assistant message role was used for user input
DThe model size is too large
Attempts:
2 left
💡 Hint
Check if the AI received the instructions at all.