Define the QA task
Decide whether the system should extract spans (reading comprehension), generate answers, or retrieve and then read documents; pick matching datasets and metrics.
Question answering system. Manage ambiguous or missing answers.
A question answering system returns concise answers from source text or documents. Practical challenges include retrieving relevant context, handling ambiguous or unanswerable questions, and evaluating answer correctness and completeness.
Learning concept · Not a validated service
A question answering system returns concise answers from source text or documents. Practical challenges include retrieving relevant context, handling ambiguous or unanswerable questions, and evaluating answer correctness and completeness.
A proposed application: provide short factual answers over a company help centre or internal policy documents, with a human reviewer validating uncertain outputs before publication.
Decide whether the system should extract spans (reading comprehension), generate answers, or retrieve and then read documents; pick matching datasets and metrics.
Collect paired (question, context, answer) examples and include unanswerable and adversarial queries to expose failure modes.
Start with a retriever plus reader or a pre-trained transformer fine-tuned on SQuAD-style data, and measure exact match and F1 on held-out examples.
Report EM/F1, inspect hallucinations and ambiguous cases, and add a human-in-the-loop step for low-confidence answers.
The supplied starter splits six short, hand-written sentences with binary labels, fits a TF-IDF (unigram+bigram) vectoriser and a LogisticRegression pipeline, prints a classification report on a tiny test split, and shows one sample prediction. It does not implement question answering, retrieval, reading comprehension, or an answer-generation model.
model = Pipeline(
steps=[
("tfidf", TfidfVectorizer(ngram_range=(1, 2), min_df=1)),
("classifier", LogisticRegression(max_iter=1000)),
]
)
model.fit(X_train, y_train)
predictions = model.predict(X_test)The code is a binary text classifier on six example sentences; it contains no QA dataset, no retrieval or context-passage component, and no reading-comprehension or generative answer model required for question answering.
Proposed extension: replace the starter data with a small (question, context, answer) dataset, add a retriever to select relevant documents and fine-tune a reader model to extract or generate answers, then surface low-confidence answers to human reviewers.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.