0
0
Prompt Engineering / GenAIml~20 mins

System prompts and role setting in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
System Prompt Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding the purpose of system prompts

What is the main role of a system prompt in a generative AI model interaction?

ATo set the behavior and style of the AI's responses
BTo provide the final output of the AI model
CTo train the AI model on new data
DTo collect user feedback after the interaction
Attempts:
2 left
💡 Hint

Think about how the AI knows how to respond in a certain way.

Model Choice
intermediate
1:30remaining
Choosing the right role setting for a customer support AI

You want to create a generative AI that acts as a friendly customer support agent. Which system prompt role setting best fits this goal?

A"You are a strict and formal assistant who only answers with yes or no."
B"You are a technical debugger who only provides code snippets."
C"You are a creative storyteller who writes poems."
D"You are a friendly and helpful customer support agent who explains things clearly."
Attempts:
2 left
💡 Hint

Consider the tone and purpose needed for customer support.

Predict Output
advanced
1:30remaining
Output of system prompt role setting in code

Given the following Python code snippet that sets a system prompt for an AI model, what will be the printed output?

Prompt Engineering / GenAI
system_prompt = "You are a polite assistant."
user_input = "Hello!"
response = f"System says: {system_prompt} User says: {user_input}"
print(response)
ASystem says: Hello! User says: You are a polite assistant.
BSystem says: You are a polite assistant. User says: Hello!
CYou are a polite assistant. Hello!
DError: Undefined variable 'response'
Attempts:
2 left
💡 Hint

Look at how the f-string formats the output.

Metrics
advanced
1:30remaining
Evaluating system prompt effectiveness with user satisfaction

You test two different system prompts for an AI assistant. Prompt A yields 85% user satisfaction, and Prompt B yields 75%. Which metric best explains the difference?

AUser satisfaction score
BModel training loss
CNumber of tokens generated
DCPU usage during inference
Attempts:
2 left
💡 Hint

Think about what measures how happy users are with the AI's responses.

🔧 Debug
expert
2:00remaining
Debugging a system prompt causing unexpected AI behavior

An AI assistant is set with this system prompt: "You are a sarcastic assistant." However, the AI responds very politely without sarcasm. What is the most likely cause?

AThe AI is offline and not generating responses
BThe AI model cannot understand sarcasm
CThe system prompt is overridden or ignored by later instructions
DThe user input is too short
Attempts:
2 left
💡 Hint

Consider how system prompts interact with other instructions.