Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Implement raptor indexing engine (collapsed tree) #924

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarouaneMaatouk
Copy link
Contributor

@MarouaneMaatouk MarouaneMaatouk commented Feb 4, 2024

Description [WIP]

Implement RAPTOR: Recursive Abstractive Processing For Tree-Organized Retrieval
paper: https://arxiv.org/pdf/2401.18059.pdf

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • New Loader/Tool
  • Bug fix / Smaller change
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added new unit/integration tests
  • Added new notebook (that tests end-to-end)
  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have added a library.json file if a new loader/tool was added
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

@logan-markewich
Copy link
Collaborator

@MarouaneMaatouk can you run make lint to fix the linting errors?

),
]

summary.append(self.llm.chat(messages).message.content)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we could use a TreeSummarize module here to recursively summarize -- maybe I'll try to add this


def run(self, *args: Any, **kwargs: Any) -> Any:
"""Run the pipeline."""
return self.indexing_engine.insert_abstractions(*args, **kwargs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did I miss where querying is implemented? Or is that not done yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, I'll complete this PR sometime this week 👍

@MarouaneMaatouk MarouaneMaatouk force-pushed the pack/Recursive-Abstractive-Processing-for-Tree-Organized-Retrieval branch from 8096a98 to 192308f Compare February 6, 2024 17:46
@jerryjliu
Copy link
Collaborator

hey @MarouaneMaatouk - quick bump on this. once it's ready we'll help you port it over to llama_index (with the v0.10 upgrades packs are consolidated into the main repo)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants