Output

Use Output as the final component in your query pipelines to display answers and , optionally, documents.

Basic Information

  • Pipeline type: Query
  • Type: Not applicable
  • Components it can connect with:
    • Output is the last component in query pipelines.
    • AnswerBuilder: Output receives answers from an AnswerBuilder.
    • Ranker: Output receives documents from a Ranker.

Inputs

Output must receive either answers, documents, or both. If one is not provided, the other becomes required.

NameTypeRequiredDescription
answersA list of Answer objects.Yes, if it doesn't receive documentsFinal answers.
documentsA list of Document objects.Yes, if it doesn't receive answersDocuments 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.

AnswerBuilder connected with its answers output 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.documents

Init Parameters

This component doesn't take any initialization parameters.