> For the complete documentation index, see [llms.txt](https://tailwindsdocs.innovativesol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tailwindsdocs.innovativesol.com/readme/chatflows/llamaindex/response-synthesizer/tree-summarize.md).

# Tree Summarize

When provided with text chunks and a query, recursively build a tree structure and return the root node as the result.

**Pros**: Beneficial for summarization tasks

**Cons**: Accuracy of answer might be lost during traversal of tree structure

<figure><img src="/files/hgkaZAhSnvR2gTzKJa8S" alt=""><figcaption></figcaption></figure>

**Prompt**

```
Context information from multiple sources is below.
---------------------
{context}
---------------------
Given the information from multiple sources and not prior knowledge, answer the query.
Query: {query}
Answer:
```
