-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Combining FAQ and ExtractiveQA in a pipeline with conditions #1081
Comments
Hi #@SasikiranJ, |
Thank you for the suggestion. But I have already gone through that still not able to frame solution to my use case. I will just explain my use case:- |
Hey @SasikiranJ , That's actually a cool use case and should be possible in Haystack. The QueryClassifier is just one example of a "Decision Node". You are free to write your own custom one. See this for an example. You can place your node in your pipeline after the FAQPart, write a condition in the node that checks the similarity and only branch to the Retriever-Reader nodes for similarities < X. Maybe give it a try yourself first and then we can assist if you hit some barriers or any detailed questions come up. |
@tholor Ok. I will try . Thank you |
@tholor is Document2Answer class available? one you mentioned in other issue. |
@SasikiranJ No, you are right. We don't have it yet. But you can see how it is "manually" converted (without a node) here: https://github.com/deepset-ai/haystack/blob/master/haystack/pipeline.py#L525 Let me know if you need any further help on this. |
Hi @tholor , Would you please help me with code for my use case using Docs2Answers node by creating tutorial kind of thing for combining multiple pieplines especially FAQ and ExtractiveQA Pipelines? |
Hi @SasikiranJ I think our pipelines tutorial will be helpful for you: https://colab.research.google.com/github/deepset-ai/haystack/blob/master/tutorials/Tutorial11_Pipelines.ipynb
The JoinAnswers node you would need to implement yourself similar to the JoinDocuments node here:
Further, you would need to implement the CustomClassifier node with your own logic that checks the query and the retrieved FAQ stored query. |
Question
Hello everyone, I have some use case where i have to provide both FAQ and ExtractiveQA functionalities in single search. I want to know is there way that i can define pipelines.yaml file so that I can switch from FAQPipeline to ExtractiveQA and viceversa based on some condition.
Additional context
Add any other context or screenshots about the question (optional).
The text was updated successfully, but these errors were encountered: