Papers › Think-on-Graph: Deep and Responsible Reasoning of Large Language Model on Knowledge Graph

Think-on-Graph: Deep and Responsible Reasoning of Large Language Model on Knowledge Graph

15 Jul 2023arXiv:2307.07697archive 2025-07-28

Jiashuo Sun, Chengjin Xu, Lumingyuan Tang, Saizhuo Wang, Chen Lin, Yeyun Gong, Lionel M. Ni, Heung-Yeung Shum, Jian Guo

Although large language models (LLMs) have achieved significant success in various tasks, they often struggle with hallucination problems, especially in scenarios requiring deep and responsible reasoning. These issues could be partially addressed by introducing external knowledge graphs (KG) in LLM reasoning. In this paper, we propose a new LLM-KG integrating paradigm ``LLM⊗KG'' which treats the LLM as an agent to interactively explore related entities and relations on KGs and perform reasoning based on the retrieved knowledge. We further implement this paradigm by introducing a new approach called Think-on-Graph (ToG), in which the LLM agent iteratively executes beam search on KG, discovers the most promising reasoning paths, and returns the most likely reasoning results. We use a number of well-designed experiments to examine and illustrate the following advantages of ToG: 1) compared with LLMs, ToG has better deep reasoning power; 2) ToG has the ability of knowledge traceability and knowledge correctability by leveraging LLMs reasoning and expert feedback; 3) ToG provides a flexible plug-and-play framework for different LLMs, KGs and prompting strategies without any additional training cost; 4) the performance of ToG with small LLM models could exceed large LLM such as GPT-4 in certain scenarios and this reduces the cost of LLM deployment and application. As a training-free method with lower computational cost and better generality, ToG achieves overall SOTA in 6 out of 9 datasets where most previous SOTAs rely on additional training.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.07697")

Code

Syntology Ran 11 of 16 code samples harvested from 3 repositories linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 2 ran · our draft was wrong; 7 ran with no contract checked.

By repository: official repository: 15 samples from 2 repositories, 10 ran; community: 1 sample from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

gasolsun36/tog officialmentioned in papermentioned on GitHub report
idea-finai/tog officialmentioned in papermentioned on GitHub report
IDEA-FinAI/Simple-HHEA mentioned on GitHubpytorchnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-ready report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 11 ran; 1 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
2ran · our draft was wrong
7ran
5unverified

Licence: 15 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

align IDEA-FinAI/ToG/eval/utils.py official repository ran no licence file found · pointer only · b6d5027e4acec382 · report
check_end_word IDEA-FinAI/ToG/ToG/freebase_func.py official repository ran no licence file found · pointer only · ffbc2c4b715e9ad2 · report
check_string IDEA-FinAI/ToG/eval/utils.py official repository ran no licence file found · pointer only · d7a01348958713cb · report
clean_relations IDEA-FinAI/ToG/ToG/utils.py official repository ran no licence file found · pointer only · f792b1312fa4db34 · report
clean_relations IDEA-FinAI/ToG/ToG/wiki_func.py official repository ran no licence file found · pointer only · 8e0ef95c49c47311 · report
compute_bm25_similarity IDEA-FinAI/ToG/ToG/utils.py official repository ran · our draft was wrong no licence file found · pointer only · f28fd5e14161c66b · report
extract_answer gasolsun36/tog/ToG/wiki_func.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 93ab9efdb03f32cb · report
if_true gasolsun36/tog/ToG/wiki_func.py official repository ran · violated contract no licence file found · pointer only · 188177dba46b8b5c · report
prepare_dataset_for_eval IDEA-FinAI/ToG/eval/utils.py official repository ran no licence file found · pointer only · ac726695e1bf1698 · report
transform_relation IDEA-FinAI/ToG/ToG/wiki_func.py official repository ran fingerprinted no licence file found · pointer only · 8f682083b0348a0a · report
abandon_rels IDEA-FinAI/ToG/ToG/freebase_func.py official repository unverified no licence file found · pointer only · 8efd8b00e5ee004a · report
construct_relation_prune_prompt IDEA-FinAI/ToG/ToG/wiki_func.py official repository unverified no licence file found · pointer only · efbf4bfeee892fb3 · report
prepare_dataset IDEA-FinAI/ToG/CoT/utils.py official repository unverified no licence file found · pointer only · 00b2e6d240c0d36b · report
reasoning gasolsun36/tog/ToG/wiki_func.py official repository unverified no licence file found · pointer only · 45fd3b8df27ad036 · report
run_llm gasolsun36/tog/ToG/wiki_func.py official repository unverified no licence file found · pointer only · b0aab5b997a57a62 · report
sliding_window_type DataArcTech/ToG-2/ToG-2/main_tog2.py community ran · honoured contract Apache-2.0 (permissive) · db87f61e2e22ab6f · report

Tasks

HallucinationKnowledge GraphsLanguage ModelingLanguage ModellingLarge Language ModelQuestion Answering

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGPT-4Label SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections