deepset-ai/haystack-tutorials

Here you can find all the Tutorials for Haystack 📓

What it solves

This repository gathers the official Haystack tutorials in one place. Haystack is a framework for building AI applications that work with documents, search, and large language models. The tutorials teach you how to complete common tasks — like creating a question-answering pipeline, building a tool-calling agent, or evaluating retrieval-augmented generation (RAG) systems — without having to figure everything out from scratch.

How it works

Each tutorial is a Jupyter notebook (with a .ipynb extension) that you can read or run. The repository lists tutorials in a table, and each one also has a button to open the notebook in Google Colab, so you can run it in your browser without installing anything locally. The notebooks are also published on the Haystack website for easy browsing. The project uses automated workflows: one runs the tutorials nightly to check they still work, and another publishes the latest versions to the Haystack home page. If you want to add or fix a tutorial, there are contributing guidelines in the repository.

The topics covered include:

  • Building your first RAG pipeline for question answering
  • Generating structured output with loop-based auto-correction
  • Serializing (saving and loading) pipelines
  • Preprocessing different file types
  • Filtering by metadata
  • Classifying documents and queries by language
  • Creating a hybrid retrieval pipeline
  • Building an extractive QA pipeline
  • Evaluating RAG pipelines
  • Conditional routing in pipelines
  • Embedding metadata to improve retrieval
  • Building a chat application with function calling
  • Query classification with transformers-based routers
  • Retrieving a context window around a sentence
  • Building a tool-calling agent
  • Creating custom SuperComponents
  • Creating a multi-agent system

Who it’s for

This is for developers and data scientists who use Haystack and want step-by-step, runnable examples. It is also useful for anyone learning how to build search and LLM applications and wants to see concrete, working code.

Highlights

  • All tutorials are available as Jupyter notebooks and openable in Google Colab with one click
  • Tutorials are automatically checked nightly to ensure they remain up-to-date
  • The repository feeds the official Haystack tutorials page on the website
  • Covers a wide range of practical topics, from basic pipelines to advanced multi-agent systems
  • Clear contributing guidelines make it easy for the community to add new tutorials

Related

  • Project
  • Project
  • Project
  • Project