Mystery Gift Box #040 | Kickstarting the new LLMs Series with Tree of Thoughts

The best hidden gems I've found; interesting ideas and concepts, thought-provoking questions, mind-blowing books/podcasts, cool animes/films, and other mysteries ❤️

Hey friends,

Large Language Models (LLMs).

Recently, I have shifted my attention to researching LLMs for my PhD thesis. And I find it very challenging to keep up with the fast-paced development in this space, whether that be for academia research or industrial applications. I suspect many people share similar sentiment.

That’s why I have decided to start sharing interesting research papers and practical coding walkthroughs through the Mystery Gift Box; calling it the LLMs series.

And I am kickstarting the LLMs series by sharing the Tree of Thoughts paper by bunch of people at Princeton University and Google Deepmind. This paper was published on 17th May 2023.

🧠 Tree of Thoughts by Yao et al.

💥 Summary and Contributions

Existing problem solving methods that uses LLMs have two major problems:

  1. They do not explore different potential paths within a thought process (local problem)

  2. They do not incorporate any planning, lookahead, or backtracking to evaluate different thought processes (global problem)

That’s why the authors proposed a new inference framework called Tree of Thoughts (ToTs), which generalise over Chain of Thought prompting and enables exploration within and over different thought process (the reasoning intermediate steps). ToT allows LLMs to perform decision making by allowing it to consider multiple reasoning paths and self-evaluate its own choices to decide on its next best course of action. This involves planning, lookahead, and/or backtracking in order to reach global optimal results.

The experiments show that ToT significantly enhances language models’ problem-solving abilities on three novel tasks requiring non-trivial planning or search: Game of 24, Creative Writing, and Mini Crosswords.

💥 Methodology

ToT actively maintains a tree of thoughts, where each thought is a coherent language sequence that serves as an intermediate step toward problem solving. 

These thought units allow the LM to self-evaluate the progress different intermediate thoughts make towards solving the problem through deliberate reasoning process also instantiated in language sequence (Figures 2, 4, and 6). This allows us to generate new potential thought units.

We use search algorithms such as breadth-first search (BFS) or depth-first search (DFS) to systematically explore the tree of thoughts to evaluate the diverse thoughts

ToT frames any problem as a search over a tree, where each node is a state representing a partial solution with the input and the sequence of thoughts so far. A specific instantiation of ToT involves answering four questions:

  1. Thought Decomposition

  2. Thought Generator

  3. State Evaluator

  4. What search algorithm to use?

💥 ToT has four advantages:

  1. Generality — most problem-solving methods like IO, CoT, or CoT-SC are special cases of ToT

  2. Modularity — each component are independent and can be view independently

  3. Adaptability — easily adapt to different problem properties, LM capabilities, and resource constraints

  4. Convenience — No extra training is needed, just a pre-trained LM is sufficient

⛰ 4-4-4 Exploration Project

Each month, I would explore one new thing; a skill, a subject, or an experience.

January 2023: Writing and Storytelling (Subject) ✅

February 2023: KURIOS – Cabinet of Curiosities (Cirque Du Soleil — Experience) ✅

March 2023: 28 Days of Cold Exposure (Subject and Experience) ✅

April 2023: Complete Growth / Product Marketing Course (Subject) 🟥

May 2023: LL project (Skill + Subject) ✅

June 2023: LL project 2 (Skill + Subject) 🟧

📚 This week, I finished reading…

3 books in-progress 🤓

Have interesting gems you want to share with me and others? Share it by replying to this email and I will include it in the next gift box :)

With love,

Ryan O. 🎮

😈 Connect with me on:

🎬 YouTube, 🐦 Twitter, 👨🏻‍💻 LinkedIn, 🌍 Personal Website, and 📸 Instagram