Doc2Answers
This Node is used to convert retrieved Documents into Answers. It allows you to call a Retriever-only pipeline using REST API.
Position in a Pipeline | At the end of a querying Pipeline |
Input | Documents |
Output | Answers |
Classes | Docs2Answers |
Usage
To use it in a Pipeline:
Copied!
from haystack.nodes import Pipelinefrom haystack.nodes import Docs2Answers
docs2answers = Docs2Answers()
pipe = Pipeline()pipe.add_node(component=retriever, name="Retriever", inputs=["Query"])pipe.add_node(component=docs2answers, name="Doc2Answers", inputs=["Retriever"])res = pipe.run(query="What did Einstein work on?")