# 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="https://662370747-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3VoWwSsyrEg0DEvIIjv9%2Fuploads%2Fgit-blob-730d7732e93da9284268218da38e94a2002616a2%2Fimage%20(7)%20(1)%20(1)%20(1)%20(2).png?alt=media" 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:
```
