Interactive Query Answering on Knowledge Graphs with Soft Entity Constraints
Daniel Daza, Alberto Bernardi, Luca Costabello, Christophe Gueret, Masoud Mansoury, Michael Cochez, Martijn Schut
TL;DR
This work tackles query answering on knowledge graphs under incomplete data by introducing soft constraints that capture user preferences through interactive, example-based feedback. It formalizes an interactive reranking framework and proposes two lightweight methods—Cosine (linear) and Neural Query Reranker (NQR)—that adjust base QA scores while preserving global ranking structure. By extending existing QA benchmarks with automatically generated soft constraints, the authors demonstrate that the methods can meaningfully steer rankings toward semantically related answers with minimal computational overhead. The results reveal a favorable trade-off between preserving original query performance and aligning results with user-specified soft constraints, enabling practical, interactive knowledge graph querying. The approaches are compatible with existing QA models and offer interpretable, tunable controls for domain experts to balance constraint satisfaction and ranking fidelity in real time.
Abstract
Methods for query answering over incomplete knowledge graphs retrieve entities that are \emph{likely} to be answers, which is particularly useful when such answers cannot be reached by direct graph traversal due to missing edges. However, existing approaches have focused on queries formalized using first-order-logic. In practice, many real-world queries involve constraints that are inherently vague or context-dependent, such as preferences for attributes or related categories. Addressing this gap, we introduce the problem of query answering with soft constraints. We formalize the problem and introduce two efficient methods designed to adjust query answer scores by incorporating soft constraints without disrupting the original answers to a query. These methods are lightweight, requiring tuning only two parameters or a small neural network trained to capture soft constraints while maintaining the original ranking structure. To evaluate the task, we extend existing QA benchmarks by generating datasets with soft constraints. Our experiments demonstrate that our methods can capture soft constraints while maintaining robust query answering performance and adding very little overhead. With our work, we explore a new and flexible way to interact with graph databases that allows users to specify their preferences by providing examples interactively.
