0
0
Prompt Engineering / GenAIml~20 mins

Few-shot prompting in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Few-shot Prompting Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Few-shot Prompting Basics
What is the main advantage of few-shot prompting when using large language models?
AIt provides a few examples in the prompt to guide the model's output.
BIt allows the model to learn new tasks without any examples.
CIt requires retraining the model with a large dataset.
DIt reduces the model size to improve speed.
Attempts:
2 left
💡 Hint
Think about how few-shot prompting helps the model understand what you want by showing examples.
Predict Output
intermediate
2:00remaining
Predicting Output from Few-shot Prompt
Given this prompt to a language model, what is the most likely output? Prompt: "Translate English to French: 1. Hello -> Bonjour 2. Thank you -> Merci 3. Good night ->"
ABonne nuit
BBonsoir
CSalut
DAu revoir
Attempts:
2 left
💡 Hint
Look at the pattern of English phrases and their French translations.
Model Choice
advanced
2:00remaining
Choosing the Best Model for Few-shot Prompting
Which type of model is best suited for few-shot prompting tasks?
ASmall models trained only on specific tasks
BLarge pretrained language models with broad knowledge
CModels trained only on numerical data
DModels without any pretraining
Attempts:
2 left
💡 Hint
Few-shot prompting relies on the model's prior knowledge and ability to generalize.
Hyperparameter
advanced
2:00remaining
Effect of Temperature in Few-shot Prompting
In few-shot prompting, what effect does increasing the temperature parameter have on the model's output?
ADecreases the length of the output
BMakes the output more deterministic and repetitive
CMakes the output more random and creative
DStops the model from generating any output
Attempts:
2 left
💡 Hint
Temperature controls randomness in the model's choices.
Metrics
expert
2:00remaining
Evaluating Few-shot Prompting Performance
Which metric is most appropriate to evaluate the quality of few-shot prompting outputs for a text classification task?
ABLEU score
BMean Squared Error (MSE)
CPerplexity
DAccuracy
Attempts:
2 left
💡 Hint
Think about the task type and what metric measures correct predictions.