parthsarthi03 / raptor

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

Question: How to get the context used when calling `RA.answer_question`? #10

Closed younes-io closed 3 months ago

younes-io commented 3 months ago

How to get the context used when calling RA.answer_question?

(this should help when testing/debugging/evaluating, etc)

3CE8D2BAC65BDD6AA9 commented 3 months ago

Look for def answer_question in the class GPT3TurboQAModel in QAModels.py, then , you can print the context out.

parthsarthi03 commented 3 months ago

You can use

context, __ = RA.retrieve(question)
print(context)