ROG: Retrieval-Augmented LLM Reasoning for Complex First-Order Queries over Knowledge Graphs

Ziyan Zhang, Chao Wang, Zhuo Chen, Chiyi Li, Kai Song
2/2/2026
cs.CL

No confident code implementation found for this paper.

Abstract

Answering first-order logic (FOL) queries over incomplete knowledge graphs (KGs) is difficult, especially for complex query structures that compose projection, intersection, union, and negation. We propose ROG, a retrieval-augmented framework that combines query-aware neighborhood retrieval with large language model (LLM) chain-of-thought reasoning. ROG decomposes a multi-operator query into a sequence of single-operator sub-queries and grounds each step in compact, query-relevant neighborhood evidence. Intermediate answer sets are cached and reused across steps, improving consistency on deep reasoning chains. This design reduces compounding errors and yields more robust inference on complex and negation-heavy queries. Overall, ROG provides a practical alternative to embedding-based logical reasoning by replacing learned operators with retrieval-grounded, step-wise inference. Experiments on standard KG reasoning benchmarks show consistent gains over strong embedding-based baselines, with the largest improvements on high-complexity and negation-heavy query types.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026rog,
  title  = {ROG: Retrieval-Augmented LLM Reasoning for Complex First-Order Queries over Knowledge Graphs},
  author = {Ziyan Zhang and Chao Wang and Zhuo Chen and Chiyi Li and Kai Song},
  year   = {2026},
  eprint = {2602.02382},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.02382v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.02382.svg)](https://codeofpaper.com/paper/2602.02382)

Discussion