Open-domain QA systems answer questions from any topic using a large knowledge source. Closed-domain QA systems focus on a specific topic or dataset.
Which statement best describes the main difference?
Think about the scope of questions each system can handle.
Open-domain QA systems are designed to answer questions on any topic, often using large collections like Wikipedia. Closed-domain QA systems focus on a narrow area, such as medical records or legal documents.
Given a list of documents and a query, the code below finds documents containing the query word.
documents = ["The sky is blue.", "Grass is green.", "The sun is bright."] query = "sky" retrieved = [doc for doc in documents if query in doc] print(retrieved)
What is printed?
Check which document contains the word 'sky'.
The list comprehension filters documents containing the exact substring 'sky'. Only the first document contains it.
Open-domain QA often requires understanding questions and retrieving answers from large text collections.
Which model architecture is most appropriate?
Consider models designed for text understanding and generation.
Sequence-to-sequence transformer models like BERT or T5 are commonly fine-tuned for QA tasks because they understand context and generate answers. CNNs and RNNs for other domains are not suitable here.
Open-domain QA systems produce text answers to questions. Which metric below best measures answer correctness?
Think about metrics that compare predicted text answers to correct answers.
Exact Match (EM) is widely used in QA to check if the predicted answer exactly matches the reference answer. MSE and image accuracy are unrelated, and BLEU is less precise for short QA answers.
Consider this code snippet for retrieving documents containing a query word:
documents = ["The sky is blue.", "Grass is green.", "The sun is bright."] query = "Sky" retrieved = [doc for doc in documents if query in doc] print(retrieved)
Why is the output an empty list?
Check if the query matches the document text exactly including letter case.
String containment checks in Python are case sensitive. 'Sky' does not match 'sky' in the documents, so no documents are retrieved.