Closed younes-io closed 6 months ago
Thanks for catching this! I've replicated the issue, we'll be pushing a fix for this soon. In the meantime, you can set collapse_tree=False
and it should work. Also, if you want to answer question and not just retrieve the context, you should be using RA.answer_question(question=question)
.
@parthsarthi03 : yes, I already tried the answer_question
and it works. I want to test/try and eventually use RAPTOR as a retriever =) Thank you
I tried the collapse_tree=False
, but it doesn't answer correctly. I hope collapse_tree=True
will be able to provide the entire space to the retriever to discover the correct answer (it's a difficult question, actually; not the one above)
This should be fixed with https://github.com/parthsarthi03/raptor/commit/81b0c95b80ccb3576b0a70a2a5207c7a899d1b4f.
https://github.com/parthsarthi03/raptor/pull/12 has added top_k
support for collapse_true
and sets collapse_true
to True
by default. There are two extra parameters that you can change: top_k
and max_tokens
.
top_k
controls the number of top nodes to consider when retrieving information, defaulting to 10. max_tokens
limits the maximum number of tokens in the retrieved context, defaulting to 3500, ensuring the context stays within the specified token limit.
Example usage:
context, __ = RA.retrieve(question, top_k=10, max_tokens=3500)
answer = RA.answer_question(question, top_k=10, max_tokens=3500)
Closing this issue for now. If you have any further questions or encounter additional issues, please feel free to reopen it.
thank you @parthsarthi03
I asked this:
and got this: