A collection of example notebooks using Haystack 👇
You can use these examples as guidelines on how to make use of different model providers, vector databases, retrieval techniques and more with Haystack. Most of them showcase a specific, small demo.
To learn more about how to use Haystack, please visit our Docs and official Tutorials.
For more examples, you may also find our Blog useful.
Note: Unless '(Haystack 1.x)' is mentioned in the title, all of these examples use Haystack 2.0 onwards.
Name
Colab
Speaker Diarization with AssemblyAI
Advance Prompt Customization for Anthropic
Techcrunch News Digest with Local LLMs using TitanML Takeoff
Use Gemini Models with Vertex AI
Gradient AI Embedders and Generators for RAG
Mixtral 8x7B with Hugging Face TGI for Web QA
Amazon Bedrock and OpenSearch for PDF QA
Use Zephyr 7B Beta with Hugging Face for RAG
Hacker News RAG with Custom Component
Use Chroma for RAG and Indexing
Using the Jina-embeddings-v2-base-en model in a Haystack RAG pipeline for legal document analsysis
Multilingual RAG from a podcast with Whisper, Qdrant and Mistral
Improve retrieval by embedding meaningful metadata
Advanced RAG: Query Expansion
Information extraction via LLMs (Gorilla OpenFunctions)
Information extraction via LLMs (NexusRaven)
Using AstraDB as a data store in your Haystack pipelines
Streaming model explorer: compare how different models handle the same prompt.
Function Calling with OpenAIChatGenerator
Use the vLLM inference engine in Haystack 2.x
Build with Google Gemma: chat and RAG
Optimizing Retrieval with HyDE
RAG pipeline using FastEmbed for embeddings generation
Sparse Embedding Retrieval with Qdrant and FastEmbed
Hybrid Retrieval: BM42 + Dense Retrieval (with Qdrant and FastEmbed)
Air-Gapped RAG pipelines with NVIDIA NIMs
Evaluate a RAG pipeline using Haystack-UpTrain integration
RAG on the Oscars using Llama 3.1 models
Chatting with SQL Databases
Evaluate a RAG pipeline using DeepEval integration
Evaluate a RAG pipeline using Ragas integration
Extract Metadata Filters from a Query
Run tasks concurrently within a custom component
Prompt Optimization with DSPy
RAG Evaluation with Prometheus 2
Build quizzes and adventures with Character Codex and llamafile
Invoking APIs with OpenAPITool
Extract and use website content for RAG with Apify
RAG with Memory
Cohere for Multilingual QA (Haystack 1.x)
GPT-4 and Weaviate for Custom Documentation QA (Haystack 1.x)
Whisper Transcriber and Weaviate for YouTube video QA (Haystack 1.x)
How to Contribute to this repository
If you have an example that uses Haystack, you can add it to this repository by creating a PR. You can also create a PR from Colab by creating a Fork of this repository and selecting "Save a Copy to GitHub". Once you add your example to your fork, you can create a PR onto this repository.
Add your Notebook
Give a descriptive name to your file that includes the names of (if applicable) the model providers, databases the technologies you use in your example and/or the task you are completing in the example.