Saved in:
Bibliographic Details
Main Authors: Ni, Ziyi, Li, Yifan, Dong, Daxiang
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2412.14212
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915070929272832
author Ni, Ziyi
Li, Yifan
Dong, Daxiang
author_facet Ni, Ziyi
Li, Yifan
Dong, Daxiang
contents The exceptional capabilities of large language models (LLMs) have substantially accelerated the rapid rise and widespread adoption of agents. Recent studies have demonstrated that generating Python code to consolidate LLM-based agents' actions into a unified action space (CodeAct) is a promising approach for developing real-world LLM agents. However, this step-by-step code generation approach often lacks consistency and robustness, leading to instability in agent applications, particularly for complex reasoning and out-of-domain tasks. In this paper, we propose a novel approach called Tree-of-Code (ToC) to tackle the challenges of complex problem planning and execution with an end-to-end mechanism. By integrating key ideas from both Tree-of-Thought and CodeAct, ToC combines their strengths to enhance solution exploration. In our framework, each final code execution result is treated as a node in the decision tree, with a breadth-first search strategy employed to explore potential solutions. The final outcome is determined through a voting mechanism based on the outputs of the nodes.
format Preprint
id arxiv_https___arxiv_org_abs_2412_14212
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Tree-of-Code: A Hybrid Approach for Robust Complex Task Planning and Execution
Ni, Ziyi
Li, Yifan
Dong, Daxiang
Software Engineering
Artificial Intelligence
The exceptional capabilities of large language models (LLMs) have substantially accelerated the rapid rise and widespread adoption of agents. Recent studies have demonstrated that generating Python code to consolidate LLM-based agents' actions into a unified action space (CodeAct) is a promising approach for developing real-world LLM agents. However, this step-by-step code generation approach often lacks consistency and robustness, leading to instability in agent applications, particularly for complex reasoning and out-of-domain tasks. In this paper, we propose a novel approach called Tree-of-Code (ToC) to tackle the challenges of complex problem planning and execution with an end-to-end mechanism. By integrating key ideas from both Tree-of-Thought and CodeAct, ToC combines their strengths to enhance solution exploration. In our framework, each final code execution result is treated as a node in the decision tree, with a breadth-first search strategy employed to explore potential solutions. The final outcome is determined through a voting mechanism based on the outputs of the nodes.
title Tree-of-Code: A Hybrid Approach for Robust Complex Task Planning and Execution
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2412.14212