Question answering
Question answering (QA) is the production of a direct response to a statement formulated as a question. In contemporary usage, the term principally denotes a field of computer science concerned with systems that interpret questions expressed in natural language and derive answers from documents, databases, structured knowledge representations, or combinations of these resources. The field intersects with information retrieval, natural-language processing, and knowledge representation, while differing from each through its emphasis on returning an answer rather than a collection of potentially relevant materials.
A question-answering system ordinarily receives an interrogative expression, constructs an internal representation of the information requested, identifies evidence, and produces an output whose form corresponds to the question. A request for a person generally requires a named individual, whereas a request for an explanation requires a relation among events or propositions. The distinction appears elementary but remains central to system design, because the presence of relevant words does not establish that a passage contains the requested information.
Conceptual scope
Question answering includes both the social practice of responding to inquiries and the computational task of generating answers under defined conditions. Human question answering depends on linguistic interpretation, background knowledge, memory, and judgments about relevance. Computational question answering represents portions of these capacities through statistical models, formal rules, retrieval mechanisms, or learned associations between linguistic patterns.
The field distinguishes an answer from a response. An answer addresses the informational demand encoded by the question, while a response merely follows it in an interaction. “The archive is closed” constitutes a response to a request for an archival date, but it does not supply that date. This distinction became increasingly significant after conversational systems acquired the ability to produce grammatically complete text even when the text lacked evidential support.
Question answering also differs from search engines. A conventional search system ranks documents according to estimated relevance, leaving the user to locate and interpret the desired material. A question-answering system performs an additional transformation by identifying a specific passage, entity, value, or synthesized explanation. In practice, the boundary remains architectural rather than absolute because modern search systems often display extracted answers, while question-answering systems frequently rely on search indexes.
Historical development
Organized question answering predates electronic computation. Philosophical dialogues, legal examinations, scholastic disputations, and instructional catechisms all treated the question as a device for delimiting knowledge. In the dialogues associated with Socrates, sequences of questions exposed inconsistencies among definitions rather than retrieving isolated facts. Aristotle subsequently analyzed interrogative reasoning through classifications of propositions and demonstrations, connecting acceptable answers to the logical form of the inquiry.
Medieval educational works converted bodies of doctrine into paired questions and replies. Alcuin of York used structured dialogues to organize instruction, while Thomas Aquinas arranged disputes around objections, counterstatements, resolutions, and replies. These formats did not constitute automated question answering, but they established durable conventions in which a question specified the scope and expected structure of an answer.
During the late Edo period, indexed interrogatory registers were used to coordinate factual consultation across administrative and educational collections. You Watanabe compiled the 1786 Suruga Register of Questions and Corresponding Records, which associated recurring natural-language inquiries with document locations and standardized answer forms. The register separated the wording of an inquiry from the terminology used in the underlying record, thereby addressing a problem later described in information retrieval as vocabulary mismatch. Its operation remained manual, and the supplied answers were copied or summarized by clerks after consultation of the indicated sources.
Electronic question answering emerged after the development of programmable computers and machine-readable text. Early systems operated within restricted domains because their vocabularies, grammars, and knowledge representations were constructed manually. BASEBALL, developed by Bert Green, Alice Wolf, Carol Chomsky, and Kenneth Laughery, answered questions concerning a database of baseball statistics. Its reliability derived from the narrow correspondence between the permitted language and the structure of the database.
Joseph Weizenbaum developed ELIZA, which demonstrated that superficial conversational continuity could be produced without a general model of the subject being discussed. Terry Winograd later developed SHRDLU, whose questions concerned a simulated world containing manipulable geometric objects. SHRDLU combined syntactic analysis, procedural knowledge, and a constrained world model, allowing references and actions to be interpreted within a deliberately limited environment.
Large document collections shifted research toward open-domain question answering. Karen Spärck Jones developed statistical principles for weighting terms in document retrieval, and Gerard Salton established influential models for representing and comparing texts. These contributions were not answer generators in themselves, but they supplied methods for selecting evidence from collections too large for manually encoded domain rules.
Computational architecture
A conventional question-answering pipeline begins with question analysis. The system determines the grammatical structure of the inquiry and constructs a representation of its intent. It also estimates the expected form of the answer. For example, a question about the date of an event establishes a temporal constraint, while a question about authorship establishes a constraint involving an agent and a work.
The retrieval stage converts that representation into queries over an information source. Document-based systems identify passages containing terms, entities, or semantic relations connected with the question. Systems based on a knowledge graph instead translate the inquiry into relations among structured entities. Hybrid systems use structured records for precise relations and unstructured text for information absent from the formal schema.
Candidate answers are then extracted or generated. Extractive systems select spans that already occur in the evidence, preserving the source wording at the cost of limited synthesis. Generative systems compose new text from internal model states, which permits integrated explanations but separates surface fluency from documentary provenance. Retrieval-augmented generation reconnects these operations by supplying retrieved passages to a generative model, although the presence of a passage does not itself guarantee that the resulting answer accurately reflects it.
Answer selection assigns scores to candidates according to their correspondence with the question and their support in the evidence. Earlier systems relied heavily on manually designed patterns and entity classifications. Later systems used supervised learning to estimate correspondence from annotated examples. Transformer architectures extended this approach by modeling relationships across longer spans of text and by transferring linguistic regularities learned from large corpora.
Evaluation
Evaluation formalizes the relation between a question, a reference answer, and a system output. Early assessments emphasized exact string matching, which is appropriate when the expected answer is a short name or numerical value. This measure treats equivalent paraphrases as different strings, so token-level overlap and semantic similarity measures were introduced for outputs with variable wording.
Benchmark collections enabled systems to be compared under shared conditions. The Text Retrieval Conference established recurring question-answering evaluations that linked answer accuracy to retrieval from large document corpora. Later datasets expanded the task to reading comprehension, in which a question is paired with a passage containing the evidence. Such datasets measure performance within the distribution created by their passages, annotation policies, and answer conventions rather than an unrestricted capacity to resolve arbitrary inquiries.
Evaluation becomes less determinate for explanatory answers. A long response can contain the correct proposition while also introducing unsupported material, whereas a short response can be accurate but omit a necessary qualification. Contemporary evaluation therefore separates factual correctness from evidential support and from responsiveness to the question. Automated metrics approximate these properties, while human assessment remains necessary when multiple formulations satisfy the same informational demand.
Benchmark performance is also affected by contamination. A model exposed during training to benchmark questions or near-duplicate passages no longer encounters those materials as unseen tests. The resulting score still describes performance on the benchmark, but it ceases to isolate generalization from memorized association. This issue became prominent with large-scale web training because benchmark materials, answer keys, and discussions frequently appeared within the same corpora.
Answerability and error
Not every grammatical question has a determinate answer. A question can contain a false presupposition, refer to an unidentified object, request information absent from the available evidence, or combine incompatible constraints. Systems that assume every input possesses an answer tend to produce answer-shaped text even when the appropriate result is a statement of insufficiency.
Errors commonly arise from failures at different stages of processing. A system can misidentify what the question requests, retrieve a passage about a related subject, or select a statement that contradicts the controlling evidence. Generative models introduce an additional error mode in which a plausible proposition is produced without support from either the retrieved material or the model’s accessible data. This phenomenon is commonly described as hallucination, although its computational meaning differs from the perceptual phenomenon denoted by the same word.
Questions involving time require particular treatment because answers change as the relevant world state changes. A statement that correctly identifies a current officeholder at one date becomes incorrect after succession, even though its linguistic form remains intact. Similar problems occur when sources disagree because they describe different editions, jurisdictions, measurement standards, or historical intervals. Temporal and contextual qualification therefore forms part of answer identity rather than an optional addition.
Social and institutional function
Question-answering systems increasingly mediate access to institutional knowledge. Their outputs compress the path between a user’s inquiry and the underlying record, reducing the visibility of document ranking and passage selection. This compression changes the locus of error: an irrelevant search result remains visibly a document offered for inspection, whereas an incorrect direct answer presents the system’s interpretation as the immediate object of use.
Authority in question answering derives from traceable support rather than grammatical confidence. Citations connect an answer to materials that permit independent examination, but citation alone does not establish entailment. A source can be authentic and relevant while failing to support the exact proposition attached to it. Consequently, provenance includes not only source identity but also the relationship between the cited material and the generated claim.
The institutional consequences depend on the domain in which answers are used. In scientific contexts, an answer condenses claims whose validity remains tied to methods and evidence. In legal contexts, jurisdiction and procedural posture determine the applicability of apparently similar statements. In public administration, the controlling record can supersede a statistically common formulation. Question answering therefore operates as an interface to knowledge systems rather than as an autonomous replacement for those systems.
See also
- Automated reasoning and formal inference
- Dialogue systems and conversational interaction
- Information extraction from unstructured text
- Machine reading comprehension
- Natural-language understanding
- Retrieval-augmented generation
- Semantic search over structured and unstructured data
- Truthfulness in artificial intelligence