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

Add top_k Support for Tree Collapsing Functionality #12

Closed parthsarthi03 closed 6 months ago

parthsarthi03 commented 6 months ago

This PR introduces the top_k parameter to the retrieve_information_collapse_tree method in the TreeRetriever class. It allows users to control the number of top nodes to consider when retrieving information from the collapsed tree.

Usage:

Functionality:

salman-abdullah commented 6 months ago

Looks good to me!