A pipeline connects computational components into an explicit data flow. In LLM and agent systems, sequential pipelines suit tasks with clear phases, such as retrieving evidence, drafting an answer, validating citations, and producing a response. section 7.7.1
For sequential pipelines:
- Make each stage report its status, confidence, and unresolved assumptions to help contain errors that propagate from early decisions. section 7.7.1
- Connect reusable components for retrieval, ranking, routing, filtering, generation, validation, or fallback; explicit paths make context flow visible but still require careful design. section 10.3.3
Research and writing
A sequential workflow can retrieve evidence, draft an answer, validate its citations, and produce the final response. section 7.7.1
Listing 10.3 Composing a pipeline with an explicit custom component in Haystack
pipeline = Pipeline()
pipeline.add_component(
"retriever", InMemoryBM25Retriever(document_store=document_store)
)
pipeline.add_component("assembler", ContextAssembler())
pipeline.add_component("formatter", ResponseFormatter())
# Typed connections make the data flow between stages explicit
pipeline.connect("retriever.documents", "assembler.documents")
pipeline.connect("assembler.context", "formatter.context")
See a Haystack example connecting retriever, context assembler, and response formatter components through typed data-flow connections. section 10.3.3






























































