Research paper code for knowledge graph reasoning with LLMs
Top 59.8% on sourcepulse
This repository provides the official implementation for "Think-on-Graph" (ToG), a method for enhancing Large Language Model (LLM) reasoning capabilities by integrating Knowledge Graphs (KGs). It targets researchers and practitioners working with LLMs and KGs, offering a framework for deep and responsible reasoning.
How It Works
ToG integrates LLMs with KGs to improve reasoning accuracy and responsibility. The pipeline involves leveraging KG structures to guide LLM responses, potentially through techniques like graph traversal or embedding-based retrieval, to ensure more grounded and factual outputs. The specific mechanisms for this integration are detailed within the project's source code and documentation.
Quick Start & Requirements
requirements.txt
.Freebase/README.md
and Wikidata/README.md
files. For Wikidata usage, copy client.py
and server_urls.txt
from Wikidata/
to the ToG/
directory.ToG/README.md
for execution details.ToG_cwq.jsonl
) to JSON format using tools/jsonl2json.py
, then use scripts in the eval/
directory.Highlighted Details
Maintenance & Community
The project is associated with IDEA (Shenzhen) and is actively seeking interns interested in LLMs and KGs. Contact email: xuchengjin@idea.edu.cn.
Licensing & Compatibility
Limitations & Caveats
The project requires significant setup for local KG installations (Freebase or Wikidata), which can be resource-intensive and time-consuming. The README does not detail specific hardware requirements beyond the KG setup.
1 year ago
1 week