KG-Augmented Executable CoT for Mathematical Coding

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Chen, Xingyu, An, Junxiu, Guo, Jun, Wang, Li, Guo, Jingcai
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915430469206016
author Chen, Xingyu
An, Junxiu
Guo, Jun
Wang, Li
Guo, Jingcai
author_facet Chen, Xingyu
An, Junxiu
Guo, Jun
Wang, Li
Guo, Jingcai
contents In recent years, large language models (LLMs) have excelled in natural language processing tasks but face significant challenges in complex reasoning tasks such as mathematical reasoning and code generation. To address these limitations, we propose KG-Augmented Executable Chain-of-Thought (KGA-ECoT), a novel framework that enhances code generation through knowledge graphs and improves mathematical reasoning via executable code. KGA-ECoT decomposes problems into a Structured Task Graph, leverages efficient GraphRAG for precise knowledge retrieval from mathematical libraries, and generates verifiable code to ensure computational accuracy. Evaluations on multiple mathematical reasoning benchmarks demonstrate that KGA-ECoT significantly outperforms existing prompting methods, achieving absolute accuracy improvements ranging from several to over ten percentage points. Further analysis confirms the critical roles of GraphRAG in enhancing code quality and external code execution in ensuring precision. These findings collectively establish KGA-ECoT as a robust and highly generalizable framework for complex mathematical reasoning tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2508_04072
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle KG-Augmented Executable CoT for Mathematical Coding
Chen, Xingyu
An, Junxiu
Guo, Jun
Wang, Li
Guo, Jingcai
Artificial Intelligence
In recent years, large language models (LLMs) have excelled in natural language processing tasks but face significant challenges in complex reasoning tasks such as mathematical reasoning and code generation. To address these limitations, we propose KG-Augmented Executable Chain-of-Thought (KGA-ECoT), a novel framework that enhances code generation through knowledge graphs and improves mathematical reasoning via executable code. KGA-ECoT decomposes problems into a Structured Task Graph, leverages efficient GraphRAG for precise knowledge retrieval from mathematical libraries, and generates verifiable code to ensure computational accuracy. Evaluations on multiple mathematical reasoning benchmarks demonstrate that KGA-ECoT significantly outperforms existing prompting methods, achieving absolute accuracy improvements ranging from several to over ten percentage points. Further analysis confirms the critical roles of GraphRAG in enhancing code quality and external code execution in ensuring precision. These findings collectively establish KGA-ECoT as a robust and highly generalizable framework for complex mathematical reasoning tasks.
title KG-Augmented Executable CoT for Mathematical Coding
topic Artificial Intelligence
url https://arxiv.org/abs/2508.04072