Haystack
NLP framework for building search and QA systems.
Quick Start
from haystack import Pipeline
from haystack.components.retrievers import InMemoryBM25Retriever
from haystack_integrations.components.generators import OpenAIGenerator
pipeline = Pipeline()
pipeline.add_component("retriever", InMemoryBM25Retriever(top_k=3))
pipeline.add_component("llm", OpenAIGenerator())
pipeline.connect("retriever.documents", "llm.documents")
result = pipeline.run({"retriever": {"query": "What is Haystack?"}})
When to Use
- Document retrieval; QA over custom data; Hybrid search; NLP pipelines
Validation
- Pipeline compiles; 2. Retrieval returns relevant docs; 3. LLM generates context-based answers