DocumentationAPI Reference📓 Tutorials🧑‍🍳 Cookbook🤝 Integrations💜 Discord🎨 Studio
Documentation

Utility Components

See this section for a list of helper components you can use in your pipelines to perform a variety of functions, such as transforming text documents to speech, joining documents or answers, and more.

ComponentAvailable ClassesDescription
DocumentMergerDocumentMergerConcatenates multiple documents into a single one.
Example usage:
Creating summaries based on multiple documents.
Docs2AnswersDocs2AnswersConverts documents into answers.
Example usage:
When using REST API for document retrieval. REST API expects Answer as output, you can use Doc2Answer as the last node to convert the retrieved documents to answers.
JoinAnswersJoinAnswersTakes answers returned by multiple components and joins them in a single list of answers.
Example usage:
For running queries on different document types (for example, tables and text), where the documents are routed to different readers, and each reader returns a separate list of answers.
JoinDocumentsJoinDocumentsTakes documents returned by different components and joins them to form one list of documents.
Example usage:
In document retrieval pipelines, where there are different types of documents, each routed to a different retriever. Each retriever returns a separate list of documents, and you can join them into one list using JoinDocuments.
ShaperShaperCurrently functions mostly as PromptNode helper making sure the PromptNode input or output is correct.
Example usage:
In a question answering pipeline using PromptNode, where the PromptTemplate expects questions as input, while Haystack pipelines use query. You can use Shaper to rename query to questions.
SummarizerTransformersSummarizerCreates an overview of a document.
Example usage:
To get a glimpse of the documents the Retriever is returning.
TransformersImageToTextTransformersImageToTextGenerates captions for images.
Example usage:
Automatically generating captions for a list of images that you can later use in your knowledge base.
TranslatorTransformersTranslatorTranslates text from one language into another.
Example usage:
Running searches on documents in other languages.