2021-10-26 16:04:58 +03:00
< p align = "center" >
2022-08-24 19:05:12 +02:00
< a href = "https://www.deepset.ai/haystack/" > < img src = "https://raw.githubusercontent.com/deepset-ai/haystack/main/docs/img/haystack_logo_colored.png" alt = "Haystack" > < / a >
2021-10-26 16:04:58 +03:00
< / p >
2020-12-27 12:58:48 +01:00
2020-11-02 20:03:22 +01:00
< p >
2022-06-15 09:53:36 +02:00
< a href = "https://github.com/deepset-ai/haystack/actions/workflows/tests.yml" >
2022-08-24 19:05:12 +02:00
< img alt = "Tests" src = "https://github.com/deepset-ai/haystack/workflows/Tests/badge.svg?branch=main" >
2022-06-15 09:53:36 +02:00
< / a >
2022-10-28 13:57:42 +02:00
< a href = "https://github.com/deepset-ai/haystack-json-schema/actions/workflows/schemas.yml" >
< img alt = "Schemas" src = "https://github.com/deepset-ai/haystack-json-schema/actions/workflows/schemas.yml/badge.svg" >
< / a >
2022-10-28 11:59:49 +02:00
< a href = "https://docs.haystack.deepset.ai" >
< img alt = "Documentation" src = "https://img.shields.io/website?label=documentation&up_message=online&url=https%3A%2F%2Fdocs.haystack.deepset.ai" >
2020-11-02 20:03:22 +01:00
< / a >
2022-12-22 10:08:26 +01:00
< a href = "https://app.fossa.com/projects/custom%2B24445%2Fgithub.com%2Fdeepset-ai%2Fhaystack?ref=badge_shield" >
< img alt = "FOSSA Status" src = "https://app.fossa.com/api/projects/custom%2B24445%2Fgithub.com%2Fdeepset-ai%2Fhaystack.svg?type=shield" / >
< / a >
2020-11-02 20:03:22 +01:00
< a href = "https://github.com/deepset-ai/haystack/releases" >
< img alt = "Release" src = "https://img.shields.io/github/release/deepset-ai/haystack" >
< / a >
2022-08-24 19:05:12 +02:00
< a href = "https://github.com/deepset-ai/haystack/commits/main" >
2020-11-02 20:03:22 +01:00
< img alt = "Last commit" src = "https://img.shields.io/github/last-commit/deepset-ai/haystack" >
< / a >
2021-01-10 06:26:17 +01:00
< a href = "https://pepy.tech/project/farm-haystack" >
< img alt = "Downloads" src = "https://pepy.tech/badge/farm-haystack/month" >
2020-12-27 12:58:48 +01:00
< / a >
2021-10-21 12:10:18 +02:00
< a href = "https://www.deepset.ai/jobs" >
2021-06-03 14:47:08 +02:00
< img alt = "Jobs" src = "https://img.shields.io/badge/Jobs-We're%20hiring-blue" >
< / a >
< a href = "https://twitter.com/intent/follow?screen_name=deepset_ai" >
2023-02-01 16:59:22 +01:00
< img alt = "Twitter" src = "https://img.shields.io/badge/follow-%40deepset_ai-1DA1F2?logo=twitter" >
< / a >
< a href = "https://discord.com/invite/qZxjM4bAHU" >
< img alt = "chat on Discord" src = "https://img.shields.io/discord/993534733298450452?logo=discord" >
2022-08-24 03:46:21 -04:00
< / a >
2020-11-02 20:03:22 +01:00
< / p >
2022-10-26 17:28:46 +02:00
[Haystack ](https://haystack.deepset.ai ) is an end-to-end framework that enables you to build powerful and production-ready pipelines for different search use cases.
2023-01-27 15:44:39 +01:00
Whether you want to perform question answering (QA) or semantic document search, you can use the state-of-the-art NLP models in Haystack to provide unique search experiences and allow your users to query in natural language.
Haystack is built in a modular fashion so that you can combine the best technology from other open source projects, like Hugging Face's transformers, Elasticsearch, or Milvus.
2020-11-02 20:03:22 +01:00
2022-08-24 19:05:12 +02:00
< p align = "center" > < img src = "https://raw.githubusercontent.com/deepset-ai/haystack/main/docs/img/main_example.gif" > < / p >
2021-02-16 15:32:43 +01:00
2023-01-27 15:44:39 +01:00
## What to Build with Haystack
2021-02-16 15:32:43 +01:00
2021-03-16 11:00:57 -04:00
- **Ask questions in natural language** and find granular answers in your documents.
2023-01-27 15:44:39 +01:00
- Perform **semantic search** and retrieve documents according to meaning, not keywords.
2021-03-16 11:00:57 -04:00
- Use **off-the-shelf models** or **fine-tune** them to your domain.
- Use **user feedback** to evaluate, benchmark, and continuously improve your live models.
2021-02-16 15:32:43 +01:00
- Leverage existing **knowledge bases** and better handle the long tail of queries that **chatbots** receive.
- **Automate processes** by automatically applying a list of questions to new documents and using the extracted answers.
## Core Features
2023-01-27 15:44:39 +01:00
- **Latest models**: Utilize all latest transformer-based models (for example, BERT, RoBERTa, MiniLM) for extractive QA, generative QA, and document retrieval.
2021-10-27 15:55:34 +02:00
- **Modular**: Multiple choices to fit your tech stack and use case. Pick your favorite database, file converter, or modeling framework.
2023-01-27 15:44:39 +01:00
- **Pipelines**: Use the Node and Pipeline design of Haystack to route queries to only the relevant components.
- **Open**: 100% compatible with Hugging Face's model hub. Tight interfaces to other frameworks (for example, transformers, FARM, sentence-transformers).
- **Scalable**: Scale to millions of docs using retrievers, production-ready backends like Elasticsearch / FAISS, and a fastAPI REST API.
- **End-to-End**: All tooling in one place: file conversion, cleaning, splitting, training, eval, inference, labeling, and more.
- **Developer friendly**: Easy to debug, extend, and modify.
2021-10-27 15:55:34 +02:00
- **Customizable**: Fine-tune models to your domain or implement your custom DocumentStore.
2023-01-27 15:44:39 +01:00
- **Continuous Learning**: Collect new training data from user feedback in production & improve your models continuously.
2020-11-02 20:03:22 +01:00
2022-09-20 18:32:45 +02:00
| | |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2022-11-15 09:54:55 +01:00
| :ledger: [Docs ](https://docs.haystack.deepset.ai ) | Components, Pipeline Nodes, Guides, API Reference |
2022-09-20 18:32:45 +02:00
| :floppy_disk: [Installation ](https://github.com/deepset-ai/haystack#floppy_disk-installation ) | How to install Haystack |
| :mortar_board: [Tutorials ](https://github.com/deepset-ai/haystack#mortar_board-tutorials ) | See what Haystack can do with our Notebooks & Scripts |
| :beginner: [Quick Demo ](https://github.com/deepset-ai/haystack#beginner-quick-demo ) | Deploy a Haystack application with Docker Compose and a REST API |
| :vulcan_salute: [Community ](https://github.com/deepset-ai/haystack#vulcan_salute-community ) | [Discord ](https://haystack.deepset.ai/community/join ), [Twitter ](https://twitter.com/deepset_ai ), [Stack Overflow ](https://stackoverflow.com/questions/tagged/haystack ), [GitHub Discussions ](https://github.com/deepset-ai/haystack/discussions ) |
| :heart: [Contributing ](https://github.com/deepset-ai/haystack#heart-contributing ) | We welcome all contributions! |
2022-11-15 09:54:55 +01:00
| :bar_chart: [Benchmarks ](https://haystack.deepset.ai/benchmarks/ ) | Speed & Accuracy of Retriever, Readers and DocumentStores |
2022-09-20 18:32:45 +02:00
| :telescope: [Roadmap ](https://haystack.deepset.ai/overview/roadmap ) | Public roadmap of Haystack |
| :newspaper: [Blog ](https://medium.com/deepset-ai ) | Read our articles on Medium |
| :phone: [Jobs ](https://www.deepset.ai/jobs ) | We're hiring! Have a look at our open positions |
2020-11-02 20:03:22 +01:00
2021-10-29 16:39:58 +02:00
## :floppy_disk: Installation
2020-11-02 20:03:22 +01:00
2023-01-27 15:44:39 +01:00
**Basic Installation**
2021-02-16 15:32:43 +01:00
2023-01-27 15:44:39 +01:00
Use [pip ](https://github.com/pypa/pip ) to install a basic version of Haystack's latest release:
2020-11-02 20:03:22 +01:00
2021-02-16 15:32:43 +01:00
```
2023-01-27 15:44:39 +01:00
pip install farm-haystack
2021-02-16 15:32:43 +01:00
```
2023-01-27 15:44:39 +01:00
This command installs everything needed for basic Pipelines that use an Elasticsearch DocumentStore.
2020-11-02 20:03:22 +01:00
2023-01-27 15:44:39 +01:00
**Full Installation**
2021-02-16 15:32:43 +01:00
2023-01-27 15:44:39 +01:00
To use more advanced features, like certain DocumentStores, FileConverters, OCR, or Ray, install further dependencies. The following command installs the latest version of Haystack and all its dependencies from the main branch:
2021-02-16 15:32:43 +01:00
```
2022-02-10 11:54:06 +01:00
git clone https://github.com/deepset-ai/haystack.git
cd haystack
pip install --upgrade pip
2022-03-08 16:29:08 +00:00
pip install -e '.[all]' ## or 'all-gpu' for the GPU-enabled dependencies
2021-02-16 15:32:43 +01:00
```
2023-01-27 15:44:39 +01:00
**Custom Installation**
You can choose the dependencies you want to install. To do so, specify them in the `pip install` command:
2020-11-02 20:03:22 +01:00
2023-01-27 15:44:39 +01:00
```
pip install 'farm-haystack[DEPENDENCY_OPTION]'
```
You can find a full list of dependency options at [haystack/pyproject.toml ](https://github.com/deepset-ai/haystack/blob/main/pyproject.toml#L96 ).
If you're running pip version earlier than 21.3, you can't install dependency groups that reference other groups. Instead, you can only specify groups that contain direct package references:
```
# instead of '[all]'
pip install 'farm-haystack[sql,only-faiss,only-milvus1,weaviate,pinecone,opensearch,graphdb,inmemorygraph,crawler,preprocessing,ocr,onnx,ray,dev]'
# instead of '[all-gpu]'
pip install 'farm-haystack[sql,only-faiss-gpu,only-milvus1,weaviatepinecone,opensearch,graphdb,inmemorygraph,crawler,preprocessing,ocr,onnx-gpu,ray,dev]'
```
2022-01-27 11:22:14 +01:00
2023-01-27 15:44:39 +01:00
**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:
2022-02-10 15:00:09 +01:00
```
pip install rest_api/
```
2023-01-27 15:44:39 +01:00
**Other Operating Systems**
**Windows**
We recommend installing [WSL ](https://learn.microsoft.com/en-us/windows/wsl/install ) to use Haystack on Windows:
2022-01-27 11:22:14 +01:00
```
2022-02-10 11:54:06 +01:00
pip install farm-haystack -f https://download.pytorch.org/whl/torch_stable.html
2022-01-27 11:22:14 +01:00
```
2023-01-27 15:44:39 +01:00
**Apple Silicon (M1)**
2022-01-27 11:22:14 +01:00
2023-01-27 15:44:39 +01:00
Macs with an M1 processor require some extra dependencies to install Haystack:
2022-01-27 11:22:14 +01:00
2022-02-10 11:54:06 +01:00
```
# some additional dependencies needed on m1 mac
brew install postgresql
brew install cmake
brew install rust
2022-01-27 11:22:14 +01:00
2022-02-10 11:54:06 +01:00
# haystack installation
GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true pip install git+https://github.com/deepset-ai/haystack.git
```
2020-11-02 20:03:22 +01:00
2023-01-27 15:44:39 +01:00
**Learn More**
2021-02-16 15:32:43 +01:00
2023-01-27 15:44:39 +01:00
See our [installation guide ](https://docs.haystack.deepset.ai/docs/installation ) for more options.
2022-08-24 03:46:21 -04:00
You can find out more about our PyPi package on our [PyPi page ](https://pypi.org/project/farm-haystack/ ).
2020-11-02 20:03:22 +01:00
2021-10-29 16:39:58 +02:00
## :mortar_board: Tutorials
2020-11-02 20:03:22 +01:00
2022-08-24 19:05:12 +02:00

2020-11-02 20:03:22 +01:00
2022-08-24 03:46:21 -04:00
Follow our [introductory tutorial ](https://haystack.deepset.ai/tutorials/first-qa-system )
2023-01-27 15:44:39 +01:00
to set up a question answering system using Python and start performing queries!
2022-11-02 18:11:03 +01:00
Explore [the rest of our tutorials ](https://haystack.deepset.ai/tutorials )
2023-01-27 15:44:39 +01:00
to learn how to tweak pipelines, train models, and perform evaluation.
2021-05-05 15:35:21 +02:00
2021-10-29 16:39:58 +02:00
## :beginner: Quick Demo
2021-02-16 15:32:43 +01:00
2021-12-03 13:34:19 +00:00
**Hosted**
Try out our hosted [Explore The World ](https://haystack-demo.deepset.ai/ ) live demo here!
2022-08-24 03:46:21 -04:00
Ask any question on countries or capital cities and let Haystack return the answers to you.
2021-12-03 13:34:19 +00:00
**Local**
2023-01-03 11:49:12 +03:00
To run the Explore The World demo on your own machine and customize it to your needs, check out the instructions on [Explore the World repository ](https://github.com/deepset-ai/haystack-demos/tree/main/explore_the_world ) on GitHub.
2020-11-02 20:03:22 +01:00
2021-10-27 15:55:34 +02:00
## :vulcan_salute: Community
2020-11-02 20:03:22 +01:00
2021-10-27 15:55:34 +02:00
There is a very vibrant and active community around Haystack which we are regularly interacting with!
If you have a feature request or a bug report, feel free to open an [issue in Github ](https://github.com/deepset-ai/haystack/issues ).
We regularly check these and you can expect a quick response.
2022-08-24 03:46:21 -04:00
If you'd like to discuss a topic, or get more general advice on how to make Haystack work for your project,
2022-11-21 11:26:16 +01:00
you can start a thread in [Github Discussions ](https://github.com/deepset-ai/haystack/discussions ) or our [Discord channel ](https://haystack.deepset.ai/community ).
2021-10-27 15:55:34 +02:00
We also check [Twitter ](https://twitter.com/deepset_ai ) and [Stack Overflow ](https://stackoverflow.com/questions/tagged/haystack ).
2020-11-02 20:03:22 +01:00
## :heart: Contributing
2022-09-20 18:32:45 +02:00
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.
2022-08-24 19:05:12 +02:00
To learn how to get started, check out our [Contributor Guidelines ](https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md ) first.
2021-09-27 10:52:07 +02:00
You can also find instructions to run the tests locally there.
2021-10-27 15:55:34 +02:00
Thanks so much to all those who have contributed to our project!
2020-11-02 20:03:22 +01:00
2021-10-27 15:55:34 +02:00
< a href = "https://github.com/deepset-ai/haystack/graphs/contributors" >
< img src = "https://contrib.rocks/image?repo=deepset-ai/haystack" / >
< / a >
2022-02-14 16:21:41 +01:00
2023-01-27 15:44:39 +01:00
## Who Uses Haystack
2022-02-14 16:21:41 +01:00
2023-01-27 15:44:39 +01:00
Here's a list of organizations that use Haystack. Don't hesitate to send a PR to let the world know that you use Haystack. Join our growing community!
2022-02-14 16:21:41 +01:00
- [Airbus ](https://www.airbus.com/en )
- [Alcatel-Lucent ](https://www.al-enterprise.com/ )
- [BetterUp ](https://www.betterup.com/ )
- [Deepset ](https://deepset.ai/ )
- [Etalab ](https://www.etalab.gouv.fr/ )
- [Infineon ](https://www.infineon.com/ )
- [Sooth.ai ](https://sooth.ai/ )