Challenge - 5 Problems
Extractive QA Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the main goal of extractive question answering?
In extractive question answering, what is the system primarily designed to do?
Attempts:
2 left
💡 Hint
Think about whether the answer is created or taken directly from the text.
✗ Incorrect
Extractive QA systems find and return a specific part of the text that answers the question, rather than generating new text.
❓ Predict Output
intermediate1:30remaining
Output of extractive QA model span prediction
Given a passage and a question, an extractive QA model outputs start and end indices of the answer span. If the passage is "The sky is blue and clear today." and the model predicts start index 3 and end index 5, what is the extracted answer?
NLP
passage = "The sky is blue and clear today." start_idx = 3 end_idx = 5 words = passage.split() answer = ' '.join(words[start_idx:end_idx+1]) print(answer)
Attempts:
2 left
💡 Hint
Check the words between indices 3 and 5 inclusive.
✗ Incorrect
Splitting the passage into words, indices 3 to 5 correspond to 'blue', 'and', 'clear'.
❓ Model Choice
advanced2:00remaining
Best model architecture for extractive QA
Which model architecture is most suitable for extractive question answering tasks?
Attempts:
2 left
💡 Hint
Extractive QA requires locating answer spans, not generating new text.
✗ Incorrect
Models like BERT fine-tuned for extractive QA predict start and end positions of the answer span in the input text.
❓ Metrics
advanced1:30remaining
Which metric best evaluates extractive QA performance?
For extractive question answering, which metric is commonly used to measure how well the predicted answer matches the true answer span?
Attempts:
2 left
💡 Hint
Think about a metric that checks if the predicted answer exactly matches the true answer.
✗ Incorrect
Exact Match (EM) measures the percentage of predictions that exactly match the ground truth answer span.
🔧 Debug
expert2:30remaining
Why does this extractive QA model fail to find the answer span?
A fine-tuned extractive QA model always predicts the start and end indices as 0, regardless of input. What is the most likely cause?
NLP
def predict_span(model, input_ids): start_scores, end_scores = model(input_ids) start_index = start_scores.argmax() end_index = end_scores.argmax() return start_index, end_index # Model always returns start_index=0 and end_index=0
Attempts:
2 left
💡 Hint
Consider what happens if the model is not trained on the task.
✗ Incorrect
Without fine-tuning, the model outputs uniform or default scores, causing argmax to pick index 0 always.