0
0
Prompt Engineering / GenAIml~20 mins

Instruction formatting in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Instruction Formatting Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Instruction Formatting Impact
Which of the following best describes why clear instruction formatting is important when using generative AI models?
AIt guarantees the model will always produce error-free code regardless of input.
BIt reduces the model's training time significantly by skipping data preprocessing.
CIt helps the model understand the task better, leading to more accurate and relevant outputs.
DIt allows the model to generate outputs without any need for user input.
Attempts:
2 left
💡 Hint
Think about how clear instructions affect the model's understanding.
Predict Output
intermediate
2:00remaining
Output of Instruction with Ambiguous Formatting
What will be the output of the following prompt given to a generative AI model? "Generate a Python function that adds two numbers and returns the result. Use clear variable names." Assuming the model follows instructions literally, what is the likely output?
Prompt Engineering / GenAI
def add_numbers(a, b):
    return a + b
A
def add_numbers(a, b):
    return a + b
B
def add(x, y):
    return x + y
C
def addNumbers(a,b):
    return a+b
D
def add_two_numbers(num1, num2):
    return num1 + num2
Attempts:
2 left
💡 Hint
Look for the exact variable names used in the prompt.
Model Choice
advanced
2:00remaining
Choosing Model Type Based on Instruction Complexity
You want to generate detailed step-by-step explanations for complex math problems using a generative AI. Which model type is best suited for this task?
AA model trained exclusively on code snippets without natural language understanding.
BA model specialized only in image recognition tasks.
CA small, fast model optimized for short text completions.
DA large language model trained on diverse datasets with strong reasoning capabilities.
Attempts:
2 left
💡 Hint
Consider the need for reasoning and detailed explanations.
Hyperparameter
advanced
2:00remaining
Effect of Temperature on Instruction Output
When generating text from a generative AI model, what is the effect of increasing the 'temperature' hyperparameter?
AThe output becomes shorter and more concise.
BThe output becomes more random and creative, with less predictable word choices.
CThe model runs faster but with lower accuracy.
DThe output is guaranteed to be grammatically correct.
Attempts:
2 left
💡 Hint
Think about randomness and creativity in text generation.
Metrics
expert
2:00remaining
Evaluating Instruction Following with BLEU Score
You want to measure how well a generative AI model follows instructions by comparing its output to a reference answer. Which metric is most appropriate for this task?
ABLEU score, which measures overlap of n-grams between generated and reference text.
BMean Squared Error, which measures numeric differences between outputs.
CAccuracy, counting exact matches only.
DConfusion matrix, showing true vs predicted classes.
Attempts:
2 left
💡 Hint
Consider metrics used for comparing text similarity.