Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is Open-domain Question Answering (QA)?
Open-domain QA is a system that answers questions on any topic using a large collection of documents or knowledge sources, without being limited to a specific subject area.
Click to reveal answer
beginner
What are the two main steps in an Open-domain QA system?
1. Document Retrieval: Finding relevant documents or passages. 2. Answer Extraction: Selecting the exact answer from those documents.
Click to reveal answer
beginner
Why is document retrieval important in Open-domain QA?
Because it narrows down the huge amount of information to a smaller set of relevant texts, making it easier and faster to find the correct answer.
Click to reveal answer
intermediate
What is a common model type used for answer extraction in Open-domain QA?
Transformer-based models like BERT are commonly used because they understand context well and can find precise answers within text passages.
Click to reveal answer
beginner
How does Open-domain QA differ from Closed-domain QA?
Open-domain QA can answer questions on any topic using large, general knowledge sources, while Closed-domain QA focuses on a specific area with limited data.
Click to reveal answer
What is the first step in an Open-domain QA system?
ADocument Retrieval
BAnswer Extraction
CTraining the model
DData labeling
✗ Incorrect
The system first finds relevant documents before extracting answers.
Which model type is often used for extracting answers in Open-domain QA?
ATransformer-based models
BLinear Regression
CK-means clustering
DDecision Trees
✗ Incorrect
Transformer models like BERT understand context and extract answers well.
Open-domain QA systems can answer questions about:
AOnly legal topics
BAny topic
COnly medical topics
DOnly sports topics
✗ Incorrect
Open-domain QA covers any topic using large knowledge sources.
Why is document retrieval necessary in Open-domain QA?
ATo label data automatically
BTo train the model faster
CTo reduce the search space for answers
DTo generate questions
✗ Incorrect
Retrieval narrows down documents to find relevant information quickly.
Closed-domain QA differs from Open-domain QA because it:
AAnswers questions on any topic
BUses only images
CDoes not use machine learning
DFocuses on a specific subject area
✗ Incorrect
Closed-domain QA specializes in a limited topic or dataset.
Explain the two main steps of an Open-domain QA system and why each is important.
Think about how the system finds and then picks the answer.
You got /4 concepts.
Describe how Open-domain QA differs from Closed-domain QA in terms of scope and data.
Consider the range of questions each can answer.
You got /4 concepts.
Practice
(1/5)
1. What is the main goal of open-domain question answering (QA)?
easy
A. To summarize a single document
B. To translate text from one language to another
C. To find answers to any question from a large collection of texts
D. To generate new text based on a prompt
Solution
Step 1: Understand the definition of open-domain QA
Open-domain QA aims to answer questions using a wide range of texts, not limited to a specific topic.
Step 2: Compare options with this definition
Only To find answers to any question from a large collection of texts matches this goal; others describe different NLP tasks.
Final Answer:
To find answers to any question from a large collection of texts -> Option C
Quick Check:
Open-domain QA = Finding answers from many texts [OK]
Hint: Open-domain QA means answering questions from many texts [OK]
Common Mistakes:
Confusing QA with translation
Thinking QA only summarizes text
Mixing QA with text generation
2. Which of the following is the correct sequence of steps in an open-domain QA system?
easy
A. Classify questions, then ignore documents
B. Generate answers first, then find documents
C. Summarize documents, then translate answers
D. Retrieve relevant documents, then read and extract answers
Solution
Step 1: Recall the typical open-domain QA pipeline
It first retrieves relevant documents, then reads them to find answers.
Step 2: Match options to this pipeline
Only Retrieve relevant documents, then read and extract answers correctly describes this order; others are incorrect or unrelated.
Final Answer:
Retrieve relevant documents, then read and extract answers -> Option D
Quick Check:
QA steps = Retrieve then read [OK]
Hint: QA first finds texts, then reads for answers [OK]
Common Mistakes:
Thinking answer generation happens before retrieval
Confusing summarization with QA
Ignoring the retrieval step
3. Given this Python snippet using a pretrained QA model:
from transformers import pipeline
qa = pipeline('question-answering')
context = "The Eiffel Tower is in Paris."
question = "Where is the Eiffel Tower located?"
result = qa(question=question, context=context)
print(result['answer'])
What will be printed?
medium
A. Paris
B. Eiffel Tower
C. question-answering
D. The Eiffel Tower
Solution
Step 1: Understand the QA pipeline usage
The pipeline takes a question and context, then returns the answer span from the context.
Step 2: Identify the answer span in the context
The question asks for location; context says "The Eiffel Tower is in Paris." The answer is "Paris".
Final Answer:
Paris -> Option A
Quick Check:
Answer extracted = Paris [OK]
Hint: QA model returns the answer span from context [OK]
Common Mistakes:
Printing the question instead of answer
Confusing the model name with output
Selecting the full sentence instead of answer span
4. You have this code snippet for open-domain QA:
from transformers import pipeline
qa = pipeline('question-answering')
context = "Mount Everest is the highest mountain."
question = "What is the highest mountain?"
result = qa(question=question, context=context)
print(result['answer'])
But it raises a KeyError: 'answer'. What is the likely cause?
medium
A. The context is empty
B. The pipeline was not properly initialized for question-answering
C. The question is not a string
D. The print statement is incorrect
Solution
Step 1: Analyze the error KeyError: 'answer'
This error means the result dictionary does not have the key 'answer'.
Step 2: Check pipeline initialization
If the pipeline is not correctly set for 'question-answering', the output format differs and lacks 'answer'.
Final Answer:
The pipeline was not properly initialized for question-answering -> Option B
Quick Check:
Wrong pipeline type causes missing 'answer' key [OK]
Hint: Ensure pipeline type matches task to get correct keys [OK]
Common Mistakes:
Assuming context is empty without checking
Ignoring pipeline initialization errors
Misreading error as print statement issue
5. You want to improve an open-domain QA system that sometimes returns wrong answers because it reads irrelevant documents. Which approach helps most?
hard
A. Improve the document retrieval step to find more relevant texts
B. Use a smaller pretrained model to speed up reading
C. Remove the retrieval step and read all documents
D. Translate questions to another language before answering
Solution
Step 1: Identify the problem cause
Wrong answers happen because the system reads irrelevant documents.
Step 2: Choose the best fix
Improving retrieval to get relevant documents reduces wrong answers effectively.
Final Answer:
Improve the document retrieval step to find more relevant texts -> Option A