What is question answering (QA)?

Question answering (QA) is the natural language processing task of answering a question asked in natural language, either by extracting the answer from a text or by generating it with a model.

It differs from Retrieval-Augmented Generation in level: QA is a task, while RAG is an architecture that retrieves sources before generating and can be used in QA systems. QA is not limited to large language models; retrieval and rule-based methods are used too.

Topic
Natural language processing and Turkish
Also known as
QA

How question answering (QA) works

In extractive QA the model marks where the answer starts and ends in a given text. In generative QA a language model writes the answer freely; with supplied context this is open-book, without it closed-book.

In document-based systems a retrieval step finds relevant passages and the model answers from them with citations. Where the source lacks the information, the model should say so rather than guess. Performance is measured with exact match, F1, citation accuracy and faithfulness.

In more detail

Unanswerable questions and abstention

In enterprise QA, knowing when not to answer, selective abstention, is as critical as answering accurately. Benchmarks such as SQuAD 2.0 introduced unanswerable questions specifically to test whether models abstain rather than fabricate plausible text when context lacks the evidence; modern systems combine retrieval confidence thresholds with faithfulness checks before returning a response.

Types of QA: reading comprehension, open-domain, multi-hop and conversational

QA spans distinct settings: machine reading comprehension (answering from a supplied passage), open-domain QA (retrieving from a large corpus before answering), multi-hop QA (combining facts across multiple documents, as in HotpotQA) and conversational QA (handling follow-up turns). Each setting requires different retrieval architectures and evaluation datasets.

Evaluation metrics for extractive versus generative QA

Evaluating extractive QA relies on Exact Match (EM) and token-level F1 against gold spans, whereas generative QA requires semantic and groundedness metrics because valid answers can be phrased in different ways. Frameworks such as ALCE and RAGAS measure citation precision and recall and faithfulness (whether every claim in the answer is entailed by the retrieved passages) alongside LLM-as-a-judge or human review.

Long-context models versus retrieval-based QA

With context windows in current models reaching hundreds of thousands or millions of tokens, short document collections can sometimes be placed directly in the prompt without a vector index. However, for large dynamic enterprise corpora, long-context prompting suffers from higher per-query latency, rising compute cost, context rot (lost-in-the-middle degradation) and lack of granular document-level access control, keeping retrieval-based QA essential.

Commonly confused terms

TermHow it differs
Information retrievalInformation retrieval (IR) returns a ranked list of relevant documents or passages for a query, whereas question answering synthesises or extracts a direct, specific answer to the question itself.

Why question answering (QA) matters for on-premises AI

Internal policies, technical manuals and contract archives can be queried in natural language without leaving the organisation. Permissions must hold in both retrieval and answering, so users never get answers from documents they cannot see (permission-aware retrieval). In regulated processes, citations showing which document an answer rests on are needed for the audit trail. As the core task of in-house assistants, answer quality shapes user trust directly.

ON-PREMISES EXAMPLE

At a telecoms operator, a field technician asks the in-house assistant for a maintenance procedure; the system answers only from documents the technician may access and shows the sections it used.

Common questions

When is extractive QA chosen over generative QA?

Extractive QA suits answers that appear verbatim in one passage and settings with limited hardware. Generative QA is chosen when several documents must be combined.

Is an answer with a citation always correct?

No. Whether the cited source really supports the answer and whether the answer is faithful to it are checked separately.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, M to Q

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.