Rasa integration with Haystack - how to call different Haystack services #3326
-
This site https://www.deepset.ai/blog/build-smart-conversational-agents-with-chatbots-qa says it is possible to create different intents for questions about different domains with giving more examples of new intents and retraining the Rasa model to become good at differentiating between the topics. Each topic should then have its own action, each of which should call a different Haystack service. My question is: how can this be done via the Haystack REST API? Which files do I need to work on to make these differentiations? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @SoniaMola If you want to use different intents for questions about different domains, there are several ways to implement that in Haystack. One option would be to use metadata filtering. Imagine every document in your document store having a metadata field that contains the domain of the document. Then you can filter for one of the domains based on the question/intent. You can pass filters to the retriever node: haystack/haystack/nodes/retriever/dense.py Line 261 in b10e2c3 Here is our documentation page about metadata filtering: https://docs.haystack.deepset.ai/docs/metadata-filtering I assume you already had a look at the code in the repository here: https://github.com/deepset-ai/rasa-haystack ? If not, it might also be helpful. Another, more advanced but also more flexible way would be to have multiple indices in the document store or even multiple separate pipelines. The latter would not work out of the box though. |
Beta Was this translation helpful? Give feedback.
Hi @SoniaMola If you want to use different intents for questions about different domains, there are several ways to implement that in Haystack. One option would be to use metadata filtering. Imagine every document in your document store having a metadata field that contains the domain of the document. Then you can filter for one of the domains based on the question/intent. You can pass filters to the retriever node:
haystack/haystack/nodes/retriever/dense.py
Line 261 in b10e2c3
Here is our documentation page about metadata filtering: https://docs.haystack.deepset…