{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/mindmap-knowledge-graph-prompting-sparks","title":"MindMap: Knowledge Graph Prompting Sparks Graph of Thoughts in Large Language Models","arxiv_id":"2308.09729","date":"2023-08-17","proceeding":null,"authors":["Yilin Wen","Zifeng Wang","Jimeng Sun"],"abstract":"Large language models (LLMs) have achieved remarkable performance in natural language understanding and generation tasks. However, they often suffer from limitations such as difficulty in incorporating new knowledge, generating hallucinations, and explaining their reasoning process. To address these challenges, we propose a novel prompting pipeline, named \\method, that leverages knowledge graphs (KGs) to enhance LLMs' inference and transparency. Our method enables LLMs to comprehend KG inputs and infer with a combination of implicit and external knowledge. Moreover, our method elicits the mind map of LLMs, which reveals their reasoning pathways based on the ontology of knowledge. We evaluate our method on diverse question \\& answering tasks, especially in medical domains, and show significant improvements over baselines. We also introduce a new hallucination evaluation benchmark and analyze the effects of different components of our method. Our results demonstrate the effectiveness and robustness of our method in merging knowledge from LLMs and KGs for combined inference. To reproduce our results and extend the framework further, we make our codebase available at https://github.com/wyl-willing/MindMap.","url_abs":"https://arxiv.org/abs/2308.09729v5","url_pdf":"https://arxiv.org/pdf/2308.09729v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"mindmap-knowledge-graph-prompting-sparks","repo_url":"https://github.com/wyl-willing/MindMap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"hallucination","task_name":"Hallucination"},{"task_slug":"hallucination-evaluation","task_name":"Hallucination Evaluation"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"natural-language-understanding","task_name":"Natural Language Understanding"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-3","method_name":"GPT-3"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"ontology","method_name":"Ontology"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2308.09729","atlas_url":"https://app.syntology.ai/?focus=2308.09729","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.09729"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wyl-willing/MindMap","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":8,"samples":[{"code_sha256_prefix":"b759881245a90f3e","entry":"chat","repo":"wyl-willing/MindMap","repo_kind":"official","path":"pre-training/explainpe/keyword.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/pre-training/explainpe/keyword.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b759881245a90f3e"}},{"code_sha256_prefix":"5e07cc24a99e649e","entry":"chat_35","repo":"wyl-willing/MindMap","repo_kind":"official","path":"MindMap.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/MindMap.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5e07cc24a99e649e"}},{"code_sha256_prefix":"c6c612f4e7f41ed4","entry":"chat_4","repo":"wyl-willing/MindMap","repo_kind":"official","path":"MindMap.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/MindMap.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c6c612f4e7f41ed4"}},{"code_sha256_prefix":"7be86cacefea6f89","entry":"prompt_comparation","repo":"wyl-willing/MindMap","repo_kind":"official","path":"evaluation/gpt4_preference_drug.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/evaluation/gpt4_preference_drug.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7be86cacefea6f89"}},{"code_sha256_prefix":"f826b5a33b16da28","entry":"prompt_comparation","repo":"wyl-willing/MindMap","repo_kind":"official","path":"evaluation/gpt4_preference_total.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/evaluation/gpt4_preference_total.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f826b5a33b16da28"}},{"code_sha256_prefix":"0276dad790bbbcfc","entry":"row_to_string","repo":"wyl-willing/MindMap","repo_kind":"official","path":"pre-training/chatdoctor5k/csvTodocument.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/pre-training/chatdoctor5k/csvTodocument.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0276dad790bbbcfc"}},{"code_sha256_prefix":"ba946e72117a1df4","entry":"is_unable_to_answer","repo":"wyl-willing/MindMap","repo_kind":"official","path":"pre-training/chatdoctor5k/csvTodocument.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/pre-training/chatdoctor5k/csvTodocument.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ba946e72117a1df4"}},{"code_sha256_prefix":"eb72fd9471b417f2","entry":"prompt_comparation","repo":"wyl-willing/MindMap","repo_kind":"official","path":"evaluation/gpt4_preference_disease.py","file_url":"https://github.com/wyl-willing/MindMap/blob/HEAD/evaluation/gpt4_preference_disease.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eb72fd9471b417f2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}