Query-Graph Compatibility: A Formal Pre-Condition for Faithful Knowledge-Grounded Language Model Generation

Knowledge-graph-based retrieval-augmented generation (KG-RAG) grounds large language model (LLM) outputs in structured facts by retrieving a query-relevant subgraph before generation. However, existing KG-RAG systems often assume that the retrieved graph contains sufficient evidence to answer the query. When this assumption fails, the LLM may produce an answer that is factually plausible but not faithfully grounded in the KG. To address this problem, we introduce Query-Graph Compatibility (QGC), a formal, model-independent pre-condition for faithful KG-grounded generation. Given a natural-language query parsed into a typed conjunctive query and a KG with schema, QGC checks whether the query has a valid typed match in the graph, formalized as a typed homomorphism. If QGC=0, the KG lacks the structural evidence required by the query, so no generation model, regardless of architecture or scale, can produce a faithful answer from the KG alone-a consequence that follows directly from our definitions but yields a checkable pre-generation condition. QGC inherits the classical complexity of conjunctive-query evaluation: NP-complete in general, yet tractable for the bounded-width query structures that cover all KGQA queries in our evaluation. We validate QGC across six datasets and four domains. Under controlled edge deletion on MetaQA, QGC predicts LLM failure with AUC 0.78-0.93 for 1-2 hop queries across five LLMs, with accuracy gaps of +55 to +86 percentage points. Under natural incompleteness in clinical KGs (MIMIC-III, CORAL), all five evaluated models show positive QGC accuracy gaps (+5 to +31 percentage points), while PrimeKGQA exposes a boundary condition: structurally simpler QGC=0 contexts can yield higher correctness despite lacking faithful grounding. QGC checking runs in under 0.1 ms per query, making it practical as a real-time pre-filter or retrieval stopping criterion.

Link
https://www.semanticscholar.org/paper/c7321d339dfb2456c2bd812883fb639681087338
Found by
Semantic Scholar
Authors
Mariam Almutairi, Fatimah Alotaibi, Lulwah Alkulaib, Zhi-Qian Chen, Sara A. Alsalamah, Chang-Tien Lu
Categories
evaluation, dataset
Published
2026-11-06
Last seen by the radar
2026-11-07
Citations
0
Influential citations
0
Radar score
40.75 / 100 (how it is scored)
Why it scored so
Matched: dataset, evaluat; Primary record: Semantic Scholar
Related links
https://doi.org/10.1145/3799682.3840697
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Semantic Scholar