Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated 3 months ago
0
Follow
Hi what s the best way to feed a tree
Hi what s the best way to feed a tree
Inactive
0
Follow
J
Jet
last year
Β·
Hi, what's the best way to feed a tree data structure as input text to a LLM? I'm trying to summarize a comment section where dependencies between nodes are important - a comment is only replying to its parent comment.
L
J
3 comments
Share
Open in Discord
L
Logan M
last year
You can setup nodes to have relationships i.e prev and next, so here's an idea.
You could configure each node in a thread to point to the one above/below it.
Then you could use the prev next node postprocessor, which should grab all nodes from a thread when one node from a thread is retrieved π€
L
Logan M
last year
Some relevant links:
https://gpt-index.readthedocs.io/en/latest/end_to_end_tutorials/usage_pattern.html#parse-the-documents-into-nodes
https://gpt-index.readthedocs.io/en/latest/core_modules/query_modules/node_postprocessors/usage_pattern.html
https://gpt-index.readthedocs.io/en/latest/core_modules/query_modules/node_postprocessors/modules.html#beta-prevnextnodepostprocessor
J
Jet
last year
Thanks a lot! I will try that.
Add a reply
Sign up and join the conversation on Discord
Join on Discord