LanguageAgentTreeSearch  by lapisrocks

ICML 2024 research paper implementation

created 1 year ago
767 stars

Top 46.4% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides the official implementation for the ICML 2024 paper "Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Models." It offers a unified framework for language agents to perform reasoning, acting, and planning, targeting researchers and developers working with large language models for complex tasks. The core benefit is a novel search algorithm that integrates these capabilities, improving performance on benchmarks like HotPotQA and WebShop.

How It Works

LATS employs a tree search mechanism to explore possible actions and reasoning steps. It unifies reasoning, acting, and planning by treating them as nodes and branches within a search tree. This approach allows agents to systematically explore a problem space, evaluate potential trajectories, and select optimal actions, effectively combining deliberation with execution. The method is advantageous for its ability to handle complex, multi-step tasks that require both understanding and interaction.

Quick Start & Requirements

  • HotPotQA & Programming:
    • Install: pip install -r requirements.txt
    • Prerequisites: OpenAI API key (export OPENAI_API_KEY=<your key>)
    • Run: sh lats.sh (HotPotQA) or sh run_lats.sh (Programming)
    • Docs: Project Website, Paper
  • WebShop:
    • Install: Clone WebShop repo, install from source, then pip install -r requirements.txt
    • Prerequisites: OpenAI API key, local WebShop environment running on localhost.
    • Run: sh lats.sh (after modifying lats.py with your WebShop port)

Highlighted Details

  • Official implementation for ICML 2024 paper "Language Agent Tree Search".
  • Demonstrates unified reasoning, acting, and planning for LLM agents.
  • Includes code, prompts, and model outputs for experiments.
  • Offers integrations with LangChain (LangGraph) and LlamaIndex.

Maintenance & Community

The project is associated with Andy Zhou and the paper's authors. Contact is available via email (andyz3@illinois.edu) or GitHub issues.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Users should verify licensing for commercial use or integration into closed-source projects.

Limitations & Caveats

Log files for HotPotQA and WebShop experiments are too large to be included. The README mentions code adapted from reflexions/tree/main, suggesting potential dependencies or licensing considerations from that source.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
21 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Calvin French-Owen Calvin French-Owen(Coounder of Segment), and
2 more.

ReAct by ysymyth

0.8%
3k
GPT-3 prompting code for ReAct research paper
created 2 years ago
updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), John Yang John Yang(Author of SWE-bench, SWE-agent), and
7 more.

tree-of-thought-llm by princeton-nlp

0.3%
5k
Research paper implementation for Tree of Thoughts (ToT) prompting
created 2 years ago
updated 6 months ago
Feedback? Help us improve.