0
0
NLPml~20 mins

Few-shot learning with prompts in NLP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Few-shot Learning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the main advantage of few-shot learning with prompts?

Few-shot learning with prompts allows a model to perform new tasks with very few examples. What is the primary advantage of this approach compared to traditional supervised learning?

AIt ignores the context of the input data.
BIt requires a large labeled dataset for every new task.
CIt trains the model from scratch for each new task.
DIt enables the model to generalize to new tasks with minimal labeled data.
Attempts:
2 left
💡 Hint

Think about how few-shot learning reduces the need for large datasets.

Predict Output
intermediate
2:00remaining
Output of a few-shot prompt example

Given the following prompt to a language model, what is the expected output?

NLP
prompt = '''Translate English to French:

English: "I love apples."
French: "J'aime les pommes."

English: "She is happy."
French: '''

# Model generates the French translation for "She is happy."
A"Elle est content."
B"Elle est heureuse."
C"Elle est triste."
D"Elle est faim."
Attempts:
2 left
💡 Hint

Consider the correct French translation for "She is happy."

Model Choice
advanced
2:00remaining
Choosing a model for few-shot learning with prompts

You want to perform few-shot learning on a text classification task using prompts. Which model type is best suited for this?

AA large pretrained language model like GPT-3.
BA small CNN trained from scratch on the task data.
CA simple logistic regression on bag-of-words features.
DA decision tree trained on handcrafted features.
Attempts:
2 left
💡 Hint

Few-shot learning with prompts works best with large pretrained language models.

Hyperparameter
advanced
1:30remaining
Key hyperparameter affecting few-shot prompt performance

When using few-shot learning with prompts, which hyperparameter most directly affects how many examples are shown in the prompt?

ALearning rate
BBatch size
CNumber of shots
DDropout rate
Attempts:
2 left
💡 Hint

Think about the term that describes how many examples you provide in the prompt.

Metrics
expert
2:00remaining
Evaluating few-shot prompt learning performance

You have a few-shot prompt-based model for sentiment classification. Which metric is most appropriate to evaluate its performance on a balanced test set?

AAccuracy
BPerplexity
CMean Squared Error (MSE)
DBLEU score
Attempts:
2 left
💡 Hint

Consider the task is classification and the test set is balanced.