# Haystack — AI Orchestration for Search & RAG > Open-source AI orchestration framework by deepset. Build production RAG pipelines, semantic search, and agent workflows with modular components. 25K+ GitHub stars. ## Install Save as a script file and run: ## Quick Use ```bash pip install haystack-ai ``` ```python from haystack import Pipeline from haystack.components.generators import OpenAIGenerator from haystack.components.builders import PromptBuilder prompt = PromptBuilder(template="Answer: {{query}}") llm = OpenAIGenerator(model="gpt-4o") pipe = Pipeline() pipe.add_component("prompt", prompt) pipe.add_component("llm", llm) pipe.connect("prompt", "llm") result = pipe.run({"prompt": {"query": "What is RAG?"}}) print(result["llm"]["replies"][0]) ``` --- ## Intro Haystack is an open-source AI orchestration framework by deepset for building production-ready RAG pipelines, semantic search engines, and agent workflows. It uses a modular pipeline architecture where you compose components (retrievers, generators, rankers, converters) into directed graphs. Supports 30+ LLM providers and vector stores. 25,000+ GitHub stars. **Best for**: Teams building production RAG, search, or question-answering systems **Works with**: OpenAI, Anthropic, Google, Cohere, Ollama, 30+ providers --- ## Core Concepts ### Pipelines Compose components into DAGs — each component does one thing well: ```python pipe.add_component("converter", HTMLToDocument()) pipe.add_component("splitter", DocumentSplitter(split_length=200)) pipe.add_component("embedder", OpenAIDocumentEmbedder()) pipe.add_component("writer", DocumentWriter(document_store=store)) pipe.connect("converter", "splitter") pipe.connect("splitter", "embedder") pipe.connect("embedder", "writer") ``` ### Component Library 50+ built-in components: document converters, splitters, embedders, retrievers, rankers, generators, and more. ### Document Stores Pluggable storage: Elasticsearch, Qdrant, Pinecone, Weaviate, ChromaDB, pgvector, and in-memory. ### Evaluation Built-in evaluation metrics for RAG quality: faithfulness, context relevance, answer relevance. --- ### FAQ **Q: What is Haystack?** A: An open-source AI orchestration framework by deepset for building production RAG, search, and agent pipelines with modular components. 25K+ GitHub stars. **Q: How is Haystack different from LangChain?** A: Haystack uses a strict pipeline/DAG model with typed components, making it more predictable for production. LangChain is more flexible but less structured. --- ## Source & Thanks > Created by [deepset](https://github.com/deepset-ai). Licensed under Apache 2.0. > [deepset-ai/haystack](https://github.com/deepset-ai/haystack) — 25,000+ GitHub stars --- Source: https://tokrepo.com/en/workflows/761bd107-7156-4c62-b268-62a3fb9818dc Author: Script Depot