Graph of Thought
The way we engage with Large Language Models (LLMs) is rapidly evolving. We started with prompt engineering and progressed to combining prompts into 'Chains of Thought' and then even more structured 'Trees of Thought'. But could the next logical step be a 'Graph of Thought'?
Unlike traditional Machine Learning models, LLMs can provide fresh insights without retraining. This breakthrough sparked a wave of change, empowering anyone to simply program a computer using a text prompt!
To tackle more complex tasks, breaking them down into a ‘Chain of Thought’ proves immensely helpful. With the Chain of Thought approach, we prompt the LLM to determine the necessary steps first and then execute them sequentially.
Organising the LLM's thoughts into nodes in a 'Tree of Thought' allows us to combine thought with a symbolic tree search algorithm. This opens the door to optimal 'thought path' selection, taking the LLM's planning up to the next level of complexity.
Now, imagine the next phase: a ‘Graph of Thought’ where thoughts are modelled as nodes connected by edges. Directed Acyclic Graphs (DAGs) have revolutionised data pipeline orchestration tools by modelling the flow of dependencies in a graph without circular loops. Unlike trees, DAGs can model paths that fork and then converge back together! This is a game-changer, and surely it's only a matter of time before LLM thought prompting embraces this powerful ability too.
Moving beyond pure orchestration, the Graph of Thought approach represents all information in a graph structure, with nodes representing concepts or entities and edges denoting relationships between them. Each node contains information that can be processed by the LLM, while the connections between nodes capture contextual associations and dependencies. This graph structure enables the model to traverse and explore the relationships between concepts, facilitating a more nuanced understanding of the input and informing the development of a more logically coherent plan. It reminds me of System One and System Two thinking in the human brain.