Framework for faithful, interpretable LLM reasoning via knowledge graphs
Top 69.8% on sourcepulse
This repository provides the official implementation for "Reasoning on Graphs" (RoG), a framework that enhances Large Language Models (LLMs) with Knowledge Graphs (KGs) for faithful and interpretable reasoning. It targets researchers and practitioners in KGQA and LLM reasoning, offering a planning-retrieval-reasoning pipeline to improve accuracy and explainability.
How It Works
RoG employs a three-stage process: planning, retrieval, and reasoning. First, it generates relation paths grounded by KGs as faithful plans. These plans are then used to retrieve valid reasoning paths from the KGs. Finally, LLMs utilize these KG-grounded paths to perform reasoning, producing interpretable results. This approach ensures that the LLM's reasoning process is directly tied to the structured knowledge within the KG, promoting faithfulness and interpretability.
Quick Start & Requirements
pip install -r requirements.txt
./scripts/planning.sh
./scripts/rog-reasoning.sh
Highlighted Details
Maintenance & Community
The project is associated with the ICLR 2024 paper "Reasoning on Graphs: Faithful and Interpretable Large Language Model Reasoning." Further KG+LLM reasoning work is linked.
Licensing & Compatibility
The repository does not explicitly state a license in the README. Users should verify licensing for commercial or closed-source use.
Limitations & Caveats
Training RoG requires significant hardware resources (2x A100-80GB GPUs). The README does not detail specific LLM compatibility beyond those listed for plug-and-play inference.
5 months ago
1 day