> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-hi/ai-platforms-and-agents/haystack.md).

# Haystack AI Framework

Haystack deepset का ओपन-सोर्स AI ऑर्केस्ट्रेशन फ्रेमवर्क है जो प्रोडक्शन-ग्रेड LLM एप्लिकेशन बनाने के लिए है। 18K+ GitHub स्टार्स के साथ, यह एक लचीला **पाइपलाइन-आधारित आर्किटेक्चर** है जो डॉक्यूमेंट स्टोर्स, रिट्रीवर्स, रीडर्स, जनरेटर्स और एजेंट्स को एक साथ जोड़ता है — सभी स्वच्छ, कम्पोज़ेबल Python में। चाहे आपको प्राइवेट डॉक्यूमेंट्स पर RAG चाहिए, सेमांटिक सर्च, या मल्टी-स्टेप एजेंट वर्कफ़्लो, Haystack पाइपलाइनिंग की पेचीदगियों को संभालता है ताकि आप एप्लिकेशन लॉजिक पर ध्यान दे सकें।

Clore.ai पर, Haystack तब सबसे अच्छा काम करता है जब आपको Hugging Face Transformers या sentence-transformers के माध्यम से लोकल मॉडल इन्फ़रेंस के लिए GPU चाहिए। यदि आप केवल बाहरी APIs (OpenAI, Anthropic) पर निर्भर हैं, तो आप इसे CPU-only इंस्टेंस पर चला सकते हैं — लेकिन एम्बेडिंग निर्माण और लोकल LLMs के लिए GPU विलंबता को काफी घटा देता है।

{% hint style="success" %}
सभी उदाहरण GPU सर्वरों पर चलते हैं जो कि के माध्यम से किराये पर लिए गए हैं [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace).
{% endhint %}

{% hint style="info" %}
यह गाइड शामिल करता है **Haystack v2.x** (`haystack-ai` पैकेज)। v2 API v1 से काफी अलग है (`farm-haystack`)। यदि आपकी मौजूदा v1 पाइपलाइन्स हैं, तो देखें [माइग्रेशन गाइड](https://docs.haystack.deepset.ai/docs/migration).
{% endhint %}

## अवलोकन

| संपत्ति                  | विवरण                                                                             |
| ------------------------ | --------------------------------------------------------------------------------- |
| **प्रोजेक्ट**            | [deepset-ai/haystack](https://github.com/deepset-ai/haystack)                     |
| **लाइसेंस**              | Apache 2.0                                                                        |
| **GitHub स्टार्स**       | 18K+                                                                              |
| **संस्करण**              | v2.x (`haystack-ai`)                                                              |
| **प्राथमिक उपयोग मामला** | RAG, सेमांटिक सर्च, डॉक्यूमेंट QA, एजेंट वर्कफ़्लो                                |
| **GPU समर्थन**           | वैकल्पिक — लोकल एम्बेडिंग/लोकल LLMs के लिए आवश्यक                                 |
| **कठिनाई**               | मध्यम                                                                             |
| **API सर्विंग**          | Hayhooks (FastAPI-आधारित, REST)                                                   |
| **मुख्य एकीकरण**         | Ollama, OpenAI, Anthropic, HuggingFace, Elasticsearch, Pinecone, Weaviate, Qdrant |

### आप क्या बना सकते हैं

* **RAG पाइपलाइन्स** — दस्तावेज़ इनजेस्ट करें, एम्बेडिंग बनाएँ, संदर्भ पुनःप्राप्त करें, प्रश्नों का उत्तर दें
* **सेमांटिक सर्च** — दस्तावेज़ों को अर्थ के आधार पर खोजें, कीवर्ड नहीं
* **डॉक्यूमेंट प्रसंस्करण** — PDFs, HTML, Word डॉक्स पार्स करें; सामग्री को विभाजित, साफ़ और इंडेक्स करें
* **एजेंट वर्कफ़्लो** — टूल उपयोग (वेब सर्च, कैलकुलेटर, APIs) के साथ मल्टी-स्टेप तर्क
* **REST API सर्विसेज़** — किसी भी Haystack पाइपलाइन को Hayhooks के माध्यम से एक एंडपॉइंट के रूप में एक्सपोज़ करें

## आवश्यकताएँ

### हार्डवेयर आवश्यकताएँ

| उपयोग का मामला                             | GPU                 | VRAM  | RAM   | डिस्क  | Clore.ai मूल्य    |
| ------------------------------------------ | ------------------- | ----- | ----- | ------ | ----------------- |
| **केवल API मोड** (OpenAI/Anthropic)        | कोई नहीं / केवल CPU | —     | 4 GB  | 20 GB  | \~$0.01–0.05/घंटा |
| **लोकल एम्बेडिंग** (sentence-transformers) | RTX 3060            | 8 GB  | 16 GB | 30 GB  | \~$0.10–0.15/घंटा |
| **लोकल एम्बेडिंग + छोटा LLM** (7B)         | RTX 3090            | 24 GB | 16 GB | 50 GB  | \~$0.20–0.25/घंटा |
| **लोकल LLM** (13B–34B)                     | RTX 4090            | 24 GB | 32 GB | 80 GB  | \~$0.35–0.50/घंटा |
| **बड़ा लोकल LLM** (70B, क्वांटाइज़्ड)      | A100 80GB           | 80 GB | 64 GB | 150 GB | \~$1.10–1.50/घंटा |

{% hint style="info" %}
अधिकांश RAG उपयोग मामलों के लिए, एक **RTX 3090** \~$0.20/घंटे पर \~24 GB VRAM वाला कॉन्फ़िगरेशन सर्वोत्तम स्थान है — 24 GB VRAM sentence-transformer एम्बेडिंग्स + एक 7B–13B लोकल LLM को एक साथ संभाल लेता है।
{% endhint %}

### सॉफ़्टवेयर आवश्यकताएँ

* Docker (Clore.ai सर्वरों पर प्री-इंस्टॉल्ड)
* NVIDIA ड्राइवर्स + CUDA (Clore.ai GPU सर्वरों पर प्री-इंस्टॉल्ड)
* Python 3.10+ (कंटेनर के अंदर)
* CUDA 11.8 या 12.x

## त्वरित प्रारम्भ

### 1. एक Clore.ai सर्वर किराए पर लें

में [Clore.ai मार्केटप्लेस](https://clore.ai/marketplace)FILTER के लिए:

* **VRAM**: ≥ 8 GB एम्बेडिंग वर्कलोड के लिए, ≥ 24 GB लोकल LLMs के लिए
* **Docker**: सक्षम (अधिकांश लिस्टिंग पर डिफ़ॉल्ट)
* **इमेज**: `nvidia/cuda:12.1-devel-ubuntu22.04` या `pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime`

सर्वर का पब्लिक IP और SSH पोर्ट नोट करें से **मेरे ऑर्डर**.

### 2. कनेक्ट करें और GPU सत्यापित करें

```bash
ssh root@<clore-server-ip> -p <port>

# GPU उपलब्ध है यह सत्यापित करें
nvidia-smi

# अपेक्षित आउटपुट में आपका GPU, ड्राइवर संस्करण, CUDA संस्करण दिखेगा
```

### 3. Haystack Docker इमेज बनाएं

Haystack v2 pip इंस्टॉलेशन की सिफारिश करता है। एक कस्टम Dockerfile बनाएं:

```bash
mkdir -p /workspace/haystack-app && cd /workspace/haystack-app

cat > Dockerfile << 'EOF'
FROM nvidia/cuda:12.1-devel-ubuntu22.04

# इंटरैक्टिव प्रॉम्प्ट से बचें
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1

# Python और सिस्टम निर्भरताएँ इंस्टॉल करें
RUN apt-get update && apt-get install -y \
    python3.11 \
    python3-pip \
    python3.11-dev \
    git \
    curl \
    && rm -rf /var/lib/apt/lists/*

# python3.11 को डिफ़ॉल्ट के रूप में सेट करें
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
RUN update-alternatives --install /usr/bin/python python python3.11 1

# Haystack v2 और कोर निर्भरताएँ इंस्टॉल करें
RUN pip install --no-cache-dir \
    haystack-ai \
    hayhooks \
    sentence-transformers \
    transformers \
    torch \
    accelerate \
    fastapi \
    uvicorn

# वैकल्पिक एकीकरण इंस्टॉल करें
RUN pip install --no-cache-dir \
    ollama-haystack \
    haystack-experimental

WORKDIR /app

# Hayhooks के लिए डिफ़ॉल्ट पोर्ट
EXPOSE 1416

CMD ["hayhooks", "run", "--host", "0.0.0.0", "--port", "1416"]
EOF

# इमेज बिल्ड करें
docker build -t haystack-clore:latest .
```

### 4. Haystack को Hayhooks के साथ चलाएँ

[Hayhooks](https://github.com/deepset-ai/hayhooks) किसी भी Haystack पाइपलाइन को स्वचालित रूप से REST API में बदल देता है:

```bash
# अपनी पाइपलाइन्स के लिए एक निर्देशिका बनाएं
mkdir -p /workspace/haystack-pipelines

# Hayhooks को GPU एक्सेस के साथ चलाएँ
docker run -d \
  --name haystack \
  --gpus all \
  -p 1416:1416 \
  -v /workspace/haystack-pipelines:/app/pipelines \
  -e OPENAI_API_KEY=${OPENAI_API_KEY:-""} \
  -e HF_TOKEN=${HF_TOKEN:-""} \
  haystack-clore:latest

# जांचें कि यह चल रहा है
curl http://localhost:1416/status
```

अपेक्षित प्रतिक्रिया:

```json
{"status": "ok", "pipelines": []}
```

### 5. अपनी पहली RAG पाइपलाइन बनाएँ

एक पाइपलाइन YAML लिखें जिसे Hayhooks एक एंडपॉइंट के रूप में सर्व करेगा:

```bash
cat > /workspace/haystack-pipelines/rag_pipeline.yml << 'EOF'
# Ollama को LLM के लिए और रिट्रीवल के लिए लोकल एम्बेडिंग का उपयोग करते हुए RAG पाइपलाइन
components:
  embedder:
    type: haystack.components.embedders.SentenceTransformersTextEmbedder
    init_parameters:
      model: BAAI/bge-small-en-v1.5

  retriever:
    type: haystack.components.retrievers.in_memory.InMemoryEmbeddingRetriever
    init_parameters:
      document_store:
        type: haystack_integrations.document_stores.in_memory.InMemoryDocumentStore

  prompt_builder:
    type: haystack.components.builders.PromptBuilder
    init_parameters:
      template: |
        नीचे दिए गए संदर्भ के आधार पर प्रश्न का उत्तर दें।
        संदर्भ: {% for doc in documents %}{{ doc.content }}{% endfor %}
        प्रश्न: {{ question }}

  llm:
    type: haystack_integrations.components.generators.ollama.OllamaGenerator
    init_parameters:
      model: llama3
      url: http://host.docker.internal:11434

connections:
  - sender: embedder.embedding
    receiver: retriever.query_embedding
  - sender: retriever.documents
    receiver: prompt_builder.documents
  - sender: prompt_builder.prompt
    receiver: llm.prompt

inputs:
  query:
    - embedder.text
    - prompt_builder.question

outputs:
  answer: llm.replies
EOF
```

Hayhooks स्वचालित रूप से इस पाइपलाइन का पता लगाता और सर्व करता है। इसे टेस्ट करें:

```bash
# तैनात पाइपलाइन्स की सूची बनाएं
curl http://localhost:1416/pipelines

# RAG पाइपलाइन को क्वेरी करें
curl -X POST http://localhost:1416/rag_pipeline/run \
  -H "Content-Type: application/json" \
  -d '{"query": "What is Haystack?"}'
```

## कॉन्फ़िगरेशन

### पर्यावरण चर

| वैरिएबल                      | विवरण                                 | उदाहरण                |
| ---------------------------- | ------------------------------------- | --------------------- |
| `OPENAI_API_KEY`             | GPT मॉडलों के लिए OpenAI API की       | `sk-...`              |
| `ANTHROPIC_API_KEY`          | Claude के लिए Anthropic API की        | `sk-ant-...`          |
| `HF_TOKEN`                   | गेटेड मॉडलों के लिए Hugging Face टोकन | `hf_...`              |
| `HAYSTACK_TELEMETRY_ENABLED` | उपयोग टेलीमेट्री अक्षम करें           | `false`               |
| `CUDA_VISIBLE_DEVICES`       | विशिष्ट GPU चुनें                     | `0`                   |
| `TRANSFORMERS_CACHE`         | HF मॉडलों के लिए कैश पथ               | `/workspace/hf-cache` |

### पूर्ण कॉन्फ़िगरेशन के साथ चलाएँ

```bash
docker run -d \
  --name haystack \
  --gpus '"device=0"' \
  -p 1416:1416 \
  -v /workspace/haystack-pipelines:/app/pipelines \
  -v /workspace/hf-cache:/root/.cache/huggingface \
  -e OPENAI_API_KEY="your-key-here" \
  -e HF_TOKEN="your-hf-token" \
  -e HAYSTACK_TELEMETRY_ENABLED=false \
  -e CUDA_VISIBLE_DEVICES=0 \
  --restart unless-stopped \
  haystack-clore:latest
```

### डॉक्यूमेंट इनजेस्टन पाइपलाइन

डॉक्यूमेंट्स को इनजेस्ट करने के लिए अलग इंडेक्सिंग पाइपलाइन बनाएं:

```bash
cat > /workspace/index_documents.py << 'EOF'
import haystack
from haystack import Pipeline
from haystack.components.converters import PyPDFToDocument, TextFileToDocument
from haystack.components.preprocessors import DocumentSplitter, DocumentCleaner
from haystack.components.embedders import SentenceTransformersDocumentEmbedder
from haystack.components.writers import DocumentWriter
from haystack.document_stores.in_memory import InMemoryDocumentStore

# डॉक्यूमेंट स्टोर इनिशियलाइज़ करें
document_store = InMemoryDocumentStore()

# इंडेक्सिंग पाइपलाइन बनाएं
indexing_pipeline = Pipeline()
indexing_pipeline.add_component("converter", PyPDFToDocument())
indexing_pipeline.add_component("cleaner", DocumentCleaner())
indexing_pipeline.add_component("splitter", DocumentSplitter(
    split_by="word",
    split_length=200,
    split_overlap=20
))
indexing_pipeline.add_component("embedder", SentenceTransformersDocumentEmbedder(
    model="BAAI/bge-small-en-v1.5"
))
indexing_pipeline.add_component("writer", DocumentWriter(document_store=document_store))

# कॉम्पोनेंट्स को कनेक्ट करें
indexing_pipeline.connect("converter", "cleaner")
indexing_pipeline.connect("cleaner", "splitter")
indexing_pipeline.connect("splitter", "embedder")
indexing_pipeline.connect("embedder", "writer")

# इंडेक्सिंग चलाएँ
from pathlib import Path
indexing_pipeline.run({"converter": {"sources": list(Path("/data/documents").glob("*.pdf"))}})

print(f"Indexed {document_store.count_documents()} document chunks")
EOF

docker run --rm \
  --gpus all \
  -v /workspace:/workspace \
  -v /your/documents:/data/documents \
  -v /workspace/hf-cache:/root/.cache/huggingface \
  haystack-clore:latest \
  python3 /workspace/index_documents.py
```

### वेक्टर डेटाबेस का उपयोग (प्रोडक्शन)

प्रोडक्शन वर्कलोड के लिए, इन-मेमोरी स्टोर को एक लगातार वेक्टर डेटाबेस से बदलें:

```bash
# Haystack के साथ Qdrant लॉन्च करें
docker network create haystack-net

docker run -d \
  --name qdrant \
  --network haystack-net \
  -p 6333:6333 \
  -v /workspace/qdrant-data:/qdrant/storage \
  qdrant/qdrant

# Haystack कंटेनर में Qdrant एकीकरण इंस्टॉल करें
# Dockerfile में जोड़ें: RUN pip install qdrant-haystack
# फिर InMemoryDocumentStore के बजाय QdrantDocumentStore का उपयोग करें
```

## GPU त्वरक

Haystack GPU एक्सेलेरेशन दो मुख्य परिदृश्यों में उपयोग करता है:

### 1. एम्बेडिंग जेनरेशन (Sentence Transformers)

बड़ी डॉक्यूमेंट कलेक्शन्स के एम्बेडिंग के लिए GPU अत्यंत लाभकारी है:

```bash
cat > /workspace/benchmark_embeddings.py << 'EOF'
import time
import torch
from haystack.components.embedders import SentenceTransformersDocumentEmbedder
from haystack import Document

# GPU उपलब्धता जाँचें
device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Using device: {device}")
if device == "cuda":
    print(f"GPU: {torch.cuda.get_device_name(0)}")
    print(f"VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB")

# एम्बेडर बनाएं
embedder = SentenceTransformersDocumentEmbedder(
    model="BAAI/bge-base-en-v1.5"
)
embedder.warm_up()

# बेंचमार्क
docs = [Document(content=f"Sample document {i} with some text content.") for i in range(100)]

start = time.time()
result = embedder.run(documents=docs)
elapsed = time.time() - start

print(f"Embedded 100 documents in {elapsed:.2f}s ({100/elapsed:.0f} docs/sec)")
EOF

docker run --rm --gpus all \
  -v /workspace:/workspace \
  haystack-clore:latest \
  python3 /workspace/benchmark_embeddings.py
```

### 2. लोकल LLM इन्फ़रेंस (Hugging Face Transformers)

Ollama के बिना सीधे Haystack में LLMs चलाने के लिए:

```bash
cat > /workspace/local_llm_pipeline.py << 'EOF'
from haystack import Pipeline
from haystack.components.builders import PromptBuilder
from haystack.components.generators.hugging_face import HuggingFaceLocalGenerator

# उपलब्ध होने पर GPU स्वतः उपयोग करता है
generator = HuggingFaceLocalGenerator(
    model="mistralai/Mistral-7B-Instruct-v0.2",
    task="text-generation",
    generation_kwargs={
        "max_new_tokens": 512,
        "temperature": 0.7,
        "do_sample": True,
    }
)

prompt_builder = PromptBuilder(template="Answer this question: {{ question }}")

pipeline = Pipeline()
pipeline.add_component("prompt_builder", prompt_builder)
pipeline.add_component("llm", generator)
pipeline.connect("prompt_builder.prompt", "llm.prompt")

result = pipeline.run({"prompt_builder": {"question": "What is RAG?"}})
print(result["llm"]["replies"][0])
EOF

docker run --rm --gpus all \
  -v /workspace:/workspace \
  -e HF_TOKEN="your-hf-token" \
  haystack-clore:latest \
  python3 /workspace/local_llm_pipeline.py
```

### 3. Ollama के साथ पेयर करें (सिफारिश की गई विधि)

सरलता और प्रदर्शन के सर्वोत्तम संयोजन के लिए, LLM इन्फ़रेंस के लिए Ollama और ऑर्केस्ट्रेशन के लिए Haystack चलाएँ:

```bash
# चरण 1: Ollama शुरू करें (Ollama गाइड देखें)
docker run -d \
  --name ollama \
  --gpus all \
  -p 11434:11434 \
  -v /workspace/ollama:/root/.ollama \
  ollama/ollama

# चरण 2: एक कोडिंग/चैट मॉडल पुल करें
docker exec ollama ollama pull llama3
docker exec ollama ollama pull nomic-embed-text  # Ollama के माध्यम से एम्बेडिंग के लिए

# चरण 3: Ollama की ओर इशारा करते हुए Haystack शुरू करें
docker run -d \
  --name haystack \
  --gpus '"device=0"' \
  -p 1416:1416 \
  --add-host=host.docker.internal:host-gateway \
  -v /workspace/haystack-pipelines:/app/pipelines \
  haystack-clore:latest
```

दोनों कंटेनरों में GPU उपयोग की निगरानी करें:

```bash
watch -n 2 nvidia-smi
```

## टिप्स और सर्वोत्तम प्रथाएँ

### सही एम्बेडिंग मॉडल चुनें

| मॉडल                           | VRAM     | स्पीड    | गुणवत्ता  | उत्तम हेतु              |
| ------------------------------ | -------- | -------- | --------- | ----------------------- |
| `BAAI/bge-small-en-v1.5`       | \~0.5 GB | सबसे तेज | अच्छा     | उच्च-थ्रूपुट इंडेक्सिंग |
| `BAAI/bge-base-en-v1.5`        | \~1 GB   | तेज़     | बेहतर     | सामान्य RAG             |
| `BAAI/bge-large-en-v1.5`       | \~2 GB   | मध्यम    | सर्वोत्तम | उच्चतम सटीकता           |
| `nomic-ai/nomic-embed-text-v1` | \~1.5 GB | तेज़     | उत्कृष्ट  | लंबे दस्तावेज़ों के लिए |

### पाइपलाइन डिज़ाइन सुझाव

* **डॉक्यूमेंट्स को बुद्धिमानी से विभाजित करें** — अधिकांश RAG उपयोग मामलों के लिए 200–400 शब्द के चंक्स 10–15% ओवरलैप के साथ अच्छा काम करते हैं
* **एम्बेडिंग्स को कैश करें** — अपने डॉक्यूमेंट स्टोर को डिस्क पर परस्थित रखें; फिर से एम्बेड करना महंगा है
* **उपयोग करें `warm_up()`** — कॉल करें `component.warm_up()` उत्पादन उपयोग से पहले मॉडल्स को GPU मेमोरी में लोड करने के लिए
* **बैच इंडेक्सिंग** — इष्टतम GPU उपयोग के लिए 32–64 के बैच में दस्तावेज़ों को प्रोसेस करें
* **मेटाडेटा के साथ फ़िल्टर करें** — पुनःप्राप्ति को सीमित करने के लिए Haystack के मेटाडेटा फ़िल्टरेशन का उपयोग करें (जैसे तारीख, स्रोत, श्रेणी द्वारा)

### लागत अनुकूलन

```bash
# Clore.ai पर स्पॉट-स्टाइल प्राइसिंग का उपयोग करें — कम $/घंटा वाले सर्वर चुनें
# विकास/परीक्षण के लिए: RTX 3060 (~$0.10/घंटा) एम्बेडिंग के लिए पर्याप्त है
# प्रोडक्शन एम्बेडिंग के लिए: RTX 3090 (~$0.20/घंटा) — 24 GB बड़े बैच संभालता है
# लोकल LLM + एम्बेडिंग के लिए: A100 40GB (~$0.60/घंटा) — समवर्ती उपयोगकर्ताओं के लिए हेडरूम

# संसाधन उपयोग की निगरानी करें
docker stats haystack
nvidia-smi dmon -s u -d 5  # हर 5 सेकंड में GPU उपयोग
```

### बाहरी एक्सेस के लिए Hayhooks सुरक्षित करें

```bash
# विकल्प 1: SSH टनल (सरलतम, निजी उपयोग के लिए)
# आपकी स्थानीय मशीन से:
ssh -L 1416:localhost:1416 root@<clore-ip> -p <clore-ssh-port>
# फिर लोकल रूप से http://localhost:1416 तक पहुँचें

# विकल्प 2: nginx रिवर्स प्रॉक्सी के माध्यम से बेसिक ऑथ जोड़ें
docker run -d \
  --name nginx-proxy \
  -p 80:80 \
  -v /workspace/nginx.conf:/etc/nginx/conf.d/default.conf \
  nginx:alpine
```

## समस्याओं का निवारण

| समस्या                                      | संभावित कारण                 | समाधान                                                                                                         |
| ------------------------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `ModuleNotFoundError: haystack`             | पैकेज इंस्टॉल नहीं है        | Docker इमेज को पुनर्निर्माण करें; जांचें `pip install haystack-ai` सफल हुआ                                     |
| `CUDA में आउट ऑफ मेमोरी`                    | एम्बेडिंग मॉडल बहुत बड़ा है  | उपयोग करें `bge-small-en-v1.5` या बैच साइज घटाएँ                                                               |
| Hayhooks पाइपलाइन पर 404 लौटाता है          | YAML फ़ाइल नहीं मिली         | वॉल्यूम माउंट की जाँच करें; पाइपलाइन फ़ाइल को होना चाहिए `/app/pipelines/`                                     |
| CPU पर एम्बेडिंग धीमी है                    | GPU का पता नहीं चला          | सत्यापित करें `--gpus all` फ्लैग; जाँचें `torch.cuda.is_available()`                                           |
| Ollama कनेक्शन अस्वीकार किया गया            | गलत होस्टनाम                 | उपयोग करें `--add-host=host.docker.internal:host-gateway`; URL को सेट करें `http://host.docker.internal:11434` |
| HuggingFace डाउनलोड विफल होता है            | टोकन गायब या रेट लिमिट       | सेट करें `HF_TOKEN` env var; सुनिश्चित करें मॉडल गेटेड नहीं है                                                 |
| पाइपलाइन YAML पार्स त्रुटि                  | अवैध सिंटैक्स                | YAML वैध करें; उपयोग करें `python3 -c "import yaml; yaml.safe_load(open('pipeline.yml'))"`                     |
| कंटेनर तुरंत बाहर निकलता है                 | स्टार्टअप त्रुटि             | देखें `docker logs haystack`; सुनिश्चित करें Dockerfile CMD सही है                                             |
| पोर्ट 1416 बाहरी रूप से पहुँच योग्य नहीं है | फ़ायरवॉल / पोर्ट फ़ॉरवर्डिंग | Clore.ai ऑर्डर सेटिंग्स में पोर्ट एक्सपोज़ करें; सर्वर के खुले पोर्ट्स जांचें                                  |

### डिबग कमांड्स

```bash
# कंटेनर लॉग्स जाँचें
docker logs haystack --tail 50 -f

# Hayhooks API टेस्ट करें
curl http://localhost:1416/status
curl http://localhost:1416/pipelines

# इंटरैक्टिव Python डिबग सेशन
docker exec -it haystack python3

# कंटेनर के अंदर GPU जाँचें
docker exec haystack python3 -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"

# इंस्टॉल किए गए पैकेज जाँचें
docker exec haystack pip show haystack-ai hayhooks
```

## अधिक पढ़ने के लिए

* [Haystack दस्तावेज़ीकरण](https://docs.haystack.deepset.ai/) — आधिकारिक v2 डॉक्स
* [Hayhooks GitHub](https://github.com/deepset-ai/hayhooks) — पाइपलाइन्स के लिए REST API सर्विंग
* [Haystack कुकबुक](https://haystack.deepset.ai/cookbook) — एंड-टू-एंड ट्यूटोरियल्स (RAG, एजेंट्स, सर्च)
* [deepset-ai/haystack on GitHub](https://github.com/deepset-ai/haystack) — सोर्स, इश्यूज़, रिलीज़
* [Haystack एकीकरण](https://haystack.deepset.ai/integrations) — समर्थित वेक्टर स्टोर्स, LLMs, और टूल्स की पूरी सूची
* [Clore.ai पर Ollama](/guides/guides_v2-hi/language-models/ollama.md) — लोकल LLM इन्फ़रेंस के लिए Haystack को Ollama के साथ पेयर करें
* [Clore.ai पर vLLM](/guides/guides_v2-hi/language-models/vllm.md) — Haystack के लिए उच्च-थ्रूपुट LLM सर्विंग बैकएंड
* [GPU तुलना मार्गदर्शिका](/guides/guides_v2-hi/getting-started/gpu-comparison.md) — अपने वर्कलोड के लिए सही Clore.ai GPU चुनें
* [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace) — GPU सर्वर किराए पर लें


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-hi/ai-platforms-and-agents/haystack.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
