Graph of Thoughts: Solving Elaborate Problems with Large Language Models
Paper · 2023 · Maciej Besta, Nils Blach, Ales Kubicek et al.
Summary
A difficult problem may be easier to solve in pieces, but the pieces still have to come together. A large language model asked to sort a long list, for instance, can produce a list that looks orderly while losing track of how frequently each value occurs. Asking it to sort shorter lists makes each individual job more manageable. The remaining question is how to give the system those partial answers and have it assemble a complete result. Graph of Thoughts, or GoT, makes that assembly part of the prompting procedure. The authors represent each working result as a vertex in a directed graph. An edge records that one result was explicitly used to produce another.
Earlier prompting schemes organize intermediate answers as a sequence or as branching alternatives. GoT can reproduce both arrangements and adds the ability to join branches, revise a result through feedback, and revisit promising material from an earlier step. A controller follows a task-specific plan, while separate components construct prompts, extract usable answers from replies, and check or score the candidates. The approach leaves the underlying parameters fixed. Its implementation can accommodate additional graph operations and supports GPT-3.5, GPT-4, and Llama-2. The authors released the code as spcl/graph-of-thoughts.
The main experiments use GPT-3.5 for sorting, set intersection, counting country keywords in text, and merging overlapping nondisclosure agreements. The document experiment uses 50 samples and a context of 16k tokens. The strongest case for the method comes from tasks whose parts can be solved separately and recombined. For sorting lists of 128 numbers, GoT reduces median error by roughly 62% relative to Tree of Thoughts, with a cost reduction of more than 31%. The introduction also summarizes the sorting quality improvement over Chain-of-Thought as roughly 70%. GoT uses more inference resources than the simpler direct and sequential baselines in the reported comparisons, so the cost advantage depends on which procedure it replaces.
The authors also ask how much earlier work can reach a final answer. They call this the volume of a thought, counting the preceding results that have a directed path to it. A tree can explore many alternatives, but an answer at the end of a branch draws its recorded dependencies from that branch. A graph can bring results from different branches into the same answer. The paper’s analysis shows how this can give an output access to more prior work while keeping the number of successive generation stages low.
Deep dive: Graph of Thoughts: Solving Elaborate Problems with Large Language Models
Graph of Thoughts lets language models split, revise and combine partial answers, improving sorting quality while cutting costs against tree search. · about 39 minutes to read
The problem and its context
A prompt can ask for a process as well as an answer
The paper begins with a practical observation about pretrained systems. A task can often be specified in the text sent to the system, and the system generates a response by successively predicting tokens, the units into which its input and output are divided. The prompt can include examples of requests paired with successful answers. The authors call this few-shot prompting, a form of in-context learning. A zero-shot prompt gives the task without such examples. In both cases, the task information arrives as input, and the pretrained parameters stay fixed. The paper situates this practice in the line of work represented by Language Models are Few-Shot Learners.
A direct request can leave important steps implicit. Suppose the task is to produce an ordered sequence whose value counts match the original. A reply can sound confident and even satisfy the ordering condition while failing the count condition. If the prompt elicits only the final list, that list is the only working result available for inspection. A prompting scheme that elicits intermediate answers gives a surrounding program something to check, reuse, or revise before it returns a result.
Chain-of-Thought, or CoT, makes intermediate steps part of the task formulation. An example can include the work leading to its answer, and a new response can contain steps that lead to its own conclusion. The authors describe earlier successes on mathematical and symbolic problems as evidence that prompting for intermediate work can change what a pretrained system can solve. The basic arrangement is sequential. Later work in the chain can use the input and earlier steps, and the final answer comes after those steps. The paper takes this starting point from Chain-of-Thought Prompting.
An obvious way to hedge against a poor chain is to generate several. The paper groups strategies of this kind under multiple chains and discusses Self-Consistency with CoT, abbreviated CoT-SC. Each chain offers a possible route to an answer. The generated set is then narrowed to one outcome by a selection rule. The alternatives broaden exploration, but a chain produced independently of the others has no opportunity to incorporate a useful intermediate result from another chain as it develops. The paper’s account of multiple independent paths draws on Self-Consistency.
Searching among alternatives leaves a separate problem of combining them
Tree of Thoughts, or ToT, gives exploration a more granular structure. Each location in the tree holds a partial solution. A generator proposes possible continuations, and an evaluator assesses them. The search procedure determines which locations to expand. Breadth-first search explores across a level before going deeper, while depth-first search pursues a line of work before returning to alternatives. In the paper’s discussion, an evaluator may obtain judgments from the language system or from a human. The procedure can abandon an unpromising branch and resume from an earlier point.
GoT addresses a case in which choosing a promising branch is insufficient. Separate branches may have produced compatible results for separate parts of the problem. Sorting one part of a list does nothing to sort another part, but the individually sorted parts are both worth keeping. The next operation needs a result from each part. Within a tree, each non-root vertex has a single parent. A merge that explicitly takes results from different branches calls for a different dependency structure. With a directed graph, a new vertex can receive several incoming edges, each representing a result supplied to the new operation.
There are useful distinctions even among cases described as combining. In sorting, the inputs to a merge cover different parts of the original list. A successful answer preserves the contents of all those parts. In document merging, several candidates can be rival attempts to solve the whole problem, each expressing some provisions better than the others. A subsequent prompt can use them as material for a more complete draft. The graph provides an incoming edge for each contribution in either case. The instructions and the evaluation determine whether the operation joins disjoint pieces or reconciles overlapping answers.
The authors relate this design to earlier work on explicit planning, intermediate computation, and iterative improvement. A planning step makes intended actions available before their execution. A scratchpad exposes intermediate work that later steps can use. A feedback procedure can inspect an answer and request a revision. These lines of work help explain why GoT treats intermediate replies as objects a program can manage. The paper discusses examples including Scratchpads for Intermediate Computation and Self-Refine.
The paper also distinguishes its focus from research that chains different systems through different contexts. That research concerns which system or context handles each part of a larger workflow. GoT’s central question is which previous results a prompting step can use and how an external controller organizes those steps. The authors take inspiration from the way algorithmic operations depend on one another, and from the way a person can return to an earlier idea and combine it with a newer one. The operational claim is about dependencies that a prompting program can express.
The method, step by step
From a task to a graph of working answers
Start with the paper’s sorting procedure. The system receives a list and asks for it to be divided into shorter lists. It then asks for candidate sorts of each part. A checker can compare a candidate with the particular part that produced it, examining both order and value counts. The controller keeps a promising candidate for each part and passes the selected results together to a merge prompt. When the task calls for further improvement, it can ask for revisions of the merged list and assess the replies again. The final candidate is compared with the precomputed result in the evaluation.
A thought is whatever unit of work the procedure designates as a candidate. In sorting it can be a list of numbers. In keyword counting it can be a dictionary pairing names and counts. In writing it can be a paragraph, a plan for a paragraph, or a full draft. This choice sets the granularity of the graph. The system can give a short list its own score and can supply that list directly to a later prompt. If the only stored unit were a full conversation, making those choices about individual partial answers would be harder.
A node records one of these units. An arrow points from a unit that a prompt explicitly uses to the new unit produced by that prompt. In the sorting example, a sorted sublist points to the merged result that uses it. A candidate that the controller scores and discards can remain part of the recorded history without contributing to the chosen output. This distinction matters for the paper’s theoretical analysis. Producing a candidate and making its contents available to the final answer are separate events.
How a Graph of Thoughts run builds an answer
The steps in order.
The diagram summarizes a run that uses both selection and aggregation. An individual task may call for additional generation after a merge, and the next operation depends on the execution plan. The paper illustrates plans that score candidates repeatedly. Checking a sublist tells the controller whether that piece is worth carrying forward. Checking the merged result then evaluates the work done by the merge, which can introduce its own errors even when the supplied pieces are good.
The graph and its transformations
The formal graph is written as follows.
G = (V, E)
G is the graph of thoughts. V is the set of vertices, each holding a thought, and E is the set of directed edges. The parentheses group the components of the graph.
E ⊆ V × V
V × V is the set of ordered pairs of vertices from V. The symbol ⊆ says that E contains a subset of those pairs. In a pair such as (u, v), u is the thought supplied to the operation and v is the resulting thought. The direction therefore expresses a procedure’s explicit use of an intermediate answer. It does not measure how much of that answer survives into the reply.
|V| = n
|V| is the number of vertices in V, denoted by n. Here the vertical bars give the size of a set.
|E| = m
|E| is the number of directed edges, denoted by m. The symbols n and m later have local meanings in the task formulas, where they describe input and output sizes.
Some applications distinguish different kinds of thought. The paper gives the example of planning a paragraph and writing it.
G = (V, E, c)
In this version, G contains the same vertex and edge sets V and E, together with a function c assigning a class to each vertex. The possible classes form a set C. In the general example, c(v) = s means that vertex v holds a solution, while c(v) = p means that it holds a plan. Here s and p are class labels. A solution can be preliminary, intermediate, or final. A plan can provide instructions for later operations before the corresponding results exist.
The graph is one component of the framework. The other components specify what can happen to it and how the program chooses among the results.
(G, 𝒯, ℰ, ℛ)
G records the thoughts and their dependencies. 𝒯 denotes the transformations available for updating the graph, ℰ is the evaluator that assigns scores, and ℛ ranks thoughts for selection. The tuple groups the state of the process with the procedures that act on it.
G′ = 𝒯(G, pθ) = (V′, E′)
G′ is the graph after applying a transformation 𝒯 to the current graph G using pθ, the pretrained language model with parameters θ. A prime marks an updated quantity. V′ and E′ are the vertex and edge sets after the transformation.
V′ = (V ∪ V⁺) ∖ V⁻
V is the old vertex set, V⁺ contains vertices to add, and V⁻ contains vertices to remove. The union symbol ∪ joins the old and added vertices. The set difference symbol ∖ removes the specified vertices from the resulting set. The default transformations described in the paper retain existing vertices.
E′ = (E ∪ E⁺) ∖ E⁻
E is the old edge set, E⁺ contains edges to add, and E⁻ contains edges to remove. The operators ∪ and ∖ have the same meanings as for the vertex update. The user is responsible for making the changes consistent. For instance, deleting a thought also calls for changes to any dependencies that would otherwise refer to a missing vertex. The option to remove parts of the graph gives a procedure a way to drop material that is unlikely to help and would take up space.
The paper describes generation, aggregation, and refinement through these updates. Generation starts with a given thought and produces one or more possible successors. This can extend a chain, branch into alternatives, or split a unit of work into pieces that will be dealt with separately.
V⁺ = {v⁺₁, …, v⁺ₖ}
V⁺ is the set of newly generated vertices. Each v⁺ᵢ is one new thought, where i indexes the candidates and k is the number generated. The braces delimit a set, and the ellipsis stands for the intermediate entries.
E⁺ = {(v, v⁺₁), …, (v, v⁺ₖ)}
E⁺ is the set of new edges. v denotes the existing thought, and each pair points from v to one of the new vertices through v⁺ₖ. The same starting result can therefore support several independent continuations.
Aggregation takes several existing thoughts as explicit inputs to a new one. In the basic form, the transformation adds a vertex for the combined result.
V⁺ = {v⁺}
V⁺ is the added vertex set, and v⁺ is the new thought that combines the selected inputs. The braces here surround a set containing a single element.
E⁺ = {(v₁, v⁺), …, (vₖ, v⁺)}
E⁺ is the set of new dependency edges. The existing vertices v₁ through vₖ are the k thoughts supplied to the aggregation prompt, and each edge leads to the same new vertex v⁺. If one of the selected inputs already depends on earlier steps, those steps have paths to the new vertex through that input. This is how the procedure can combine the products of longer lines of work without inserting every earlier reply directly into the merge prompt.
Refinement asks for an improved version of a current thought. In the formal representation, the thought retains its graph position while its content is revised.
V⁺ = ∅
V⁺ is the added vertex set, and ∅ denotes the empty set. This form of refinement adds no vertex.
E⁺ = {(v, v)}
E⁺ contains an arrow from v back to itself, called a self-loop. Here v is the thought under revision, and the loop records the reuse of its current content. The incoming and outgoing connections to other thoughts remain available. The concrete execution plans can also ask for several proposed improvements and score them individually, so a refinement procedure can compare possible revisions before carrying one forward.
What a generation step represents
The paper uses conditional sampling notation to connect these operations to familiar prompting procedures. A reply is drawn from the distribution of possible replies under a given prompt and input.
y ∼ pθˣ(y ∣ x)
y is the output thought and x is the task input. The superscript ˣ stands for the prompt X, and pθ is the pretrained model with parameters θ. The symbol ∼ means that the output is sampled from the indicated distribution. The bar ∣ introduces the input on which that distribution is conditioned. In the paper’s direct Input-Output baseline, the prompt superscript is IO, and the same relationship describes producing the answer in one step.
For CoT, previous intermediate thoughts appear among the inputs to the next step.
aᵢ ∼ pθᶜᵒᵀ(aᵢ ∣ x, a₁, a₂, …, aᵢ₋₁)
aᵢ is the intermediate thought at position i. a₁ and a₂ are the early thoughts in the sequence, and aᵢ₋₁ denotes the most recent earlier thought. The ellipsis covers the intervening positions. x is the task input, and the superscript ᶜᵒᵀ denotes the Chain-of-Thought prompt format. Sampling and conditioning are again denoted by ∼ and ∣.
y ∼ pθᶜᵒᵀ(y ∣ x, a₁, a₂, …, aₙ)
y is the final answer. In this formula aₙ is the last of the intermediate thoughts, with n standing for the chain length that the paper denotes by N. The input x and the intervening thoughts from a₁ to aₙ condition the answer under the CoT prompt. The paper also describes generating the intermediate steps and answer together.
[y, a₁, a₂, …, aₙ] ∼ pθᶜᵒᵀ(y, a₁, a₂, …, aₙ ∣ x)
The brackets on the left collect the final answer y and the intermediate thoughts a₁ through aₙ. The right side now treats those thoughts as outputs alongside y, conditioned on the input x. The same pretrained system pθ is used with the same type of prompt. This formulation lets the response supply intermediate work that was absent from the original task input.
For multiple independent chains, the paper gives a joint notation for the candidate answers. The same relationship can be expressed by naming the sequence of intermediate steps for each candidate.
[y⁽¹⁾, …, y⁽ᵏ⁾] ∼ pθᶜᵒᵀ(y⁽¹⁾, …, y⁽ᵏ⁾ ∣ x, A⁽¹⁾, …, A⁽ᵏ⁾)
y⁽¹⁾ through y⁽ᵏ⁾ are the candidate outputs, where the parenthesized superscripts label the k chains. A⁽ʲ⁾ stands for the intermediate sequence from chain j, corresponding to the individual intermediate entries listed in the paper’s notation. x is the common input. pθᶜᵒᵀ is the distribution for the CoT prompt, with the bracketed list representing all candidate outputs before selection. Their separation as chains is part of the procedure. The notation collects them into a single display.
For ToT, the paper represents a search location as a state.
s = [x, a₁, …, aᵢ]
s is the partial solution at that node. It preserves the input x and the partial sequence of thoughts through position i. The generator, written in the paper as G(pθ, s, k), uses the pretrained system pθ and this state to propose k successors. The paper uses G in this context for the generator, independently of its use as the name of the GoT graph. ToT’s search procedure chooses how to explore the resulting states. GoT retains the ability to generate successors and adds aggregation as an operation with several inputs.
The execution plan and the record of a run
The implementation distinguishes the Graph of Operations, or GoO, from the Graph Reasoning State, or GRS. The former is the plan prepared before a run. It specifies the operations and the relationships among them. An operation object knows which operations precede it and which follow it. On a sorting task, for example, the plan can specify that particular sublists must have been sorted and selected before their merge may run. The same plan can be applied to different lists of the same size.
The GRS holds information produced during a particular run. It records the operations that have executed, the resulting thoughts, their scores, and whether they passed any applicable validation. Two lists processed under the same GoO can therefore follow the same dependency pattern while yielding different stored candidates and scores. The distinction between plan and state also separates a designer’s choices about what to attempt from the contents an individual execution produces.
The Controller reads this state and applies the plan. It chooses the thoughts that should be supplied to the next operation and passes that information to the Prompter. The Prompter prepares the actual instructions and decides how to present the relevant graph information in text. A sorting prompt can present selected sublists. A document prompt can present drafts that the system should reconcile. The architecture gives the Prompter access to the graph, leaving the encoding to the application.
Once a reply arrives, the Parser extracts the information needed for later operations. A sorting reply is useful to the checker once it has been extracted as a sequence. The keyword task needs a mapping from names to counts. The extracted material forms the state of the thought and is recorded in the GRS. The Scoring module can check such a result with a local function or seek a judgment, depending on the task. The architecture allows judgments from a language system or a human where a direct check is unavailable.
ℰ(v, G, pθ)
ℰ is the evaluator, v is the thought being assessed, G is the current thought graph, and pθ is the pretrained system available to the evaluator. The function can take the whole graph into account. This permits scores that depend on the candidate’s relationships or position in the run, while an application with a simple local check can use only the information needed for that check.
v₁, …, vₕ = ℛ(G, pθ, h)
ℛ is the ranking function. Its inputs are the graph G, the available language system pθ, and h, the requested number of thoughts to return. The vertices v₁ through vₕ are the selected results. The usual rule described in the paper is to retain the requested number of highest-scoring candidates. The implementation also allows the scope of selection to be restricted, which lets each subproblem keep its own best attempt before the subproblems are combined.
The operation interface includes Generate, Improve, Aggregate, Score, Validate, and KeepBest. Generation and aggregation can both request multiple replies for the same supplied material. In particular, keeping a single candidate from each branch still leaves room to sample several ways of merging those candidates. Each proposed merge is recorded separately and can be scored on its own. Validation can check a required property, while scoring can order results that satisfy that property to different degrees or that have different kinds of errors.
This is an inference procedure with manually specified plans and task prompts. The examples in the appendix show templates, the demonstration material inserted into them, and the order of calls in worked runs. The authors configure the language system, sampling temperature, and token limits. The framework can use separate prices for prompt and reply tokens to estimate running costs. There is no additional training stage for GoT. The task preparation consists of choosing the operation graph, preparing prompts and examples, and defining how replies are parsed, checked, and ranked.
What the operations do in the four tasks
For sorting, the input consists of numbers in the range 0–9, including repeated values. The split and sort prompts create sublists and candidate orders. The merge prompt receives already sorted candidates and asks for an ordered list containing their elements. In the configurations for 32, 64, and 128 input elements, the initial parts each contain 16 elements. An initial sort generates 5 candidates per part. After a local scoring operation, the controller keeps the best candidate for each part. The worked plans sample 10 candidates per merge. The plans for 64 and 128 elements also try intermediate improvements, and the sorting plans specify a final improvement attempt before the comparison against ground truth. A ground-truth check uses a result computed independently of the generated candidates.
In set intersection, the output should contain the elements shared by both input sets. The plan splits the second set while continuing to supply the entire first set to each local intersection. Each partial answer therefore concerns a different piece of the second input and is tested against the same first input. Combining those partial intersections gives the overall result. This design avoids pairing subsets by position, which could miss a match appearing elsewhere in the first set. The appendix plans again use parts of 16 elements and generate 5 intersection candidates per part. Merge operations sample 10 candidates for the 32- and 64-element configurations and 5 for the 128-element configuration. The selected result is checked against a precomputed intersection.
For keyword counting, the plan divides text into passages. A count reply records how often keywords from the selected category occur in a particular passage. The authors use countries as the category. The merge prompt receives count dictionaries and combines the counts for the same keyword across passages. The worked plan also has a validation and improvement operation that can ask for a correction to a previous merge. The passage count is configurable. The system can also be asked to determine the split, down to individual sentences. A valid split and accurate counts are separate requirements. If text is lost or repeated in the split, combining the resulting dictionaries can carry that error into the final count.
Document merging uses written nondisclosure agreements, abbreviated NDAs. The purpose is to retain information shared across the source documents or unique to individual ones while avoiding unnecessary duplication. The appendix example works with 4 input agreements. GoT has a configuration that drafts a merged agreement in a single initial merge stage and another, GoT2, that does the initial merging in 2 stages. The prompts also support scoring drafts, aggregating several merge attempts into a new draft, and requesting improvements. Here aggregation can combine competing drafts of the same deliverable. A counting dictionary has a straightforward rule for adding contributions. A merged agreement requires deciding when passages express overlapping obligations and how to preserve their content in a single document.
How the task scores work
The sorting metric has two parts. The first counts places where consecutive values go down when the list should be in ascending order. The second measures discrepancies in how frequently each allowed value occurs. Let the input be [a₁, …, aₙ] and the output [b₁, …, bₘ]. Here a and b identify the input and output entries, n and m are their lengths, and the subscripts give positions.
error-scope = X + Y
error-scope is the sorting error score, X is the count of out-of-order neighboring pairs, and Y is the total discrepancy in value frequencies. The addition combines the two penalties. An ordered answer can still receive a positive score for frequency errors.
X = Σ(i = 1 … m − 1) sgn(max(bᵢ − bᵢ₊₁, 0))
Σ adds the indicated quantity for each position i from 1 through m − 1, where m is the output length. bᵢ is the current output entry and bᵢ₊₁ is the following one. The max function takes the larger of the adjacent difference and 0. The sign function sgn yields 1 for a positive value and 0 for zero in this expression. The contribution is therefore a count of local descents, regardless of the size of each descent.
Y = Σ(i = 0 … 9) ||{p ∣ bₚ = i}| − |{q ∣ aᵩ = i}||
Σ adds a term for each possible value i from 0 to 9. p indexes output positions from 1 through m, and q indexes input positions from 1 through n. In the formula, aᵩ means the input entry at position q. The braces enclose the positions whose entry equals i, and the bar inside the braces means “such that.” The inner pairs of vertical bars count those positions, so repeated values are counted each time they occur. The outer bars take the absolute value of the difference between the two counts. This makes a shortage and an excess contribute to the error in the same direction.
min(error-scope, n)
min selects the smaller of the sorting error score and the input length n. The authors use this clipped form in their error plots because the direct and chain baselines can produce outliers with large errors.
max(n − error-scope, 0)
max selects the larger of the input length n minus the error and 0. The paper uses this expression to report a positive score for sorting and also for set intersection, with the task’s own error definition in each case. It gives greater credit to smaller errors and sets a floor of 0.
For intersection, the inputs are sets A and B, each containing n elements in the paper’s notation. C is the returned result, written as a list of m entries. The target is their common membership, and the generated list can additionally contain duplicates.
error-scope = X₁ + X₂ + X_d
error-scope is the intersection error score. X₁ counts unexpected elements, X₂ counts required elements that are absent, and X_d counts duplicates in the returned list. Adding them charges for mistakes that arise from membership as well as mistakes that arise from the output format.
X₁ = |C ∖ (A ∩ B)|
∩ denotes intersection, so A ∩ B consists of the elements present in both inputs. ∖ denotes set difference. The expression counts the members of C outside the target set, using vertical bars to indicate the size of that difference. Duplicate occurrences are accounted for by the separate term X_d.
X₂ = |(A ∩ B) ∖ C|
A ∩ B is again the target, and subtracting the members of C in the set difference leaves the expected elements missing from the returned result. The outer bars count those elements, giving X₂.
The keyword metric is described in words. For each keyword, the authors take the absolute difference between the generated count and the correct count. They sum those differences. An excess for one country and a shortage for a different country both count as errors. The metric also distinguishes a count that is slightly wrong from one that is far from the reference.
For the agreement task, the paper obtains a redundancy judgment and a retention judgment, querying 3 times for each and averaging the replies. A redundancy judgment of 10 denotes the absence of redundancy, and 0 means that at least half the information is redundant. On the retention scale, 10 denotes complete retention and 0 denotes that no information was retained.
mean_redundancy = fmean(redundancy_scores)
redundancy_scores is the collection of repeated judgments about how well the draft avoids redundancy. fmean takes their arithmetic mean, giving mean_redundancy.
mean_retain = fmean(retain_scores)
retain_scores is the collection of repeated judgments about information retention. fmean again takes the arithmetic mean, giving mean_retain.
f1 = 2 × mean_redundancy × mean_retain ÷ (mean_redundancy + mean_retain)
f1 is the paper’s name for the harmonic mean of the two averaged judgments. The numerator multiplies mean_redundancy by mean_retain and scales that product by 2. The denominator adds the two means, and ÷ divides the numerator by that total. This combination gives a low judgment on either dimension substantial influence over the score. A concise document that omits important information and a comprehensive draft that repeats much of it can both be penalized.
Experiments and results
Inputs, comparison methods, and cost
The default evaluation uses 100 input samples per task and comparison baseline, a temperature of 1.0, and a context size of 4k. Temperature is a parameter affecting how much variation to expect when the same prompt is sampled. Context size limits how much text can be supplied and produced within the relevant interaction. The figures identify ChatGPT-3.5 as the system used for the main comparisons. The authors also tried Llama-2. They report that it typically gave worse results and ran more slowly, leaving them without enough samples to present a similarly developed comparison. The document-merging experiment is an explicit exception to the default settings, with 50 samples and a context size of 16k tokens.
The baselines are direct Input-Output prompting, Chain-of-Thought, Self-Consistency with CoT, and Tree of Thoughts. The paper gives most attention to the tree comparisons and omits some measurements, including representative plots for CoT-SC. It uses two configurations of tree search. The one labeled ToT generates more candidates per round and has lower depth. ToT2 generates fewer candidates per round and uses more levels. In the authors’ notation, branching factor k governs the number of candidates produced when a state is expanded, and L describes the number of levels. They try several settings for these quantities to obtain useful quality and cost comparisons.
The authors aim for similar costs where possible by controlling how many thoughts the different procedures produce. The measured costs still vary. A generation round can request several replies, and the size of what is sent or returned can change between operations. A short list sent to a local sort and a longer list sent to a final merge impose different token costs. The paper’s cost comparisons therefore concern the prompting configurations actually run. Simpler procedures that make fewer requests remain less expensive in the reported direct and sequential comparisons.
The four tasks differ in what the resulting score verifies. Sorting and set intersection can be compared with independently computed answers. Keyword counts have correct counts against which individual predictions are assessed. The agreement task relies on judgments about redundancy and information preservation. A low error score on a numerical task has a different interpretation from a high document score. The former measures deviations from specified conditions, while the latter combines assessments elicited through a judgment prompt. The main evaluation reports task-specific quality and cost, so a single aggregate accuracy would obscure these differences.
Sorting
The sorting experiments vary the input size across 32, 64, and 128 numbers. The inputs use repeating digits, which makes preservation of multiplicity important. Across prompting schemes, the same order and frequency criteria define the sorting error. The authors highlight that a direct request deteriorates as the lists grow. Smaller pieces in the GoT plan provide intermediate answers that can be checked before those answers are used in larger merges.
For lists of 128 numbers, GoT cuts median sorting error by approximately 62% relative to ToT and reduces inference cost by more than 31% in the same comparison. The median concerns the middle of the observed distribution of errors across samples, so the reduction describes a typical position in the distribution under that statistic. The cost result compares GoT with the broader, shallower tree configuration. ToT2 has a different cost profile, and GoT’s costs are sometimes lower and sometimes higher than ToT2’s across the instances the paper discusses.
At 64 input numbers, GoT’s median error is approximately 65% lower than CoT’s and roughly 83% lower than direct Input-Output prompting’s. The paper’s introduction gives an overall characterization of an roughly 70% sorting quality improvement over CoT. The 64-number comparison is the example for which the evaluation explicitly identifies the task size and median-error statistic. The paper also reports that GoT and tree search cost substantially more than the simpler baselines. Both generate multiple candidates during their runs, and the authors keep the CoT setup relatively short when extending it offers no improvement.
Against ToT2, the authors describe the improvement at 32 input numbers as negligible. They report approximate reductions in median error of 61% at 64 numbers and 69% at 128. The chart compares those two reported reductions using ToT2 as the reference at each size. It gives the reductions as reported, without treating them as absolute error rates or percentages of lists sorted exactly.
GoT median sorting error reduction relative to ToT2 by input size
GoT’s advantage over the deeper tree configuration grows for the longer lists shown.
The numbers
| System or setting | median error reduction % |
|---|---|
| GoT on 64-number lists | 61 |
| GoT on 128-number lists (this paper) | 69 |
The authors also report improvements in the sorting quartiles as problem size increases. Quartiles mark positions in the distribution on either side of the median, so they give some indication that the observed change extends beyond the middle value. The appendix presents the same sorting measurements under the positive-score transformation. Those plots give another view of the same observations, with higher scores representing better results. They do not supply a separate evaluation on new lists.
Set intersection and keyword counting
The set-intersection runs use sets of 32, 64, and 128 elements. The paper varies the overlap between 25% and 75%, so the procedure has to recover intersections of different sizes. The output is evaluated for missing elements, unexpected elements, and repetitions. This last category matters because the system returns a list in text even though the intended mathematical answer is a set. The main plots show error and cost, and the appendix presents the positive-score version of the same results.
The authors include intersection in their reported overall pattern of higher quality for GoT than for the tree variants. They also describe costs below ToT’s and costs comparable to ToT2’s across the broader evaluation. The numerical claims singled out in the discussion, such as the large median-error reductions at particular sizes, concern sorting. The intersection result supports the application of the same split, select, and merge pattern to a different exact-answer task. Its design is asymmetric because each subset of the second input is compared with all of the first. In that setting, increasing the original set size also increases the amount of material that must be presented repeatedly.
The keyword task measures a different kind of exact error. The answer is a collection of counts for country keywords found in a text, and its score sums the absolute discrepancies from the correct counts. A partial result covers a passage, and the final result combines those local counts. The paper reports that the inference burden can remain substantial even as individual passages get shorter. The demonstration text included with the instructions is repeated across calls. As more passages are used, that repeated material can account for more of the total prompt cost.
The keyword evaluation gives a concrete example of the difference between response count and cost. It mentions 80 versus 60 total responses alongside costs of $6 versus $3. These figures describe the configurations in the keyword-counting comparison. They illustrate why a similar number of responses can still generate rather different token charges. The authors also compare GoT4, GoT8, and GoTx in their discussion of decomposition. GoT4 and GoT8 vary the partitioning of the text, while the discussion contrasts GoT8 and GoTx to illustrate the cost effect of shortening the demonstrations. The reported lesson is that shorter task inputs and shorter examples are distinct ways to change what a call costs.
Document merging
The agreement inputs overlap in content, and the requested output is one agreement retaining the information with minimal repetition. The document experiment uses 50 samples and raises the context to 16k tokens. This accommodates a task in which the system may receive several long inputs or compare multiple candidate documents. The paper plots the combined redundancy and retention score alongside cost. Its worked example follows successive drafts, scoring, aggregation, and improvement. Several candidates for the same merge can therefore supply material for a later draft.
The reported overall quality advantage includes document merging, but the article’s strongest numerical comparison is for sorting. The kind of evidence differs as well. The agreement score averages repeated judgments on each dimension and combines them through the harmonic mean. A high score means the resulting agreement performed well under that evaluation procedure. The experiment does not independently establish whether each individual clause has kept its intended force. The comparison shows how graph-based prompting can be applied where the pieces are written drafts and the selection rule relies on an evaluator instead of a direct test of the answer.
What the ablations show
The paper does not report a systematic component ablation that removes aggregation, refinement, or scoring one at a time under a matched setup. It does compare different branching schedules, problem sizes, and decomposition choices. These analyses help explain when the complete procedures are useful and which parts of their cost vary. They leave the separate numerical contribution of each GoT operation unresolved.
Changing the tree schedule and the size of the problem
The comparison with ToT2 is important because ToT covers more than one practical configuration. Generating widely at a single level supplies a larger choice of immediate continuations. Using more levels with fewer candidates gives the procedure additional occasions to revisit or improve a result. The authors report that the broader ToT configuration usually achieves somewhat better quality than ToT2 and costs considerably more. GoT’s cost advantage is consistent against the broader configuration in the reported comparisons, while the gap against ToT2 varies. The quality improvement thus has to be interpreted alongside the specific alternative and its budget.
Changing the input size shows why the advantage is small in some conditions and larger in others. For short sorting inputs, the authors find little gain over ToT2. For longer inputs the improvement in median error grows. In the GoT schedule the initial pieces remain at 16 elements while the total input grows. Extra length adds pieces and merge stages rather than forcing the first sorting step to handle a longer list. This is consistent with the authors’ account that decomposition helps by keeping local requests manageable. The final merge still has to assemble a longer sequence, and the process relies on intermediate validation and selection to preserve the relevant values.
There are multiple changes between the full GoT and tree runs. A graph configuration can modify how the problem is split, where candidates are sampled, what the check sees, and whether results from separate branches meet. The improvement measures the effect of the entire configuration. Even within GoT, increasing the problem size changes how many partial results must be merged and where improvement operations occur. The evidence supports the practical strategy of decomposing and recombining these inputs, while leaving open how much the result would change if one particular operation were replaced or removed.
Changing the passages and demonstrations
The keyword experiment makes prompt overhead visible. A short passage reduces the amount of task text in that call, but the instructions and demonstrations take up space each time the procedure submits a passage. Adding passages can therefore create a situation in which the individual counting request gets easier while the running cost remains high. The authors point to the progression from GoT4 to GoT8 when explaining how the static portion of the prompt can become significant.
The comparison involving GoTx examines the content of that static portion. A demonstration can illustrate the intended behavior with a shorter passage. The ensuing calls carry less demonstration text even though they follow the same general split, count, and merge procedure. This gives a more specific explanation of the observed cost behavior than counting graph vertices alone. Calls can differ in size, and the fixed text in each call can matter more as the work is divided into additional parts.
The authors’ account of decomposition relies on keeping the individual tasks within a range where a prompt typically works, perhaps with limited improvement. A final aggregation can then be easier than asking for a complete answer at once. This argument depends on the structure of the task. For a count dictionary, correctly computed partial counts have a clear way to combine. For a document, a draft comparison can involve overlaps whose resolution requires judgment. The paper discusses degree and diameter as questions about graph design, where degree concerns the number of connections and diameter concerns graph distance. It offers no systematic measurement establishing an optimal balance between them.
What the latency and volume comparison explains
The paper’s theoretical comparison asks what information a thought can receive given the topology of the process. The volume of a thought t counts preceding thoughts from which a directed path leads to t. A path may pass through multiple intervening thoughts. An early partial result can therefore contribute through a summary or merge, even if the final prompt contains only the later result. Counted thoughts are potential contributors. A path does not indicate that the final response faithfully uses their contents.
The authors use latency to mean the number of successive graph hops needed to reach a final result. The comparison assumes a constant time per thought and fixes total work to the same order as the number of thoughts.
O(1)
O denotes an asymptotic upper bound, and 1 denotes a constant here. The expression represents the analysis’s assumption that producing one thought takes bounded time independent of the graph’s size.
Θ(n)
Θ denotes an asymptotically tight order of growth, and n is the thought count used in stating the total-work assumption. This expresses a common scale of work across the idealized schemes in the comparison.
The paper then describes the structural tradeoff using N for the overall thought scale and k for the branching factor. A chain can pass information along a sequence with volume up to N, but reaching its conclusion can take N sequential stages. The independent chains of CoT-SC reduce the path length by a factor of k in the stated comparison. Each final candidate also has access to a smaller share of the generated work, decreasing its volume by the same factor. Selecting an answer among those candidates leaves the work of the other chains outside that candidate’s recorded dependencies.
logₖ N
log is the logarithm, k is its base and the number of branches per branching node in the idealized tree, and N is the scale of the total number of thoughts. The expression describes the latency scale for the complete tree and for the graph construction with aggregation under the paper’s assumptions.
A complete branching tree reaches a leaf in comparatively few successive stages. A leaf’s predecessor thoughts still lie along its own path. The authors’ GoT construction starts with such a tree and connects its leaves to a mirrored tree with reversed edge directions. In the second part, several results come together at each aggregation layer. A path then runs from every intermediate branch to the final thought. This gives the final thought volume N at the stated logarithmic latency scale. The construction captures a structural difference between selecting the end of a branch and building a new result from several branches.
The paper separately considers a fixed session capacity of up to N thoughts. It describes a sequential CoT run as taking up to O(N) time and costing O(N) within a single session. With k independent CoT-SC chains in separate sessions, each chain can still take O(N) time, and cost across the sessions is O(k N). In these expressions O gives an asymptotic upper bound, N is the thought capacity of a session, and k is the number of sessions or chains. This reasoning clarifies that parallel branches can reduce dependency depth under one comparison while still requiring additional total work under a per-session comparison. Neither calculation supplies the observed token costs of the experiments.
Limitations
Limits the authors identify
The authors attribute the emphasis on GPT-3.5 to budget constraints. Their attempts with Llama-2 were slower and generally less successful, and they were unable to obtain enough runs for a comparable evaluation. The modular design supports experiments with different underlying systems, but the measured improvements largely concern a single one. A framework’s ability to accept a system as an input and the quality that system achieves on the same plans are separate findings.
The authors also describe their results as representative of a larger set of comparisons. They omit some baseline data, including results for CoT-SC from the main presentation. The reader can inspect several ToT configurations and see that their costs and outcomes depend on branching and depth. The paper gives less evidence about where independent sampling and selection would fall across the full spread of task sizes and budgets. Its best documented cost claim concerns the comparison with the broader ToT configuration.
Task design is another stated constraint. The authors give particular attention to problems that can be split into parts solved individually and then merged. They note that repeated demonstration text can become a costly part of the prompt as the subdivision becomes finer. They also put responsibility for consistent graph transformations on the designer. The execution plan is specified before a run, so the architecture gives the designer control over dependencies without providing a general procedure that discovers the best graph for a new problem.
Limits that follow from the experiments
The comparison mixes several interventions that can improve results together. GoT changes the shape of dependencies, and its plans also define particular subtasks, prompt examples, sampling counts, selection rules, and correction steps. A well-designed checker can distinguish a plausible sublist from one with the right contents. Multiple attempts can give that checker more useful choices. The evaluation leaves open how much of the observed advantage would carry over under a comparison that kept those ingredients fixed and changed only the opportunity to merge branches.
On sorting and intersection, the program can use precise information about a candidate’s errors. The schedules include local scores during a run and a separate ground-truth comparison at the end. This setup is valuable for investigating composition because the metrics have a concrete meaning. It also restricts what the results establish about settings where a useful partial answer is difficult to verify. The architecture can use a language-system or human judgment, but the accuracy, expense, and availability of those judgments will determine how effectively candidates can be selected for later stages.
The sorting metric combines adjacent descents with frequency discrepancies. It can therefore identify meaningful improvements between answers that still have some errors. Its median reduction is distinct from the proportion of lists that are exactly correct. The clipping used in the plots limits how strongly extreme errors appear, and the positive-score version compresses errors at its floor. These are choices about how to summarize the distribution. Neither chart transformation recovers information about success rates that the paper does not report.
The agreement experiment replaces an exact reference check with elicited judgments about redundancy and information retention. Repeating each judgment and averaging helps smooth variation among replies. The setup leaves open whether an independent reader would rate the documents similarly or whether a high score reliably preserves legally significant distinctions. In particular, a clause can look similar to another clause while differing in scope or conditions. The experiment evaluates performance under the stated prompt-based criteria, which are narrower than a professional assessment of the resulting agreement.
The theoretical analysis also has a specific scope. Equal thought cost and the availability of parallel branches make dependency depth informative about the idealized latency. Actual prompts vary in length, replies can vary in length, and a merge of large inputs can consume more resources than generating a short candidate. The paper itself gives cost comparisons where the response totals fail to explain the full difference. Its latency result describes the structure of a possible schedule. End-to-end execution time on a serving system would also depend on how that schedule is run.
Finally, greater volume expands the set of material that can reach an output. It gives no direct measure of whether the output integrates that material correctly. An aggregation can omit a correct detail, carry forward an error from a partial answer, or privilege one draft over another. Reachability describes documented dependencies between external steps. The paper’s analogy with nonlinear human reasoning motivates the graph design, and the experiments test the outcomes of that design on the chosen tasks. They leave the internal reasoning processes that produced any individual reply unmeasured.
What came after
Later papers cite Graph of Thoughts while examining several choices that GoT exposes. The citation establishes a connection, while the titles identify the focus of each work. They support comparisons of research questions. Whether a particular work adopted GoT’s operation graph, reproduced its experiments, or used the framework directly is a separate matter.
Sampling, search, and the amount of work at inference time
Repeated sampling is one way to spend more inference compute on a problem. A procedure can use additional attempts to increase the chance that a favorable answer appears among its candidates. GoT uses sampling too, including several attempts at a local solution or merge, but it can also direct work towards an answer assembled from earlier results. This makes it possible to compare two design choices: expanding the pool from which an answer is selected and specifying dependencies that let multiple candidates contribute to a later generation. Repeated sampling is the focus named by Large Language Monkeys.
A second direction concerns the relationship between search and training. GoT’s search and ranking occur while solving the task, with the pretrained parameters held fixed. A paper on self-training through tree search brings the quality of intermediate work into a different part of the system. Its title identifies a process reward as the way search is guided. This draws attention to where a score is used. In GoT it determines which stored candidates an operation receives. In a self-training study, the search is part of a procedure that also concerns training. That combination is the subject of ReST-MCTS*.
Other citing work examines how much intermediate work to produce. A procedure can control the length of a reasoning trace, the amount of text in each working answer, and the number of alternative answers it asks for. GoT’s distinction between thought count and token cost makes these separate settings worth examining. A concise reply can still occupy a vertex with the same connections. A large number of short replies can still create a costly schedule. The later work explicitly concerned with shorter written reasoning is Chain of Draft.
The same issue appears at the level of the whole schedule. GoT’s sorting experiments offer a concrete reason to ask whether additional reasoning is warranted for a given input: the advantage over the deeper tree setting is small for the shortest lists and grows with list size. Later work organized around overthinking shifts attention to the circumstances in which extra computation may be unnecessary. The title identifies that question as the subject of Stop Overthinking.
Evaluation and collaboration
GoT treats the evaluator as a component with its own role. That is particularly visible in document merging, where outputs are judged for redundancy and retention. An improvement can mean that a revised draft scores better under the chosen evaluator, and the reliability of that conclusion depends on the judgments the evaluator supplies. Later surveys centered on language systems as judges examine the general evaluation setting to which this part of GoT belongs. Examples include A Survey on LLM-as-a-Judge and LLMs-as-Judges.
Another direction puts collaboration among contributors at the center of the procedure. GoT allows branches of a run to supply material for a common result. In a consensus-oriented method, the contributions under consideration can instead be judgments or answers from diverse language systems. The relevant design question is what the combination step should do with disagreement. Combining partial results for separate pieces and reaching consensus among proposals for the whole problem are different tasks, even though both rely on an operation that receives several inputs. The later work that names a round-table procedure and consensus among diverse contributors is ReConcile.
Survey work also places graph-based prompting alongside a wider variety of methods for organizing intermediate computation. GoT gives that comparison a concrete distinction. Some procedures produce alternatives and choose among them. Others use intermediate results as inputs to subsequent operations. A survey of prompting can consider these choices as techniques for writing and structuring requests, while a survey of multi-step reasoning can examine them as designs for passing information through a sequence of operations. Those broader subjects are represented by The Prompt Report and Multi-Step Reasoning with Large Language Models.
Cite
Cite as Maciej Besta, Nils Blach, Ales Kubicek, Robert Gerstenberger, Michal Podstawski, Lukas Gianinazzi, Joanna Gajda, Tomasz Lehmann, Hubert Niewiadomski, Piotr Nyczyk and Torsten Hoefler. 2023. Graph of Thoughts: Solving Elaborate Problems with Large Language Models. arXiv:2308.09687 · Proceedings of the AAAI Conference on Artificial Intelligence 2024 (AAAI'24).
@misc{besta2023graph,
title = {{Graph of Thoughts: Solving Elaborate Problems with Large Language Models}},
author = {Maciej Besta, Nils Blach, Ales Kubicek, Robert Gerstenberger, Michal Podstawski, Lukas Gianinazzi, Joanna Gajda, Tomasz Lehmann, Hubert Niewiadomski, Piotr Nyczyk and Torsten Hoefler},
year = {2023},
doi = {10.1609/aaai.v38i16.29720},
eprint = {2308.09687},
archivePrefix = {arXiv},
url = {https://doi.org/10.1609/aaai.v38i16.29720}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/besta-2023-graph-thoughts-solving-elaborate-problems/
References
- Besta, M.; Fischer, M.; Kalavri, V.; Kapralov, M.; and Hoefler, T. 2023a. Practice of Streaming Processing of Dynamic Graphs: Concepts, Models, and Systems. IEEE Transactions on Parallel and Distributed Systems, 34(6): 1860–1876. OpenAlex ↗ · Scholar ↗
- Besta, M.; Gerstenberger, R.; Blach, N.; Fischer, M.; and Hoefler, T. 2023b. GDI: A Graph Database Interface Standard. https://github.com/spcl/GDI-RMA. Accessed: 2023-09-05. OpenAlex ↗ · Scholar ↗
- Besta, M.; Gerstenberger, R.; Fischer, M.; Podstawski, M.; Blach, N.; Egeli, B.; Mitenkov, G.; Chlapek, W.; Michalewicz, M.; Niewiadomski, H.; Müller, J.; and Hoefler, T. 2023c. The Graph Database Interface: Scaling Online Transactional and Analytical Graph Workloads to Hundreds of Thousands of Cores. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC '23. ACM. OpenAlex ↗ · Scholar ↗
- Besta, M.; Gerstenberger, R.; Peter, E.; Fischer, M.; Podstawski, M.; Barthels, C.; Alonso, G.; and Hoefler, T. 2023d. Demystifying Graph Databases: Analysis and Taxonomy of Data Organization, System Designs, and Graph Queries. ACM Comput. Surv., 56(2). OpenAlex ↗ · Scholar ↗
- Besta, M.; Grob, R.; Miglioli, C.; Bernold, N.; Kwaśniewski, G.; Gjini, G.; Kanakagiri, R.; Ashkboos, S.; Gianinazzi, L.; Dryden, N.; and Hoefler, T. 2022a. Motif Prediction with Graph Neural Networks. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD '22, 35–45. OpenAlex ↗ · Scholar ↗
- Besta, M.; and Hoefler, T. 2022. Parallel and Distributed Graph Neural Networks: An In-Depth Concurrency Analysis. arXiv:2205.09702. OpenAlex ↗ · Scholar ↗
- Besta, M.; Iff, P.; Scheidl, F.; Osawa, K.; Dryden, N.; Podstawski, M.; Chen, T.; and Hoefler, T. 2022b. Neural Graph Databases. In Proceedings of the First Learning on Graphs Conference, volume 198 of Proceedings of Machine Learning Research, 31:1–31:38. PMLR. OpenAlex ↗ · Scholar ↗
- Besta, M.; Kanakagiri, R.; Kwaśniewski, G.; Ausavarungnirun, R.; Beránek, J.; Kanellopoulos, K.; Janda, K.; Vonarburg-Shmaria, Z.; Gianinazzi, L.; Stefan, I.; Luna, J. G.; Golinowski, J.; Copik, M.; Kapp-Schwoerer, L.; Di Girolamo, S.; Blach, N.; Konieczny, M.; Mutlu, O.; and Hoefler, T. 2021a. SISA: Set-Centric Instruction Set Architecture for Graph Mining on Processing-in-Memory Systems. In Proceedings of the 54th Annual IEEE/ACM International Symposium on Microarchitecture, MICRO '21, 282–297. OpenAlex ↗ · Scholar ↗
- Besta, M.; Kanakagiri, R.; Mustafa, H.; Karasikov, M.; Rätsch, G.; Hoefler, T.; and Solomonik, E. 2020. Communication-Efficient Jaccard Similarity for High-Performance Distributed Genome Comparisons. In Proceedings of the IEEE International Parallel and Distributed Processing Symposium, IPDPS '20, 1122–1132. OpenAlex ↗ · Scholar ↗
- Besta, M.; Miglioli, C.; Labini, P. S.; Tětek, J.; Iff, P.; Kanakagiri, R.; Ashkboos, S.; Janda, K.; Podstawski, M.; Kwaśniewski, G.; Gleinig, N.; Vella, F.; Mutlu, O.; and Hoefler, T. 2022c. ProbGraph: High-Performance and High-Accuracy Graph Mining with Probabilistic Set Representations. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, SC '22. IEEE. OpenAlex ↗ · Scholar ↗
- Besta, M.; Vonarburg-Shmaria, Z.; Schaffner, Y.; Schwarz, L.; Kwaśniewski, G.; Gianinazzi, L.; Beranek, J.; Janda, K.; Holenstein, T.; Leisinger, S.; Tatkowski, P.; Ozdemir, E.; Balla, A.; Copik, M.; Lindenberger, P.; Konieczny, M.; Mutlu, O.; and Hoefler, T. 2021b. GraphMineSuite: Enabling High-Performance and Programmable Graph Mining Algorithms with Set Algebra. Proc. VLDB Endow., 14(11): 1922–1935. OpenAlex ↗ · Scholar ↗
- Bronstein, M. M.; Bruna, J.; LeCun, Y.; Szlam, A.; and Vandergheynst, P. 2017. Geometric Deep Learning: Going beyond Euclidean data. IEEE Signal Processing Magazine, 34(4): 18–42. OpenAlex ↗ · Scholar ↗
- Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J. D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; Agarwal, S.; Herbert-Voss, A.; Krueger, G.; Henighan, T.; Child, R.; Ramesh, A.; Ziegler, D.; Wu, J.; Winter, C.; Hesse, C.; Chen, M.; Sigler, E.; Litwin, M.; Gray, S.; Chess, B.; Clark, J.; Berner, C.; McCandlish, S.; Radford, A.; Sutskever, I.; and Amodei, D. 2020. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems (NeurIPS '20), volume 33, 1877–1901. Curran Associates. our card
- Bubeck, S.; Chandrasekaran, V.; Eldan, R.; Gehrke, J.; Horvitz, E.; Kamar, E.; Lee, P.; Lee, Y. T.; Li, Y.; Lundberg, S.; Nori, H.; Palangi, H.; Ribeiro, M. T.; and Zhang, Y. 2023. Sparks of Artificial General Intelligence: Early experiments with GPT-4. arXiv:2303.12712. our card
- Chakrabarti, D.; and Faloutsos, C. 2006. Graph Mining: Laws, Generators, and Algorithms. ACM Comput. Surv., 38(1). OpenAlex ↗ · Scholar ↗
- Chami, I.; Abu-El-Haija, S.; Perozzi, B.; Ré, C.; and Murphy, K. 2020. Machine Learning on Graphs: A Model and Comprehensive Taxonomy. arXiv:2005.03675. OpenAlex ↗ · Scholar ↗
- Chen, X.; Lin, M.; Schärli, N.; and Zhou, D. 2023. Teaching Large Language Models to Self-Debug. arXiv:2304.05128. our card
- Cheng, J.; Yu, J. X.; Ding, B.; Philip, S. Y.; and Wang, H. 2008. Fast Graph Pattern Matching. In Proceedings of the IEEE 24th International Conference on Data Engineering, ICDE '08, 913–922. OpenAlex ↗ · Scholar ↗
- Chowdhery, A.; Narang, S.; Devlin, J.; Bosma, M.; Mishra, G.; Roberts, A.; Barham, P.; Chung, H. W.; Sutton, C.; Gehrmann, S.; Schuh, P.; Shi, K.; Tsvyashchenko, S.; Maynez, J.; Rao, A.; Barnes, P.; Tay, Y.; Shazeer, N.; Prabhakaran, V.; Reif, E.; Du, N.; Hutchinson, B.; Pope, R.; Bradbury, J.; Austin, J.; Isard, M.; Gur-Ari, G.; Yin, P.; Duke, T.; Levskaya, A.; Ghemawat, S.; Dev, S.; Michalewski, H.; Garcia, X.; Misra, V.; Robinson, K.; Fedus, L.; Zhou, D.; Ippolito, D.; Luan, D.; Lim, H.; Zoph, B.; Spiridonov, A.; Sepassi, R.; Dohan, D.; Agrawal, S.; Omernick, M.; Dai, A. M.; Pillai, T. S.; Pellat, M.; Lewkowycz, A.; Moreira, E.; Child, R.; Polozov, O.; Lee, K.; Zhou, Z.; Wang, X.; Saeta, B.; Diaz, M.; Firat, O.; Catasta, M.; Wei, J.; Meier-Hellstern, K.; Eck, D.; Dean, J.; Petrov, S.; and Fiedel, N. 2022. PaLM: Scaling Language Modeling with Pathways. arXiv:2204.02311. our card
- Cook, D. J.; and Holder, L. B., eds. 2006. Mining Graph Data. John Wiley & Sons. OpenAlex ↗ · Scholar ↗
- Creswell, A.; Shanahan, M.; and Higgins, I. 2022. Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoning. arXiv:2205.09712. our card
- Dhulipala, L.; Blelloch, G. E.; and Shun, J. 2019. Low-Latency Graph Streaming Using Compressed Purely-Functional Trees. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '19, 918–934. OpenAlex ↗ · Scholar ↗
- Dohan, D.; Xu, W.; Lewkowycz, A.; Austin, J.; Bieber, D.; Lopes, R. G.; Wu, Y.; Michalewski, H.; Saurous, R. A.; Sohl-Dickstein, J.; Murphy, K.; and Sutton, C. 2022. Language Model Cascades. In Beyond Bayes: Paths Towards Universal Reasoning Systems, Workshop at ICML '22. OpenAlex ↗ · Scholar ↗
- Drori, I.; Zhang, S.; Shuttleworth, R.; Tang, L.; Lu, A.; Ke, E.; Liu, K.; Chen, L.; Tran, S.; Cheng, N.; Wang, R.; Singh, N.; Patti, T. L.; Lynch, J.; Shporer, A.; Verma, N.; Wu, E.; and Strang, G. 2022. A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level. Proceedings of the National Academy of Sciences, 119(32): e2123433119. OpenAlex ↗ · Scholar ↗
- Fan, W.; Li, J.; Ma, S.; Tang, N.; Wu, Y.; and Wu, Y. 2010. Graph Pattern Matching: From Intractable to Polynomial Time. Proc. VLDB Endow., 3(1–2): 264–275. OpenAlex ↗ · Scholar ↗
- Feng, G.; Meng, X.; and Ammar, K. 2015. DISTINGER: A distributed graph data structure for massive dynamic graph processing. In Proccedings of the IEEE International Conference on Big Data, Big Data '15, 1814–1822. OpenAlex ↗ · Scholar ↗
- Friggeri, A.; Chelius, G.; and Fleury, E. 2011. Triangles to Capture Social Cohesion. In Proceedings of the IEEE Third International Conference on Privacy, Security, Risk and Trust and IEEE Third International Conference on Social Computing, PASSAT/SocialCom '11, 258–265. OpenAlex ↗ · Scholar ↗
- Friston, K. 2008. Hierarchical Models in the Brain. PLOS Computational Biology, 4(11): 1–24. OpenAlex ↗ · Scholar ↗
- Fu, Y.; Peng, H.; Sabharwal, A.; Clark, P.; and Khot, T. 2022. Complexity-Based Prompting for Multi-Step Reasoning. arXiv:2210.00720. our card
- Gianinazzi, L.; Fries, M.; Dryden, N.; Ben-Nun, T.; Besta, M.; and Hoefler, T. 2021. Learning Combinatorial Node Labeling Algorithms. arXiv:2106.03594. OpenAlex ↗ · Scholar ↗
- Gregor, D.; and Lumsdaine, A. 2005a. Lifting Sequential Graph Algorithms for Distributed-Memory Parallel Computation. SIGPLAN Not., 40(10): 423–437. OpenAlex ↗ · Scholar ↗
- Gregor, D.; and Lumsdaine, A. 2005b. The Parallel BGL: A generic library for distributed graph computations. Parallel Object-Oriented Scientific Computing (POOSC). OpenAlex ↗ · Scholar ↗
- Hamilton, W. L.; Ying, R.; and Leskovec, J. 2017. Representation Learning on Graphs: Methods and Applications. Bulletin of the Technical Committee on Data Engineering, 40(3): 52–74. OpenAlex ↗ · Scholar ↗
- Hartmann, M.; and Sonntag, D. 2022. A survey on improving NLP models with human explanations. In Proceedings of the First Workshop on Learning with Natural Language Supervision, 40–47. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
- Horváth, T.; Gärtner, T.; and Wrobel, S. 2004. Cyclic Pattern Kernels for Predictive Graph Mining. In Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD '04, 158–167. OpenAlex ↗ · Scholar ↗
- Huang, W.; Abbeel, P.; Pathak, D.; and Mordatch, I. 2022a. Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, 9118–9147. PMLR. our card
- Huang, W.; Xia, F.; Xiao, T.; Chan, H.; Liang, J.; Florence, P.; Zeng, A.; Tompson, J.; Mordatch, I.; Chebotar, Y.; Sermanet, P.; Brown, N.; Jackson, T.; Luu, L.; Levine, S.; Hausman, K.; and Ichter, B. 2022b. Inner Monologue: Embodied Reasoning through Planning with Language Models. arXiv:2207.05608. OpenAlex ↗ · Scholar ↗
- Jiang, C.; Coenen, F.; and Zito, M. 2013. A survey of frequent subgraph mining algorithms. The Knowledge Engineering Review, 28(1): 75–105. OpenAlex ↗ · Scholar ↗
- Kim, G.; Baldi, P.; and McAleer, S. 2023. Language Models can Solve Computer Tasks. arXiv:2303.17491. our card
- Lertvittayakumjorn, P.; and Toni, F. 2021. Explanation-Based Human Debugging of NLP Models: A Survey. Transactions of the Association for Computational Linguistics, 9: 1508–1528. our card
- Lester, B.; Al-Rfou, R.; and Constant, N. 2021. The Power of Scale for Parameter-Efficient Prompt Tuning. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, EMNLP '21, 3045–3059. Association for Computational Linguistics. our card
- Li, X. L.; and Liang, P. 2021. Prefix-Tuning: Optimizing Continuous Prompts for Generation. arXiv:2101.00190. OpenAlex ↗ · Scholar ↗
- Long, J. 2023. Large Language Model Guided Tree-of-Thought. arXiv:2305.08291. OpenAlex ↗ · Scholar ↗
- Lumsdaine, A.; Gregor, D.; Hendrickson, B.; and Berry, J. 2007. Challenges in Parallel Graph Processing. Parallel Processing Letters, 17(1): 5–20. OpenAlex ↗ · Scholar ↗
- Madaan, A.; Tandon, N.; Gupta, P.; Hallinan, S.; Gao, L.; Wiegreffe, S.; Alon, U.; Dziri, N.; Prabhumoye, S.; Yang, Y.; Gupta, S.; Majumder, B. P.; Hermann, K.; Welleck, S.; Yazdanbakhsh, A.; and Clark, P. 2023. Self-Refine: Iterative Refinement with Self-Feedback. arXiv:2303.17651. our card
- Malewicz, G.; Austern, M. H.; Bik, A. J.; Dehnert, J. C.; Horn, I.; Leiser, N.; and Czajkowski, G. 2010. Pregel: A System for Large-Scale Graph Processing. In Proceedings of the International Conference on Management of Data, SIGMOD '10, 135–146. ACM. OpenAlex ↗ · Scholar ↗
- Ning, X.; Lin, Z.; Zhou, Z.; Wang, Z.; Yang, H.; and Wang, Y. 2023. Skeleton-of-Thought: Large Language Models Can Do Parallel Decoding. arXiv:2307.15337. OpenAlex ↗ · Scholar ↗
- Nye, M.; Andreassen, A. J.; Gur-Ari, G.; Michalewski, H.; Austin, J.; Bieber, D.; Dohan, D.; Lewkowycz, A.; Bosma, M.; Luan, D.; Sutton, C.; and Odena, A. 2021. Show Your Work: Scratchpads for Intermediate Computation with Language Models. arXiv:2112.00114. our card
- Paul, D.; Ismayilzada, M.; Peyrard, M.; Borges, B.; Bosselut, A.; West, R.; and Faltings, B. 2023. REFINER: Reasoning Feedback on Intermediate Representations. arXiv:2304.01904. our card
- Prat-Pérez, A.; Dominguez-Sal, D.; Brunat, J. M.; and Larriba-Pey, J.-L. 2012. Shaping Communities out of Triangles. In Proceedings of the 21st ACM International Conference on Information and Knowledge Management, CIKM '12, 1677–1681. OpenAlex ↗ · Scholar ↗
- Qiao, S.; Ou, Y.; Zhang, N.; Chen, X.; Yao, Y.; Deng, S.; Tan, C.; Huang, F.; and Chen, H. 2023. Reasoning with Language Model Prompting: A Survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, ACL '23, 5368–5393. Association for Computational Linguistics. our card
- qrdlgit. 2023. graph-of-thoughts Repository. https://github.com/qrdlgit/graph-of-thoughts. Accessed: 2023-10-11. OpenAlex ↗ · Scholar ↗
- Radford, A.; Narasimhan, K.; Salimans, T.; and Sutskever, I. 2018. Improving Language Understanding by Generative Pre-Training. https://openai.com/research/language-unsupervised. Accessed: 2023-09-06. OpenAlex ↗ · Scholar ↗
- Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; and Sutskever, I. 2019. Language Models are Unsupervised Multitask Learners. https://openai.com/research/better-language-models. Accessed: 2023-09-06. OpenAlex ↗ · Scholar ↗
- Robinson, I.; Webber, J.; and Eifrem, E. 2015. Graph Databases: New Opportunities for Connected Data. O'Reilly Media, 2nd edition. OpenAlex ↗ · Scholar ↗
- Sakr, S.; Bonifati, A.; Voigt, H.; Iosup, A.; Ammar, K.; Angles, R.; Aref, W.; Arenas, M.; Besta, M.; Boncz, P. A.; Daudjee, K.; Valle, E. D.; Dumbrava, S.; Hartig, O.; Haslhofer, B.; Hegeman, T.; Hidders, J.; Hose, K.; Iamnitchi, A.; Kalavri, V.; Kapp, H.; Martens, W.; Özsu, M. T.; Peukert, E.; Plantikow, S.; Ragab, M.; Ripeanu, M. R.; Salihoglu, S.; Schulz, C.; Selmer, P.; Sequeda, J. F.; Shinavier, J.; Szárnyas, G.; Tommasini, R.; Tumeo, A.; Uta, A.; Varbanescu, A. L.; Wu, H.-Y.; Yakovets, N.; Yan, D.; and Yoneki, E. 2021. The Future is Big Graphs: A Community View on Graph Processing Systems. Commun. ACM, 64(9): 62–71. OpenAlex ↗ · Scholar ↗
- Scarselli, F.; Gori, M.; Tsoi, A. C.; Hagenbuchner, M.; and Monfardini, G. 2008. The Graph Neural Network Model. IEEE Transactions on Neural Networks, 20(1): 61–80. OpenAlex ↗ · Scholar ↗
- Schaeffer, S. E. 2007. Graph clustering. Computer Science Review, 1(1): 27–64. OpenAlex ↗ · Scholar ↗
- Shin, T.; Razeghi, Y.; Logan IV, R. L.; Wallace, E.; and Singh, S. 2020. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts. arXiv:2010.15980. our card
- Shinn, N.; Labash, B.; and Gopinath, A. 2023. Reflexion: Language Agents with Verbal Reinforcement Learning. arXiv:2303.11366. our card
- Shum, K.; Diao, S.; and Zhang, T. 2023. Automatic Prompt Augmentation and Selection with Chain-of-Thought from Labeled Data. arXiv:2302.12822. our card
- Teixeira, C. H. C.; Fonseca, A. J.; Serafini, M.; Siganos, G.; Zaki, M. J.; and Aboulnaga, A. 2015. Arabesque: A System for Distributed Graph Mining. In Proceedings of the 25th Symposium on Operating Systems Principles, SOSP '15, 425–440. ACM. OpenAlex ↗ · Scholar ↗
- Touvron, H.; Lavril, T.; Izacard, G.; Martinet, X.; Lachaux, M.-A.; Lacroix, T.; Rozière, B.; Goyal, N.; Hambro, E.; Azhar, F.; Rodriguez, A.; Joulin, A.; Grave, E.; and Lample, G. 2023a. LLaMA: Open and Efficient Foundation Language Models. arXiv:2302.13971. our card
- Touvron, H.; Martin, L.; Stone, K.; Albert, P.; Almahairi, A.; Babaei, Y.; Bashlykov, N.; Batra, S.; Bhargava, P.; Bhosale, S.; Bikel, D.; Blecher, L.; Ferrer, C. C.; Chen, M.; Cucurull, G.; Esiobu, D.; Fernandes, J.; Fu, J.; Fu, W.; Fuller, B.; Gao, C.; Goswami, V.; Goyal, N.; Hartshorn, A.; Hosseini, S.; Hou, R.; Inan, H.; Kardas, M.; Kerkez, V.; Khabsa, M.; Kloumann, I.; Korenev, A.; Koura, P. S.; Lachaux, M.-A.; Lavril, T.; Lee, J.; Liskovich, D.; Lu, Y.; Mao, Y.; Martinet, X.; Mihaylov, T.; Mishra, P.; Molybog, I.; Nie, Y.; Poulton, A.; Reizenstein, J.; Rungta, R.; Saladi, K.; Schelten, A.; Silva, R.; Smith, E. M.; Subramanian, R.; Tan, X. E.; Tang, B.; Taylor, R.; Williams, A.; Kuan, J. X.; Xu, P.; Yan, Z.; Zarov, I.; Zhang, Y.; Fan, A.; Kambadur, M.; Narang, S.; Rodriguez, A.; Stojnic, R.; Edunov, S.; and Scialom, T. 2023b. Llama 2: Open Foundation and Fine-Tuned Chat Models. arXiv:2307.09288. our card
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A. N.; Kaiser, Ł.; and Polosukhin, I. 2017. Attention is All you Need. In Advances in Neural Information Processing Systems (NIPS '17), volume 30. Curran Associates. our card
- Wang, L.; Xu, W.; Lan, Y.; Hu, Z.; Lan, Y.; Lee, R. K.-W.; and Lim, E.-P. 2023a. Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, ACL '23, 2609–2634. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
- Wang, X.; Wei, J.; Schuurmans, D.; Le, Q. V.; Chi, E. H.; Narang, S.; Chowdhery, A.; and Zhou, D. 2023b. Self-Consistency Improves Chain of Thought Reasoning in Language Models. In Proceedings of the Eleventh International Conference on Learning Representations, ICLR '23. our card
- Wang, Z.; Cai, S.; Chen, G.; Liu, A.; Ma, X.; and Liang, Y. 2023c. Describe, Explain, Plan and Select: Interactive Planning with Large Language Models Enables Open-World Multi-Task Agents. In Advances in Neural Information Processing Systems (NeurIPS '23), volume 36. Curran Associates. our card
- Wang, Z.; Zhang, G.; Yang, K.; Shi, N.; Zhou, W.; Hao, S.; Xiong, G.; Li, Y.; Sim, M. Y.; Chen, X.; Zhu, Q.; Yang, Z.; Nik, A.; Liu, Q.; Lin, C.; Wang, S.; Liu, R.; Chen, W.; Xu, K.; Liu, D.; Guo, Y.; and Fu, J. 2023d. Interactive Natural Language Processing. arXiv:2305.13246. OpenAlex ↗ · Scholar ↗
- Wang, Z. J.; Choi, D.; Xu, S.; and Yang, D. 2021. Putting Humans in the Natural Language Processing Loop: A Survey. In Proceedings of the First Workshop on Bridging Human-Computer Interaction and Natural Language Processing, 47–52. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
- Wei, J.; Wang, X.; Schuurmans, D.; Bosma, M.; Chi, E.; Le, Q.; and Zhou, D. 2022. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. arXiv:2201.11903. our card
- Wu, T.; Jiang, E.; Donsbach, A.; Gray, J.; Molina, A.; Terry, M.; and Cai, C. J. 2022. PromptChainer: Chaining Large Language Model Prompts through Visual Programming. In Extended Abstracts of the Conference on Human Factors in Computing Systems, CHI EA '22. ACM. OpenAlex ↗ · Scholar ↗
- Wu, T.; Terry, M.; and Cai, C. J. 2022. AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Prompts. In Proceedings of the Conference on Human Factors in Computing Systems, CHI '22. ACM. OpenAlex ↗ · Scholar ↗
- Wu, Z.; Pan, S.; Chen, F.; Long, G.; Zhang, C.; and Yu, P. S. 2021. A Comprehensive Survey on Graph Neural Networks. IEEE Transactions on Neural Networks and Learning Systems, 32(1): 4–24. our card
- Xie, Y.; Kawaguchi, K.; Zhao, Y.; Zhao, X.; Kan, M.-Y.; He, J.; and Xie, Q. 2023. Self-Evaluation Guided Beam Search for Reasoning. In Advances in Neural Information Processing Systems (NeurIPS '23), volume 36. Curran Associates. our card
- Yang, S.; Nachum, O.; Du, Y.; Wei, J.; Abbeel, P.; and Schuurmans, D. 2023. Foundation Models for Decision Making: Problems, Methods, and Opportunities. arXiv:2303.04129. our card
- Yao, S.; Yu, D.; Zhao, J.; Shafran, I.; Griffiths, T. L.; Cao, Y.; and Narasimhan, K. R. 2023a. Tree of Thoughts: Deliberate Problem Solving with Large Language Models. In Advances in Neural Information Processing Systems (NeurIPS '23), volume 36. Curran Associates. OpenAlex ↗ · Scholar ↗
- Yao, S.; Zhao, J.; Yu, D.; Du, N.; Shafran, I.; Narasimhan, K. R.; and Cao, Y. 2023b. ReAct: Synergizing Reasoning and Acting in Language Models. In Proceedings of the Eleventh International Conference on Learning Representations, ICLR '23. our card
- Yao, Y.; Li, Z.; and Zhao, H. 2023. Beyond Chain-of-Thought, Effective Graph-of-Thought Reasoning in Large Language Models. arXiv:2305.16582. OpenAlex ↗ · Scholar ↗
- Zelikman, E.; Wu, Y.; Mu, J.; and Goodman, N. 2022. STaR: Bootstrapping Reasoning With Reasoning. In Advances in Neural Information Processing Systems (NeurIPS '22), volume 35, 15476–15488. Curran Associates. our card
- Zhang, S.; Chen, Z.; Shen, Y.; Ding, M.; Tenenbaum, J. B.; and Gan, C. 2023. Planning with Large Language Models for Code Generation. In Proceedings of the Eleventh International Conference on Learning Representations, ICLR '23. our card
- Zhang, Z.; Cui, P.; and Zhu, W. 2022. Deep Learning on Graphs: A Survey. IEEE Transactions on Knowledge and Data Engineering, 34(1): 249–270. OpenAlex ↗ · Scholar ↗
- Zhou, J.; Cui, G.; Hu, S.; Zhang, Z.; Yang, C.; Liu, Z.; Wang, L.; Li, C.; and Sun, M. 2020. Graph neural networks: A review of methods and applications. AI Open, 1: 57–81. OpenAlex ↗ · Scholar ↗
- Zhou, Y.; Muresanu, A. I.; Han, Z.; Paster, K.; Pitis, S.; Chan, H.; and Ba, J. 2022. Large Language Models Are Human-Level Prompt Engineers. arXiv:2211.01910. our card
- Zhu, X.; Wang, J.; Zhang, L.; Zhang, Y.; Huang, Y.; Gan, R.; Zhang, J.; and Yang, Y. 2023. Solving Math Word Problems via Cooperative Reasoning induced Language Models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, ACL '23, 4471–4485. Association for Computational Linguistics. our card