forked from rohitg00/ai-engineering-from-scratch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz.json
More file actions
102 lines (102 loc) · 3.83 KB
/
Copy pathquiz.json
File metadata and controls
102 lines (102 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"lesson": "13-question-answering",
"title": "Question Answering Systems",
"questions": [
{
"stage": "pre",
"question": "What does extractive QA predict?",
"options": [
"A generated natural-language answer",
"A confidence score only",
"Start and end token indices of the answer span within a given passage",
"A retrieved passage ID"
],
"correct": 2,
"explanation": "Extractive QA outputs the span of the passage that contains the answer."
},
{
"stage": "pre",
"question": "What two components define a basic RAG pipeline?",
"options": [
"An encoder and a decoder trained jointly",
"A reranker and a translator",
"Tokenizer and POS tagger",
"A retriever (find relevant passages) and a reader (extract or generate the answer)"
],
"correct": 3,
"explanation": "RAG = retriever (finds relevant context) plus reader (answers from it)."
},
{
"stage": "check",
"question": "On SQuAD, what does Exact Match (EM) measure?",
"options": [
"Edit distance",
"Per-word overlap",
"Whether the prediction matches the reference exactly after normalization (lowercase, strip punctuation, remove articles)",
"Token-level F1"
],
"correct": 2,
"explanation": "EM is strict equality after a defined normalization step; partial matches score zero."
},
{
"stage": "check",
"question": "What does deepset/roberta-base-squad2 add over a SQuAD 1.1 model?",
"options": [
"Multilingual support",
"Training on unanswerable questions so the model can predict a null answer",
"Bigger context window",
"Cross-lingual retrieval"
],
"correct": 1,
"explanation": "SQuAD 2.0 includes unanswerable items; models trained on it can predict 'no answer'."
},
{
"stage": "check",
"question": "Which RAGAS dimension targets hallucinations specifically?",
"options": [
"Answer relevance",
"Context recall",
"Faithfulness, measured by NLI entailment between answer claims and retrieved context",
"Context precision"
],
"correct": 2,
"explanation": "Faithfulness checks each answer claim against retrieved context via NLI entailment."
},
{
"stage": "post",
"question": "Why should you measure retrieval recall before evaluating reader accuracy?",
"options": [
"Required by transformers",
"Recall determines ROUGE",
"Reader latency depends on it",
"If the correct passage is not in the top-k, the reader cannot succeed regardless of how good it is"
],
"correct": 3,
"explanation": "A reader cannot answer when the right passage is missing; retrieval recall bounds reader performance."
},
{
"stage": "post",
"question": "Which prompt pattern reduces hallucinations in RAG generation?",
"options": [
"Telling the model to answer only from the provided context and to reply 'I don't know' when the context is insufficient",
"Including more passages",
"Asking the model to be creative",
"Removing the question"
],
"correct": 0,
"explanation": "Grounding + explicit refusal instructions cuts hallucination rates substantially."
},
{
"stage": "post",
"question": "When is extractive QA still preferred over generative RAG in 2026?",
"options": [
"Conversational QA",
"Regulated domains (legal, medical, audit) where literal quotation from authoritative sources is required",
"Multilingual support",
"Open-domain trivia"
],
"correct": 1,
"explanation": "Extractive QA gives verbatim quotes from an authoritative corpus, which compliance contexts demand."
}
]
}