
Common issues and solutions for RAG Wizard, API calls, and MCP connections.
This guide covers the most common issues you'll encounter while building and deploying RAG systems, with concrete fixes for each scenario.
Error: File size exceeds 50MB limit
Cause: Single file exceeds the maximum allowed size.
Fix: Split large PDFs or compress images before uploading.
# Split PDF by pages (requires qpdf)
qpdf input.pdf --pages . 1-50 -- part1.pdf
qpdf input.pdf --pages . 51-100 -- part2.pdf
# Compress images
convert input.png -quality 80 output.pngFor very large documents (100+ pages), consider uploading in sections and using the same project to keep them in one index.
Error: Unsupported file type: .xyz
Supported formats:
| Format | Extension | Max Size |
|---|---|---|
.pdf | 50MB | |
| Markdown | .md, .mdx | 10MB |
| Plain Text | .txt | 10MB |
| CSV | .csv | 25MB |
| Word | .docx | 25MB |
| PowerPoint | .pptx | 25MB |
Fix: Convert unsupported formats to one of the supported types above.
Error: Request timeout after 30s
Cause: Large file upload exceeded the default timeout.
Fix: Use the POST /rag/upload-and-process endpoint with multipart form data, which streams the upload:
curl -X POST "https://api.guidedmind.ai/rag/upload-and-process" \
-H "X-API-Key: rk_your_key_here" \
-F "file=@large_document.pdf" \
-F "project_id=proj_abc123"Symptom: Search results return scores below 0.3 for queries that should match.
Diagnosis: Use the Similarity Score Test to identify the root cause.
Common causes and fixes:
| Cause | Fix |
|---|---|
| Wrong embedding model for domain | Switch to text-embedding-3-large for technical content |
| Chunks too large | Reduce chunk_size to 250-500 |
| Chunks too small | Increase chunk_size to 500-1000 |
| Low overlap | Increase chunk_overlap to 50-150 |
| Wrong search method | Try Hybrid search for mixed content |
Checklist:
processed (not uploading or failed)threshold parameter to see more results# Test with low threshold to see all available chunks
curl -X POST "https://api.guidedmind.ai/rag/search" \
-H "X-API-Key: rk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"query": "test",
"options": {
"threshold": 0.1,
"limit": 20
}
}'Symptom: Same content appears multiple times in search results.
Cause: Overlapping chunks with high chunk_overlap value, or duplicate documents uploaded.
Fix:
chunk_overlap to 50-100| Plan | Requests/min | Requests/day |
|---|---|---|
| Free | 30 | 1,000 |
| Pro | 100 | 10,000 |
| Enterprise | Custom | Custom |
Error Response:
{
"error": "rate_limit_exceeded",
"message": "Too many requests. Retry after 30 seconds.",
"retry_after": 30
}Fix: Implement exponential backoff:
import time
import requests
def search_with_retry(query, max_retries=3):
for attempt in range(max_retries):
response = requests.post(
"https://api.guidedmind.ai/rag/search",
headers={"X-API-Key": "rk_your_key_here"},
json={"query": query}
)
if response.status_code == 429:
retry_after = response.json().get("retry_after", 30)
wait_time = retry_after * (2 ** attempt)
print(f"Rate limited. Waiting {wait_time}s...")
time.sleep(wait_time)
continue
return response.json()
raise Exception("Max retries exceeded")Error:
{
"error": "authentication_failed",
"message": "Invalid or expired API key"
}Fix:
rk_Error:
{
"error": "access_denied",
"message": "API access is not enabled for this project"
}Fix: Enable API access in Step 5 of the RAG Wizard (API Endpoints tab), or contact support to enable it for existing projects.
Each API key is scoped to a specific project. You cannot use Project A's key to access Project B's data.
# This will fail if the key belongs to a different project
curl -X POST "https://api.guidedmind.ai/rag/search" \
-H "X-API-Key: rk_wrong_project_key" \
-H "Content-Type: application/json" \
-d '{"query": "test"}'
# → 403 ForbiddenError: Failed to establish SSE connection
Checklist:
/api/v1/mcp/sse# Correct connection format
curl -N "https://api.guidedmind.ai/api/v1/mcp/sse?api_key=rk_your_key_here"
# Expected response
# event: open
# data: {"session_id": "uuid-here", "message_endpoint": "/api/v1/mcp/messages?session_id=uuid-here"}Symptom: SSE connection opens but no tool results return.
Fix: Ensure you're sending messages to the correct message_endpoint from the SSE open event:
# Step 1: Get session_id from SSE open event
# (message_endpoint from step 1)
# Step 2: Send to the correct endpoint
curl -X POST "https://api.guidedmind.ai/api/v1/mcp/messages?session_id=YOUR_SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rag_search",
"arguments": {
"query": "What is RAG?"
}
}
}'Error: {"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found"}}
Cause: Invalid method name in JSON-RPC request.
Valid methods:
| Method | Purpose |
|---|---|
tools/list | List available tools |
tools/call | Call a specific tool |
initialize | Initialize MCP session |
Symptom: Search returns chunks unrelated to the query.
Iteration steps:
Test different embedding models:
text-embedding-3-small — Fast, good for general contenttext-embedding-3-large — Best quality, use for technical/legalall-MiniLM-L6-v2 — Lightweight, good for simple queriesAdjust chunking:
Try Hybrid search: Combines dense (embedding) + sparse (BM25) for best coverage
Symptom: Search returns zero results.
Checklist:
uploading state)0.3 as starting point)# Diagnostic query with minimal filtering
curl -X POST "https://api.guidedmind.ai/rag/search" \
-H "X-API-Key: rk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"query": "anything",
"options": {
"threshold": 0.0,
"limit": 5
}
}'If you're still stuck after trying the fixes above:
When contacting support, include: your project ID, the API endpoint you're calling, a sample request payload, and the full error response. This helps us diagnose issues faster.