← All sessions, cheat sheets & labs
Week 2 · Field guide · RAG framework

Haystack

A RAG and search framework built around explicit, composable pipelines of typed components: clear architecture over magic, from the deepset team.

RAGopen sourcePythonpipeline-clarity

What it is

Search and RAG as an explicit pipeline.

Haystack, by deepset, models retrieval and search as a pipeline of typed components you wire together: a retriever, a ranker, a prompt builder, a generator, each with declared inputs and outputs. Nothing is hidden behind a convenience call, so the architecture is easy to read, reason about, and unit-test. The trade-off against LlamaIndex is a smaller connector ecosystem in exchange for a clearer, more explicit model of the flow.

The one job

Production search and RAG from explicit components.

It turns a search or RAG system into a graph of typed, testable parts. You can see exactly what each stage receives and returns, which makes the pipeline something you operate rather than something you hope works.

Reach for it when

Skip it when

The principle it teaches

Course principle

Explicit pipelines beat magic. Haystack mirrors the course's "make the flow visible" stance: when every stage is a named, typed component, you can test it, trace it, and reason about failures instead of guessing.

Where it fits your labs

This is a Week 2 tool, and a strong alternative to LlamaIndex for Lab 2. Reach for it when you would rather see the RAG pipeline as explicit, testable components than lean on a framework's convenience layer.

Use in
Lab 2 (hybrid RAG), as an alternative to LlamaIndex.
week 2
Pairs with
A vector database for storage and a reranker as the precision stage.