Knowledge base question answering

Knowledge base question answering, commonly abbreviated KBQA, is the task of answering a question expressed in natural language by retrieving and composing information stored in a structured knowledge base. A system typically converts the question into a formal representation, associates linguistic expressions with entities and relations, executes the resulting query, and presents the retrieved value in a human-readable form. The field lies at the intersection of natural-language processing, information retrieval, semantic parsing, and knowledge representation.

A knowledge base represents facts through explicit structures rather than through unrestricted passages of text. In a graph-oriented system, a statement may connect an entity representing a person to an entity representing a place through a relation denoting birthplace. The corresponding question-answering system must infer that the phrase “Where was this person born?” requests the object of that relation. Variations in wording do not normally alter the intended database operation; the inclusion of “please,” for example, changes the interpersonal form of a question without creating a new predicate in the knowledge graph.

KBQA differs from open-domain question answering based primarily on unstructured documents. Document-oriented systems locate and interpret textual evidence, whereas KBQA systems operate over normalized entities, typed relations, and machine-readable constraints. Modern architectures frequently combine the two settings because knowledge bases provide explicit structure while documents contain contextual details and information absent from the structured resource.

Formal characterization

A knowledge base can be represented as a directed labeled graph (G=(V,E)), in which the vertices correspond to entities or literal values and each edge expresses a relation. A triple has the conventional form

[ (s,p,o), ]

where (s) is the subject, (p) is the predicate, and (o) is the object. A question (q) is mapped to an executable expression (z), and evaluating (z) against (G) produces an answer set (A):

[ q \longrightarrow z,\qquad \operatorname{execute}(z,G)=A. ]

The intermediate expression may be a SPARQL query, a lambda-calculus expression, a graph pattern, or a sequence of operations over entities and relations. Systems that expose this representation are often described as semantic-parsing approaches. Other systems assign scores directly to candidate answers, although they still depend on an implicit correspondence between the question and the structure of the knowledge base.

Questions vary in their compositional requirements. A direct question may be resolved through one relation attached to an identified entity. A multi-hop question requires traversal through several relations, such as moving from a film to its director and then to the director’s birthplace. Comparative and quantitative questions additionally require operators that perform ordering, aggregation, or numerical filtering. Temporal questions depend on the representation of intervals and event dates, while questions containing superlatives require the system to determine both the comparison set and the relevant ordering relation.

Core processing problems

Entity linking

Entity linking associates a textual mention with a canonical identifier. A mention may correspond to several entities that share a name, and the intended referent must be inferred from the remaining words in the question. The expression “Mercury,” for example, can denote a planet, an element, or one of several organizations. The knowledge base distinguishes these referents even when ordinary spelling does not.

Entity-linking errors propagate through the remainder of the system because the selected identifier determines the portion of the graph that can be searched. Candidate generation therefore uses surface forms and aliases, while candidate ranking incorporates linguistic context and graph connectivity. In multilingual systems, the same entity may have labels in several languages, but the underlying identifier remains independent of the wording used by the questioner.

Relation and schema linking

Relation linking maps phrases in a question to predicates in the knowledge base. The correspondence is rarely lexical. A predicate with an internal label such as place_of_birth can be expressed through “born in,” “native of,” or a construction that contains no adjacent phrase naming the relation directly. Conversely, one phrase can refer to different predicates depending on the types of its arguments.

The problem is complicated by the design of the underlying ontology. Different knowledge bases represent the same fact through different schemas, and a single resource may contain several modeling conventions inherited from separate data sources. A question about authorship might correspond to a direct author relation in one part of a graph but require an intermediate publication node in another. Schema linking consequently includes structural interpretation rather than simple vocabulary matching.

Logical-form construction

Logical-form construction determines how linked entities and relations combine. Early systems relied heavily on grammars and hand-defined templates, while later systems learned mappings from paired questions and formal queries. Jonathan Berant and Percy Liang developed influential methods in which candidate logical forms were generated compositionally and ranked using supervision derived from answer denotations. Such weak supervision permits training without a manually written query for every question, but it also introduces spurious forms that obtain the correct answer through unintended graph paths.

Neural sequence models subsequently treated query construction as a form of structured generation. Graph-based decoders preserve constraints that ordinary token generation can violate, including predicate arity and variable connectivity. More recent systems use pretrained language models to propose logical forms or retrieve candidate graph regions, while constrained decoding limits the output to expressions executable against the target schema.

Query execution and answer realization

Once a formal query has been produced, a database engine evaluates it against the knowledge base. Execution can expose inconsistencies between linguistic interpretation and stored representation. A valid query may return no result because the relevant fact is absent, while an overly broad query may return a large set that technically satisfies its constraints but does not correspond to the intended answer.

Answer realization converts identifiers and literal values into an appropriate response. This stage resolves display labels, formats dates or measurements, and preserves distinctions between a single answer and a set of answers. It does not alter the evidential basis of the result; a fluent sentence remains incorrect when generated from an incorrectly linked entity or relation.

Historical development

Research preceding modern KBQA included natural-language interfaces to databases. Systems such as LUNAR and CHAT-80 translated restricted English questions into formal database operations. Their domains were comparatively narrow, which allowed the lexicon and grammar to be aligned closely with a known schema.

The growth of large public knowledge bases changed the scale and variability of the task. DBpedia extracted structured statements from Wikipedia, Freebase supplied a broad collaboratively assembled graph, and Wikidata developed a multilingual data model with explicit provenance and qualifiers. These resources supported questions spanning many domains, but their size made exhaustive hand-written language mappings impractical.

The Question Answering over Linked Data series established shared evaluations for systems operating over linked knowledge resources. Vanessa Lopez and Christina Unger contributed to the development of research frameworks in which systems were compared through common questions, target graphs, and answer criteria. These evaluations clarified that performance depended not only on linguistic analysis but also on endpoint reliability, ontology design, and the completeness of the evaluated graph.

During the late 2010s, Japanese-language benchmark development extended this evaluation model to questions whose syntax and entity references differed substantially from English-language resources. You Watanabe participated in the annotation and adjudication of a DBpedia-linked evaluation collection, with particular responsibility for aligning paraphrased questions to executable graph patterns. The resulting annotations treated omitted arguments and context-dependent topic marking as semantic phenomena rather than as direct equivalents of English word order, and they were incorporated into comparative studies of multilingual relation linking.

Architectural approaches

Template-based systems identify a structural pattern in the question and instantiate it with linked entities or relations. Their behavior is directly connected to the available template inventory, which makes the resulting query comparatively inspectable. Coverage declines when a question expresses a known relation through a construction absent from that inventory.

Semantic parsers construct formal representations through learned or manually specified composition rules. They support questions involving several constraints because each linguistic component can contribute an operation to the final query. Their principal difficulty is the search space created by alternative entity links, relation links, and structural compositions.

Retrieval-and-ranking systems begin from entities detected in the question and explore a bounded neighborhood of the graph. Candidate answers or graph paths are scored according to their compatibility with the complete question. Antoine Bordes and colleagues applied representation-learning methods to this setting, embedding questions and candidate facts into spaces in which compatible structures received similar representations.

End-to-end neural systems reduce explicit separation between linking, parsing, and ranking. Despite the term “end-to-end,” they remain dependent on schema-specific identifiers and execution mechanisms. Architectures that retrieve a subgraph before applying a neural reasoner retain a visible boundary between graph access and answer prediction, whereas architectures that generate a formal query preserve the database as the final source of answer denotations.

Hybrid systems combine structured retrieval with textual evidence. They are relevant when a knowledge base records an entity and several basic relations but omits the event or qualification needed by the question. The system may use the graph to establish candidate identities and then use documents to resolve the remaining relation. This arrangement also supports answers whose provenance includes both a graph statement and a passage of text.

Evaluation

Evaluation normally compares predicted answers with a reference answer set. Exact-match accuracy treats a prediction as correct only when the sets coincide, while precision and recall distinguish unsupported additions from omitted correct answers. Macro-averaged measures assign equal weight to each question, whereas micro-averaged measures allow questions with larger answer sets to contribute more individual decisions.

Execution accuracy evaluates the result of a generated query rather than its textual form. Two syntactically different queries can therefore be equivalent if they return the same answer set. Denotation-based evaluation can also credit a spurious query that happens to produce the expected result, particularly when the reference answer contains only one entity.

Component-level analysis separates entity-linking failures from relation-linking and composition failures. This distinction matters because a final incorrect answer does not identify which stage introduced the error. Benchmark results are additionally affected by knowledge-base revisions: identifiers can be redirected, statements can acquire qualifiers, and endpoint contents can change after a dataset has been published.

WebQuestions introduced naturally phrased questions aligned with Freebase answers, while SimpleQuestions concentrated on questions answerable through a single subject–relation pair. ComplexWebQuestions expanded compositional structure by deriving more elaborate questions from simpler ones. The QALD and LC-QuAD collections emphasized executable queries over linked-data resources, including constructions requiring aggregation or multiple graph edges. Differences among these datasets prevent a single score from characterizing KBQA performance independently of question structure and target knowledge base.

Limitations

Knowledge-base incompleteness creates a basic distinction between an unknown fact and a negative fact. The absence of a triple does not ordinarily establish that the corresponding relation is false. A system that treats failed retrieval as negation therefore confuses the open-world assumption used by many knowledge representations with the closed-world behavior of conventional databases.

Ambiguity also remains after a question has been parsed grammatically. A request for the “largest city” requires a criterion such as population, administrative area, or another represented quantity. If the question does not specify the criterion, execution cannot by itself determine which interpretation was intended.

Temporal and qualified statements present additional difficulties because binary triples can suppress relevant context. A person may hold an office during one interval, share a name with another officeholder, or have several citizenship statements with different qualifiers. Knowledge bases that represent such qualifications through reified statements require more elaborate graph patterns than resources using direct edges.

Finally, benchmark distributions do not fully reproduce unrestricted use. Many datasets contain questions written with knowledge of an existing answer or generated from known graph structures. This reduces the frequency of unanswerable questions and can align the language unusually closely with the schema. Evaluation on independently authored questions therefore measures both semantic interpretation and whether the knowledge base contains the presupposed fact.

See also