parthsarthi03 / raptor

The official implementation of RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval
https://arxiv.org/abs/2401.18059
MIT License
878 stars 126 forks source link

Added support for visualising the Tree #40

Open jalotra opened 4 months ago

jalotra commented 4 months ago

Solves #36

How to test, have written a sample test in :

python3 -m raptor.tests.visualise_tree_test

Example Image generated with test : image

jalotra commented 4 months ago

@parthsarthi03 please review as and when you get waqt

jalotra commented 4 months ago

@parthsarthi03 Reminding

jalotra commented 4 months ago

I'd want to avoid adding extra dependencies. Rest looks good, could we also have a readme section on how to visualize.

Have added instructions in both Readme and demo.ipynb on how to use visualisation using plotly.

jalotra commented 4 months ago

@parthsarthi03 please look once whenever free

parthsarthi03 commented 4 months ago

@jalotra Thanks for the great work! I was running it for the sample story, but there seems to be a bug, the root index 34, is becoming a parent note of the -1 index node (see screenshot below).

Also, not a blocker but a great feature to have would be layer no. displayed with a different color for each layer.

Screen Shot 2024-05-29 at 3 37 36 PM
jalotra commented 4 months ago

hello hello, this is a plotly thing where they sometimes visually mark up the child on top if space is limited, but rest assured that node is child.