> 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/haystack.md).

# Haystack AI फ़्रेमवर्क

Clore.ai पर deepset द्वारा Haystack डिप्लॉय करें — प्रोडक्शन RAG पाइपलाइन, सेमांटिक सर्च, और LLM एजेंट वर्कफ़्लो किफ़ायती GPU इंफ़्रास्ट्रक्चर पर बनाएँ।

Haystack, deepset का ओपन-सोर्स AI orchestration framework है, जो प्रोडक्शन-ग्रेड LLM applications बनाने के लिए है। GitHub पर 18K+ stars के साथ, यह एक लचीला **pipeline-आधारित आर्किटेक्चर** जो document stores, retrievers, readers, generators, और agents को एक साथ जोड़ता है — सब कुछ साफ़, composable Python में। चाहे आपको निजी दस्तावेज़ों पर RAG चाहिए, semantic search, या multi-step agent workflows, Haystack plumbing संभाल लेता है ताकि आप application logic पर ध्यान दे सकें.

Clore.ai पर, जब आपको Hugging Face Transformers या sentence-transformers के ज़रिए स्थानीय मॉडल inference के लिए GPU चाहिए, तब Haystack सबसे अच्छा काम करता है। यदि आप पूरी तरह बाहरी APIs (OpenAI, Anthropic) पर निर्भर हैं, तो आप इसे केवल-CPU instances पर चला सकते हैं — लेकिन embedding generation और local LLMs के लिए, GPU latency को बहुत कम कर देता है.

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

{% hint style="info" %}
यह मार्गदर्शिका कवर करती है **Haystack v2.x** (`haystack-ai` पैकेज). v2 API, v1 (`farm-haystack`). यदि आपके पास मौजूदा v1 pipelines हैं, तो देखें [माइग्रेशन गाइड](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, semantic search, document QA, agent workflows                                |
| **GPU समर्थन**           | वैकल्पिक — local embeddings / local LLMs के लिए आवश्यक                            |
| **कठिनाई**               | मध्यम                                                                             |
| **API सर्विंग**          | Hayhooks (FastAPI-आधारित, REST)                                                   |
| **मुख्य इंटीग्रेशन**     | Ollama, OpenAI, Anthropic, HuggingFace, Elasticsearch, Pinecone, Weaviate, Qdrant |

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

* **RAG पाइपलाइन** — दस्तावेज़ ingest करें, embeddings बनाएं, संदर्भ पुनः प्राप्त करें, प्रश्नों के उत्तर दें
* **सिमेंटिक खोज** — keywords के बजाय अर्थ के आधार पर दस्तावेज़ खोजें
* **दस्तावेज़ प्रोसेसिंग** — PDFs, HTML, Word docs को parse करें; सामग्री को split, clean, और index करें
* **एजेंट वर्कफ़्लो** — टूल उपयोग (web search, calculators, APIs) के साथ multi-step reasoning
* **REST API सेवाएँ** — Hayhooks के माध्यम से किसी भी Haystack pipeline को endpoint के रूप में expose करें

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

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

| उपयोग-प्रकरण                                   | GPU            | VRAM  | RAM   | डिस्क  | Clore.ai मूल्य                            |
| ---------------------------------------------- | -------------- | ----- | ----- | ------ | ----------------------------------------- |
| **केवल API मोड** (OpenAI/Anthropic)            | कोई नहीं / CPU | —     | 4 GB  | 20 GB  | \~$0.01–0.05/घं                           |
| **स्थानीय embeddings** (sentence-transformers) | RTX 3060       | 8 GB  | 16 GB | 30 GB  | $0.03–0.07/घंटा                           |
| **स्थानीय embeddings + छोटा LLM** (7B)         | RTX 3090       | 24 GB | 16 GB | 50 GB  | $0.07–0.21/hr                             |
| **स्थानीय LLM** (13B–34B)                      | RTX 4090       | 24 GB | 32 GB | 80 GB  | $0.14–0.42/hr                             |
| **बड़ा स्थानीय LLM** (70B, quantized)          | A100 80GB      | 80 GB | 64 GB | 150 GB | [bare metal](https://clore.ai/bare-metal) |

{% hint style="info" %}
अधिकांश RAG उपयोग मामलों के लिए, एक **RTX 3090** $0.07–0.21/घं पर सबसे उपयुक्त है — 24 GB VRAM sentence-transformer embeddings + एक 7B–13B local LLM को एक साथ संभाल सकता है.
{% endhint %}

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

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

## त्वरित शुरुआत

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

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

* **VRAM**: embedding workloads के लिए ≥ 8 GB, local LLMs के लिए ≥ 24 GB
* **Docker**: सक्षम (अधिकांश listings पर डिफ़ॉल्ट)
* **इमेज**: `nvidia/cuda:12.8.1-devel-ubuntu22.04` या `pytorch/pytorch:2.11.0-cuda12.8-cudnn9-runtime`

सर्वर का सार्वजनिक IP और SSH पोर्ट यहाँ से नोट करें **मेरे ऑर्डर**.

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

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

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

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

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

Haystack v2 pip installation की अनुशंसा करता है। एक कस्टम Dockerfile बनाएँ:

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

cat > Dockerfile << 'EOF'
FROM nvidia/cuda:12.8.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. Hayhooks के साथ Haystack चलाएँ

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

```bash
# अपनी pipelines के लिए एक directory बनाएँ
mkdir -p /workspace/haystack-pipelines

# GPU access के साथ Hayhooks चलाएँ
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 pipeline बनाएँ

एक pipeline YAML लिखें जिसे Hayhooks endpoint के रूप में सर्व करेगा:

```bash
cat > /workspace/haystack-pipelines/rag_pipeline.yml << 'EOF'
# LLM के लिए Ollama और retrieval के लिए local embeddings का उपयोग करने वाली RAG pipeline
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 स्वतः इस pipeline को खोजता है और सर्व करता है। इसे परीक्षण करें:

```bash
# डिप्लॉय की गई pipelines की सूची देखें
curl http://localhost:1416/pipelines

# RAG pipeline को query करें
curl -X POST http://localhost:1416/rag_pipeline/run \
  -H "Content-Type: application/json" \
  -d '{"query": "Haystack क्या है?"}'
```

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

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

| वेरिएबल                      | विवरण                                  | उदाहरण                |
| ---------------------------- | -------------------------------------- | --------------------- |
| `OPENAI_API_KEY`             | GPT models के लिए OpenAI API key       | `sk-...`              |
| `ANTHROPIC_API_KEY`          | Claude के लिए Anthropic API key        | `sk-ant-...`          |
| `HF_TOKEN`                   | gated models के लिए Hugging Face token | `hf_...`              |
| `HAYSTACK_TELEMETRY_ENABLED` | उपयोग टेलीमेट्री अक्षम करें            | `false`               |
| `CUDA_VISIBLE_DEVICES`       | विशिष्ट GPU चुनें                      | `0`                   |
| `TRANSFORMERS_CACHE`         | HF models के लिए कैश पथ                | `/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
```

### दस्तावेज़ अंतर्ग्रहण पाइपलाइन

दस्तावेज़ों को ingest करने के लिए एक अलग indexing pipeline बनाएं:

```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 प्रारंभ करें
document_store = InMemoryDocumentStore()

# indexing pipeline बनाएँ
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))

# components को जोड़ें
indexing_pipeline.connect("converter", "cleaner")
indexing_pipeline.connect("cleaner", "splitter")
indexing_pipeline.connect("splitter", "embedder")
indexing_pipeline.connect("embedder", "writer")

# indexing चलाएँ
from pathlib import Path
indexing_pipeline.run({"converter": {"sources": list(Path("/data/documents").glob("*.pdf"))}})

print(f"इंडेक्स किए गए {document_store.count_documents()} दस्तावेज़ खंड")
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
```

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

प्रोडक्शन workloads के लिए, in-memory store को एक persistent vector database से बदलें:

```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 container में Qdrant integration इंस्टॉल करें
# Dockerfile में जोड़ें:  RUN pip install qdrant-haystack
# फिर InMemoryDocumentStore की जगह QdrantDocumentStore का उपयोग करें
```

## GPU त्वरण

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

### 1. Embedding जनरेशन (Sentence Transformers)

बड़े दस्तावेज़ संग्रहों को embed करने के लिए 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"डिवाइस का उपयोग: {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 बनाएँ
embedder = SentenceTransformersDocumentEmbedder(
    model="BAAI/bge-base-en-v1.5"
)
embedder.warm_up()

# Benchmark करें
docs = [Document(content=f"नमूना दस्तावेज़ {i} जिसमें कुछ पाठ सामग्री है.") for i in range(100)]

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

print(f"100 दस्तावेज़ों को {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 inference (Hugging Face Transformers)

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

```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="इस प्रश्न का उत्तर दें: {{ 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": "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 inference के लिए Ollama और orchestration के लिए Haystack चलाएँ:

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

# चरण 2: एक coding/chat model खींचें
docker exec ollama ollama pull llama3
docker exec ollama ollama pull nomic-embed-text  # Ollama के माध्यम से embeddings के लिए

# चरण 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
```

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

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

## टिप्स और सर्वोत्तम अभ्यास

### सही embedding model चुनें

| मॉडल                           | VRAM     | गति       | गुणवत्ता  | किसके लिए सर्वोत्तम   |
| ------------------------------ | -------- | --------- | --------- | --------------------- |
| `BAAI/bge-small-en-v1.5`       | \~0.5 GB | सबसे तेज़ | अच्छा     | उच्च-थ्रूपुट indexing |
| `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 | तेज़      | उत्कृष्ट  | लंबे दस्तावेज़        |

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

* **दस्तावेज़ों को समझदारी से विभाजित करें** — 200–400 शब्दों के chunks के साथ 10–15% overlap अधिकांश RAG use cases के लिए अच्छा काम करता है
* **Embeddings कैश करें** — अपने document store को डिस्क पर persist करें; दोबारा embedding करना महँगा है
* **उपयोग करें `warm_up()`** — कॉल करें `component.warm_up()` प्रोडक्शन उपयोग से पहले models को GPU memory में लोड करने के लिए
* **बैच indexing** — इष्टतम GPU utilization के लिए दस्तावेज़ों को 32–64 के बैच में प्रोसेस करें
* **मेटाडेटा से फ़िल्टर करें** — retrieval को सीमित करने के लिए Haystack के metadata filtering का उपयोग करें (उदा., तारीख, स्रोत, श्रेणी के अनुसार)

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

```bash
# Clore.ai पर spot-style pricing का उपयोग करें — कम $/hr वाले सर्वर चुनें
# विकास/परीक्षण के लिए: RTX 3060 ($0.03–0.07/hr) embedding के लिए पर्याप्त है
# प्रोडक्शन embedding के लिए: RTX 3090 ($0.07–0.21/hr) — 24 GB बड़े बैच संभाल लेता है
# local LLM + embedding के लिए: A100 40GB ([bare metal](https://clore.ai/bare-metal)) — concurrent users के लिए अतिरिक्त क्षमता

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

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

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

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

## समस्या निवारण

| समस्या                                      | संभावित कारण                             | समाधान                                                                                                         |
| ------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `ModuleNotFoundError: haystack`             | पैकेज इंस्टॉल नहीं है                    | Docker image को फिर से बनाएँ; जाँचें `pip install haystack-ai` सफल हुआ                                         |
| `CUDA out of memory`                        | एम्बेडिंग मॉडल बहुत बड़ा है              | उपयोग करें `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` एनव वेरिएबल; सुनिश्चित करें कि मॉडल gated नहीं है                                          |
| पाइपलाइन 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, एजेंट्स, खोज)
* [GitHub पर deepset-ai/haystack](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/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.
