Overview
Generate AI-powered answers to questions using your uploaded data as context. Moorcheh supports nine AI models for intelligent answer generation—the same catalog as the Answer API.The Answer API supports two modes: Search Mode (with namespace) and Direct AI Mode (empty namespace for direct model calls). Available models include Claude Sonnet 4.6, Claude Opus 4.6, Llama 4 Maverick, Amazon Nova Pro, DeepSeek, Qwen, and others—see the table below and the API reference for full details.
Supported AI Models
Basic Usage
Search Mode vs Direct AI Mode
- Search Mode
- Direct AI Mode
Search Mode (with namespace)
When you provide a namespace, the API searches your data for relevant context and uses it to generate contextual answers.- Q&A over your documents
- Knowledge base queries
- Context-aware responses
Advanced Parameters
Temperature Control
Control response creativity (0.0 - 2.0):Custom Prompts
Add custom instructions for the AI:Chat History
Maintain conversation context:Response Format
Successful responses match the Answer API, including themodel field (the model ID used for the reply):
Model Selection Guide
General Purpose
Claude Sonnet 4.6 — Fast flagship for coding, tools, long docs, and RAG
Advanced Reasoning
Claude Opus 4.6 — Deepest reasoning when quality matters most
Long Context
Llama 4 Maverick — Long context, summarization, and function calling
Code & Logic
DeepSeek R1 — Step-by-step reasoning, math, and technical explanations
Best Practices
Choose the right model
Choose the right model
- Use Claude Sonnet 4.6 for general RAG, tools, and long documents
- Use DeepSeek R1 for math, logic, and step-by-step technical explanations
- Use Llama 4 Maverick for very long context and summarization
Optimize top_k
Optimize top_k
- Use 3-5 documents for focused answers
- Use 8-10 documents for comprehensive responses
- Higher values may include irrelevant context
Set appropriate temperature
Set appropriate temperature
- 0.1-0.3 for factual, deterministic answers
- 0.7 for balanced responses (default)
- 0.9-1.0 for creative content generation
Use custom prompts wisely
Use custom prompts wisely
- Add role context in
header_prompt - Specify output format requirements
- Keep prompts concise and clear
Next Steps
Search API
Learn about semantic search
Upload Data
Add documents to your namespace
API Reference
Complete AI generation API docs
Examples
See real-world examples