Output
Use Output as the final component in your query pipelines to display answers and , optionally, documents.
Basic Information
- Type: Not applicable
- Components it can connect with:
Outputis the last component in query pipelines.AnswerBuilder:Outputreceives answers from anAnswerBuilder.Ranker:Outputreceives documents from a Ranker.
Inputs
Output must receive either answers, documents, or both. If one is not provided, the other becomes required.
| Name | Type | Required | Description |
|---|---|---|---|
answers | A list of Answer objects. | Yes, if it doesn't receive documents | Final answers. |
documents | A list of Document objects. | Yes, if it doesn't receive answers | Documents accompanying the answers, for example as references. |
Outputs
The output of this component is the output of the pipeline: answers and optionally documents.
Overview
Output is required at the end of query pipelines.
Usage Example
In Builder, connect the answer-generating component (such as AnswerBuilder) to Output. You can also send documents from the component that returns them (such as a Retriever or a Ranker) if you want documents to be added to the pipeline's output. In this example, DeepsetAnswerBuilder sends answers to the Output's answers input.
In YAML, list this outputs of the pipeline and the components that produce them:
outputs:
answers: answer_builder.answers
documents: ranker.documentsInit Parameters
This component doesn't take any initialization parameters.
Updated about 1 month ago