
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
LLM framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data.
β οΈ End of Life Notice
Haystack version 1.x reached End of Life (EOL) on March 11, 2025, and is no longer receiving updates or support. The final version released is 1.26.4. We recommend migrating to Haystack version 2.x, which has been stable and available since March 2024. It is distributed via a different package named haystack-ai.
Why Upgrade to Haystack 2.x?
- More Flexible & Composable Pipelines: We introduced cyclic pipeline graphs, allowing for loops, condition-based routing and concurrent execution, which are essential for modern LLM applications.
- Customizable & Extensible Components: While there are many ready-made components, including an Agent component, creating custom components is a core functionality and all you need is to decorate your custom logic with @component.
- Improved 70+ Integrations: Unified interfaces for document stores and also for chat generators support a broad range of vector databases. Plus, all integrations are build for robust, build for real-world production use and tested nightly.
- Production-Ready Features: Enhanced, structured logging, tracing, and Hayhooks make it easy to deploy and serve pipelines as RESTful APIs.
Migration Resources:
- Migration Guide - Learn how to migrate your applications to Haystack 2.x
- Historical Documentation - Download the complete documentation for Haystack 1.x (versions 1.0 to 1.26)
- GitHub History - Access old tutorials and examples in the repository history
Important Migration Note: The package name has changed from
farm-haystack
tohaystack-ai
. These packages cannot coexist in the same Python environment. To migrate:pip uninstall -y farm-haystack haystack-ai pip install haystack-ai
Haystack is an end-to-end NLP framework that enables you to build applications powered by LLMs, Transformer models, vector search and more. Whether you want to perform question answering, answer generation, semantic document search, or build tools that are capable of complex decision-making and query resolution, you can use state-of-the-art NLP models with Haystack to build end-to-end NLP applications to solve your use case.
πββοΈ Pipelines: This is the standard Haystack structure that builds on top of your data to perform various NLP tasks such as retrieval augmented generation, question answering and more. The data in a Pipeline flows from one Node to the next. You define how Nodes interact with each other and how one Node pushes data to the next.
An example pipeline would consist of one Retriever
Node and one PromptNode
. When the pipeline runs with a query, the Retriever first retrieves the relevant context to the query from your data, and then the PromptNode uses an LLM to generate the final answer.
βοΈ Nodes: Each Node achieves one thing. Such as preprocessing documents, retrieving documents, using language models to answer questions, and so on.
π΅οΈ Agent: (since 1.15) An Agent is a component that is powered by an LLM, such as GPT-3. It can decide on the next best course of action so as to get to the result of a query. It uses the Tools available to it to achieve this. While a pipeline has a clear start and end, an Agent is able to decide whether the query has been resolved or not. It may also make use of a Pipeline as a Tool.
π οΈ Tools: You can think of a Tool as an expert, that is able to do something really well. Such as a calculator, good at mathematics. Or a WebRetriever, good at retrieving pages from the internet. A Node or pipeline in Haystack can also be used as a Tool. A Tool is a component that is used by an Agent, to resolve complex queries.
ποΈ DocumentStores: A DocumentStore is database where you store your text data for Haystack to access. Haystack DocumentStores are available with ElasticSearch, Opensearch, Weaviate, Pinecone, FAISS and more. For a full list of available DocumentStores, check out our documentation.
π Docs | Components, Pipeline Nodes, Guides, API Reference |
πΎ Installation | How to install Haystack |
π Tutorials | See what Haystack can do with our Notebooks & Scripts |
πΒ Haystack Extras | A repository that lists extra Haystack packages and components that can be installed separately. |
π° Demos | A repository containing Haystack demo applications with Docker Compose and a REST API |
π Community | Discord, π (Twitter), Stack Overflow, GitHub Discussions |
π Contributing | We welcome all contributions! |
π Benchmarks | Speed & Accuracy of Retriever, Readers and DocumentStores |
π Roadmap | Public roadmap of Haystack |
π° Blog | Learn about the latest with Haystack and NLP |
βοΈ Jobs | We're hiring! Have a look at our open positions |
For a detailed installation guide see the official documentation. There youβll find instructions for custom installations handling Windows and Apple Silicon.
Basic Installation
Use pip to install a basic version of Haystack's latest release:
pip install farm-haystack
This command installs everything needed for basic Pipelines that use an in-memory DocumentStore and external LLM provider (e.g. OpenAI).
Full Installation
To use more advanced features, like certain DocumentStores, inference with local transformer models, FileConverters, OCR, or Ray, you need to install further dependencies. The following command installs the latest release of Haystack and all its dependencies:
pip install 'farm-haystack[all]' ## or 'all-gpu' for the GPU-enabled dependencies
If you want to install only the dependencies needed for model inference on your local hardware (not remote API endpoints), such as torch and sentence-transformers, you can use the following command:
pip install 'farm-haystack[inference]' ## installs torch, sentence-transformers, sentencepiece, and huggingface-hub
If you want to try out the newest features that are not in an official release yet, you can install the unstable version from the main branch with the following command:
pip install git+https://github.com/deepset-ai/haystack.git@main#egg=farm-haystack
To be able to make changes to Haystack code, first of all clone this repo:
git clone https://github.com/deepset-ai/haystack.git
Then move into the cloned folder and install the project with pip
, including the development dependencies:
cd haystack && pip install -e '.[dev]'
If you want to contribute to the Haystack repo, check our Contributor Guidelines first.
See the list of dependencies to check which ones you want to install (for example, [all]
, [dev]
, or other).
Installing the REST API
Haystack comes packaged with a REST API so that you can deploy it as a service. Run the following command from the root directory of the Haystack repo to install REST_API:
pip install rest_api/
You can find out more about our PyPi package on our PyPi page.
You can find some of our hosted demos with instructions to run them locally too on our haystack-demos repository
:dizzy: Reduce Hallucinations with Retrieval Augmentation - Generative QA with LLMs
π₯ Should I follow? - Summarizing tweets with LLMs
π Explore The World - Extractive Question Answering
If you have a feature request or a bug report, feel free to open an issue in Github. We regularly check these and you can expect a quick response. If you'd like to discuss a topic, or get more general advice on how to make Haystack work for your project, you can start a thread in Github Discussions or our Discord channel. We also check π (Twitter) and Stack Overflow.
We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature! You don't need to be a Haystack expert to provide meaningful improvements. To learn how to get started, check out our Contributor Guidelines first.
Here's a list of projects and companies using Haystack. Want to add yours? Open a PR, add it to the list and let the world know that you use Haystack!
FAQs
LLM framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data.
We found that farm-haystack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.