Find answers from the community

s
F
Y
a
P
Updated last year

Tree summarize

Suppose I have a vector index, top_k = 5, and I query it. I then do the same query but in response mode tree_summarize. What exactly would be different in that call? Does it try to summarize each node/chunk individually, and merge results at the end?
L
b
3 comments
Tree summarize will apply the same prompt, and sort of build a bottom up tree of answers, by comparing nodes

So you'd start with 5 answers that become the context for building a second layer of answers.

Whereas normally, you would refine a answer in sequential order

I hope that makes sense πŸ˜… I can draw a picture of this maybe in a bit lol
Thanks, Logan! It does. I'm trying to see internally what is happening so I can see for myself πŸ™‚
If your tracking it down, this all happens in the response synthesizer.

Here's the tree summarize code
https://github.com/jerryjliu/llama_index/blob/main/llama_index/response_synthesizers/tree_summarize.py
Add a reply
Sign up and join the conversation on Discord