Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To build a first retrieval-augmented generation (RAG) application with Haystack, store a few documents, retrieve passages relevant to a question, add those passages to a prompt, and pass the prompt to a chat model. The official quick start uses an in-memory document store and BM25 retrieval, so you can learn how the pieces connect before choosing a vector database or other production infrastructure.

How a Haystack RAG pipeline works

RAG combines document retrieval with text generation. Instead of asking a model to answer from its training alone, the application finds relevant source material and includes it in the model’s prompt. Haystack organizes this as a pipeline: components receive typed inputs, do a job, and provide outputs to other components.

For the simplest question-answering flow, connect three components in order:

  1. Retriever: finds documents related to the user’s question.
  2. Prompt builder: formats the question and retrieved documents into model input.
  3. Generator: sends that prompt to a chat model and returns a response.

A document store holds the material that the retriever searches. Haystack’s concepts overview describes documents as objects that can contain text, metadata, binary data, or vector representations. A generated answer is only as useful as the material retrieved and the prompt that presents it; connecting components does not automatically make the evidence complete or correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Build a first pipeline with BM25

The Haystack 3.1 quick start installs the core framework with pip install haystack-ai. Its basic example uses InMemoryDocumentStore and InMemoryBM25Retriever, along with a prompt builder and chat generator. The example is a learning starting point: documents live in memory rather than a persistent store.

Use the official Get Started guide for the complete, version-specific runnable example. At a high level, its setup follows this sequence:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
  1. Install the framework: pip install haystack-ai.
  2. Create documents: import Document and prepare the text you want the system to search.
  3. Write documents to a store: create an InMemoryDocumentStore and add the documents.
  4. Configure components: instantiate an InMemoryBM25Retriever using that store, create a ChatPromptBuilder, and choose a chat generator.
  5. Connect the pipeline: wire the retriever’s document output to the prompt builder, then the prompt builder’s prompt output to the generator.
  6. Run it: provide the required inputs, such as the question, and inspect the generator’s reply.

The quick start imports Pipeline, Document, OpenAIChatGenerator, InMemoryBM25Retriever, InMemoryDocumentStore, ChatPromptBuilder, Secret, and ChatMessage. The model provider and its credentials are choices, not requirements of RAG itself. The guide also presents provider-specific examples for OpenAI, Hugging Face, Anthropic, Amazon Bedrock, and Google Gemini, and notes integrations including Cohere, Mistral, NVIDIA, and Ollama. Model identifiers, credentials setup, and component APIs can change; check the relevant provider component documentation when implementing.

Connect and run components correctly

Haystack pipelines can be linear or more complex, but each connection must join compatible component outputs and inputs. The pipeline construction guide recommends identifying component interfaces, initializing dependencies, adding components, connecting them, and then running the pipeline with its mandatory inputs. Haystack validates connections before execution, which helps catch mismatched component wiring early.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  1. Check each component’s required inputs and available outputs.
  2. Initialize its dependencies, such as a document store or model credentials.
  3. Create a Pipeline and add the components.
  4. Connect output names to compatible input names, such as retriever documents to the prompt builder’s document input.
  5. Call Pipeline.run() with every required input, including the question.

A pipeline is not limited to a straight line: Haystack supports directed multigraphs with branches, parallel flows, loops, standalone components, and decision components. Start with the linear retrieval-to-generation path; add graph complexity only when the application needs it.

Choose retrieval that fits your documents and questions

The quick start’s BM25 retriever is a practical first choice when you want to reduce setup. It is a sparse, lexical method: it matches query terms against document terms. Haystack’s retriever guide characterizes BM25 as simple and effective without training, particularly when wording is precise. Its limitation is that it does not naturally handle synonyms well.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Retrieval approach How it works Useful when Trade-offs
BM25 / sparse keyword Ranks documents using query and document term overlap. Important terms are likely to appear in both the question and source text. Simple and requires no training, but may miss relevant passages expressed with different wording.
Dense embeddings Represents text as vectors and retrieves by semantic similarity. Meaning matters even when the query and source use different terms. Needs an embedding model and embedding-aware retrieval; it has additional computational cost and depends on the model’s language coverage.
Sparse learned retrieval Uses learned term weighting and expansion; SPLADE is one example. You want a sparse approach that can expand beyond literal term overlap. Requires the relevant model and integration setup; no universal performance advantage is established.
Hybrid retrieval Combines sparse and dense retrieval results. Queries benefit from both exact term matching and semantic matching. Combining methods adds design and tuning choices. Database-native hybrid retrievers can be performant but may give less control over how results are merged.

These approaches solve overlapping, not identical, problems. There is no universal winner: test against representative questions and your own source material, then weigh answer relevance against latency and operational needs. The cited guides do not provide benchmark results for a particular application.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Move from in-memory storage to a suitable document store

An in-memory store is useful for learning and small experiments, but it is not persistent application storage. If your application must retain a corpus across restarts, handle larger workloads, or meet availability requirements, choose a store that fits its retrieval method and operational constraints. Haystack’s document-store guide groups integrations into vector databases, search engines, relational databases, document or NoSQL databases, in-memory key-value stores, vector index libraries, and multi-model databases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

When evaluating an integration, consider:

  • Retrieval support: whether you need dense semantic, BM25/full-text, keyword, or hybrid search.
  • Deployment and operations: an in-process library, a service you manage, or a hosted service.
  • Workload: corpus size, expected query volume, and availability needs.
  • Features: metadata filtering, asynchronous support, and other database capabilities your application requires.
  • Integration maturity: Haystack distinguishes core integrations maintained by its team and tested against every release from external community integrations outside that release cycle.
  • Cost and data handling: check current terms and requirements with the individual provider; the documentation cited here does not establish prices or provider data policies.

Haystack documentation gives Chroma, FAISS, OpenSearch, PGVector, Pinecone, Qdrant, Weaviate, Azure AI Search, and MongoDB Atlas as integration examples. They are options to assess, not an exhaustive list or an endorsement. The right store depends on the search behavior and deployment you need, not on the fact that a tutorial used an in-memory store.

Add semantic retrieval when it solves a real problem

A semantic pipeline needs embeddings as well as a store and retriever that can use them. Haystack’s pipeline guide demonstrates a semantic-search path using SentenceTransformersTextEmbedder and InMemoryEmbeddingRetriever. The same guide notes that Sentence Transformers embedders moved to the separate sentence-transformers-haystack package, so do not assume every integration is included in haystack-ai.

Before adopting dense or hybrid retrieval, identify where lexical retrieval misses useful passages—for example, questions that use different wording from the source. Then evaluate a representative set of questions with your documents. Embedding choice, language coverage, computation, and store support all affect the design; the documentation does not prescribe one embedding model or infrastructure for every project.

What to validate before treating the demo as an application

A successful tutorial run confirms that the components connect and return output; it does not establish that the system reliably finds the right evidence or answers correctly. For an application, assess retrieval and generation against representative questions and source documents. Check whether the retrieved passages support the answer, whether relevant material is being missed, and how the pipeline behaves under your actual latency, scale, and data-handling constraints.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Haystack supplies the framework for composing and running the workflow. You remain responsible for selecting an appropriate corpus, retrieval approach, model, store, and evaluation criteria.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.