spcl / graph-of-thoughts

Official Implementation of "Graph of Thoughts: Solving Elaborate Problems with Large Language Models"
https://arxiv.org/pdf/2308.09687.pdf
Other
1.97k stars 141 forks source link

Dynamically generate nodes #26

Closed nickotto closed 5 months ago

nickotto commented 5 months ago

It's unclear looking at the code if there is a way to dynamically generate new "successors" and add it into the execution queue. It would of course be pushed to the front of the queue and not the back. Say you have a node A that has the thought that it should explore certain direction of thoughts, say thought B and C.

The initial graph structure may look simple: generate node A -> score node. Is there a way that after running node A, it will be then explore an arbitrary number of nodes due to its thoughts so it looks like: generate node A -> generate node B -> generate node C -> score node

Currently it seems like the initial graph structure is fixed?

nblach commented 5 months ago

Hey @nickotto ,

great question! At this point in time the graph structure is fixed. However you can implement the GoO to explore various paths dynamically by adding filters that only let certain thoughts propagate that satisfy a predetermined condition. (This is still static and you have to predefine all nodes, but it allows you to model some dynamic path selection). In theory, one could dynamically adapt the GoO at runtime and add/remove nodes from the execution queue, but given the current implementation of the controller, this is not supported. However, we are exploring ways to introduce a lot more automation and dynamic GoO structures, so stay tuned!