-
I am using the haystack rest api integrated in a rasa chatbot. My doubt is the following: is it possible to use the haystack rest api with an empty document store, using only the pre-trained model (like roberta-base-squad2)? Can the chatbot answer the questions that the language model chosen in the pipeline has been trained on (defined in pipelines.haystack-pipeline.yml)? Or is the haystack rest api only able to answer questions relating to the documents contained in the document store? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
For generating answers I would recommend looking at the nodes However, it should be possible to set up the result = generator.predict(
query='What are the best party games for adults?',
documents=[],
top_k=top_k
) |
Beta Was this translation helpful? Give feedback.
For generating answers I would recommend looking at the nodes
RAGenerator
,Seq2SeqGenerator
, or theOpenAIAnswerGenerator
in Haystack. You can find more info on our docs pages here for answer generation https://docs.haystack.deepset.ai/docs/answer_generator. By default, these pipelines still expect a retriever b/c the answer generator takes both the retrieved documents and question into account to answer the question.However, it should be possible to set up the
Seq2SeqGenerator
andOpenAIAnswerGenerator
in such a way that they can work without even if they are given zero retrieved documents. For example, you could try something like