Self-guided Knowledgeable Network of Thoughts: Amplifying Reasoning with Large Language Models

Chao-Chi Chen, Chin-Yuan Yeh, Hsi-Wen Chen, De-Nian Yang, Ming-Syan ChenarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation. However, their performance often degrades when faced with complex, multi-step reasoning tasks such as long-list sorting or multi-digit arithmetic. To address these limitations, researchers have introduced the Knowledgeable Network of Thoughts (kNoT), a novel prompting framework that empowers LLMs to autonomously design and execute their own reasoning workflows. By utilizing a structured "LLM Workflow Template" (LWT), kNoT transforms high-level tasks into custom networks of elementary operations, significantly outperforming existing methods like Tree of Thoughts (ToT) and Graph of Thoughts (GoT).

The Challenge of Complex Reasoning

Standard prompting techniques, such as Chain-of-Thought (CoT), encourage models to "think step-by-step." While effective for simple problems, CoT often suffers from "context drift" in longer tasks, where the model loses track of earlier intermediate results. Advanced modular approaches like Tree of Thoughts (ToT) and Graph of Thoughts (GoT) attempted to mitigate this by structuring reasoning into trees or graphs. However, these methods remain limited by:

  1. Rigidity: They often rely on fixed structures that may not suit every problem type.
  2. Manual Effort: They require extensive human-designed prompt engineering for task-specific modules like splitters and evaluators.

kNoT aims for intelligence amplification, allowing the LLM to act as its own architect, structuring logic dynamically to solve problems most effectively.

The kNoT Framework

The core of kNoT is the LLM Workflow Template (LWT), a simple, executable scripting language that the LLM generates for itself. Unlike linear chains or rigid trees, LWT supports arbitrary networks where any reasoning step can pass its output to any subsequent step. A key feature is indexing, which allows the model to precisely select elements from previous outputs, enabling "elementary operations"—breaking complex tasks into tiny, fail-proof steps.

The kNoT process consists of three main stages:

  1. Knowledge Extraction: The LLM generates a natural language solution plan based on the task description.
  2. LWT Translation: This plan is translated into a structured LWT script, defining the nodes (LLM inferences) and edges (data flow).
  3. Script Execution: The system automatically executes the script, invoking the LLM for each node and routing data until the final answer is reached.
The kNoT workflow: from knowledge extraction to LWT translation and execution.

Experimental Evaluation

The researchers evaluated kNoT across six diverse reasoning categories designed to test scalability and logic:

  • Natural Language: Yelp review sentiment counting and keyword counting.
  • Symbolic Operations: Sorting numbers with duplicates and set intersection.
  • Arithmetic: General arithmetic sequences and large-digit addition.

To test scalability, problem sizes were varied significantly, such as sorting up to 64 numbers or adding 32-digit numbers.

Key Results

kNoT consistently outperformed all baselines, particularly as task complexity increased. In sorting tasks with 32 numbers, kNoT achieved 92% accuracy, whereas ToT and GoT struggled at 12% and 31%, respectively. For arithmetic sequences of length 32, kNoT maintained 10% accuracy while all other baselines dropped to 0%.

Accuracy vs. Sequence Length: kNoT maintains high performance as task complexity increases compared to baselines.

Beyond accuracy, kNoT proved highly efficient, reducing manual prompt engineering effort by 77% to 87% compared to GoT and ToT. Furthermore, by using concise, targeted prompts for each node rather than passing the entire conversation history, kNoT often reduced overall inference costs.

Conclusion

kNoT represents a significant step toward autonomous LLM reasoning. By allowing models to plan and script their own logic, the framework overcomes the limitations of rigid, human-designed prompting schemes. While currently dependent on the accuracy of the initial plan, future work on self-guided revisions and broader reasoning categories promises to further amplify the intelligence of large language models.

Summary updated

BibTeX
@misc{chen2024self,
  author = {Chao-Chi Chen and Chin-Yuan Yeh and Hsi-Wen Chen and De-Nian Yang and Ming-Syan Chen},
  title = {{Self-guided Knowledgeable Network of Thoughts: Amplifying Reasoning with Large Language Models}},
  year = {2024},
  eprint = {2412.16533},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.16533},
}
Figure