Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Pipelines

Pipelines are powerful and highly flexible systems that form the engine for your app. They consist of components that process your data and perform various tasks on it. Each component in a pipeline passes its output to the next component.


How Do Pipelines Work?​

Pipelines are composed of connected components. Each component processes a piece of your data, such as documents, and performs specific tasks before passing the output to the next component. For example, a basic retrieval-augmented generation (RAG) pipeline may include:

  • A TextEmbedder that takes the user query and turns it into a vector.
  • A Retriever that receives the vector from the TextEmbedder and uses it to fetch relevant documents from the document store.
  • An LLM that injects the user query and the documents from the Retriever into the prompt and generates the response.

Components function like modular building blocks that you can mix, match, and replace to form various pipeline configurations, such as loops, branches, or simultaneous flows. When connecting the components, it's crucial to ensure the output type of one component matches the input type of the next. Each component receives only the data it needs, which speeds up the pipeline and makes it easier to debug.

For details on connection types, smart connections, validation, branches, and loops, see Pipeline Connections. For details on components, see Pipeline Components.

How Do Pipelines Use Your Files?​

Pipelines run on the documents produced by the indexes they're connected to. An index preprocesses the files from a Haystack Platform workspace, converts them into documents, and writes them into a document store where a pipeline can access them. A single pipeline can be connected to multiple indexes. For details, see Indexes.

One file may produce multiple documents. Documents inherit metadata from files. Your indexing pipeline defines the exact steps for preprocessing the files.

Files uploaded to Haystack Enterprise Platform are preprocessed using pipeline components. As a result of this preprocessing they're converted into documents and stored in the DocumentStore. That's called indexing. Then, at query time, a query pipeline looks into the document store to search for relevant documents and come up with an answer based on them.

Building Pipelines​

Pipelines contain recipes for how to execute a query. Pipelines can perform different tasks, such as querying, summarizing, or arriving at an answer after a series of steps involving tool calling.

You can build pipelines in Builder by dragging and dropping components onto the canvas. The underlying YAML code is the source of truth for the pipeline. Every pipeline starts with an Input component and ends with an Output component, and a pipeline can declare Python dependencies. For details, see:

Managing Pipelines​

All the pipelines created in a workspace are listed on the Pipelines page, where you can view and manage them. Click a pipeline to open it and navigate to the different sections.

  • Build: When you click a pipeline name, you land in Builder. You can use Builder to build and test your pipeline. For details, see Creating a pipeline.
  • Playground: This is where you can test your pipeline. You can type a query and see the results. You can also upload files and test your pipeline with them. For details, see Testing your pipeline.
  • Analytics: This is where you can check all the information about your pipeline, including a KPI overview with query volume, feedback distribution, and response times, traces, search history, and logs. For details, see Monitor Pipeline Performance.
  • Settings: This is where you can check your pipeline ID and configure its settings, such as GPU acceleration, pipeline scaling, idle timeout, and feedback tags. For details, see Pipeline Settings and Scaling.