-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Generative QA Models like RAG #443
Comments
This would be really cool for domain-specific literature review |
@tholor As it is now in RAG, Is it correct to pass the haystack retriever output as inputs to RAG as cited in the snippet below in the RAG reference code given here ? input_dict = tokenizer.prepare_seq2seq_batch(pass formatted haystack retriever outputs here, return_tensors="pt") |
@nsankar I didn't have time yet to look into this, but I believe something like this should be possible with the |
@tholor Yet to try this. I shall feedback once I try. Thank you for the inputs. |
I'm here to cheerlead you guys on! Can't wait for this |
Thanks to @lalitpagaria RAG integration in #484 is almost done! If you are very eager to try, you could already test it on the branch itself. There's already a small tutorial notebook! |
@tholor I am definitely eager to try! Where is the tutorial notebook? I'll try it on the branch |
@Weilin37 You can find the preliminary version here: https://github.com/lalitpagaria/haystack/blob/implement_RAG/tutorials/Tutorial7_RAG_Generator.ipynb |
@Weilin37 In this notebook you need to use different haystack version.
to -
|
Thank you! I am a "No module named 'haystack.generator'". |
Please try this script https://github.com/lalitpagaria/haystack/blob/implement_RAG/tutorials/Tutorial7_RAG_Generator.py Install |
Fixed by #484 |
What?
So far most generative QA models were not really useful in practice, because they could only answer very generic questions that were included in their "wiki + web" training corpora. For use cases in the industry we mostly want to:
Pure generative models don't fulfill these requirements. However, recent retrieval-augmented approaches could be interesting to test.
How?
The latest transformers release comes with the RAG model from Facebook (https://ai.facebook.com/blog/retrieval-augmented-generation-streamlining-the-creation-of-intelligent-natural-language-processing-models). We could add a "TransformersGenerator" class in Haystack that gets documents from the retriever and generates the answer conditioned on those.
The text was updated successfully, but these errors were encountered: