Overview
Generate AI-powered answers to questions using your uploaded data as context. Moorcheh supports 8 state-of-the-art AI models for intelligent answer generation.The Answer API supports two modes: Search Mode (with namespace) and Direct AI Mode (empty namespace for direct model calls).
Supported AI Models
| Model ID | Provider | Description |
|---|---|---|
anthropic.claude-sonnet-4-20250514-v1:0 | Anthropic | Hybrid reasoning, efficient code generation |
anthropic.claude-sonnet-4-5-20250929-v1:0 | Anthropic | Latest Claude with agentic search |
meta.llama4-maverick-17b-instruct-v1:0 | Meta | 1M token context, function calling |
meta.llama3-3-70b-instruct-v1:0 | Meta | Advanced reasoning capabilities |
amazon.nova-pro-v1:0 | Amazon | 300K context, complex reasoning |
deepseek.r1-v1:0 | DeepSeek | Advanced reasoning and code generation |
openai.gpt-oss-120b-1:0 | OpenAI | Hybrid reasoning, research |
qwen.qwen3-32b-v1:0 | Qwen | Text and code generation |
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
Model Selection Guide
General Purpose
Claude Sonnet 4 - Best balance of speed and quality
Advanced Reasoning
Claude Sonnet 4.5 - Latest model with agentic capabilities
Long Context
Llama 4 Maverick - 1M token context window
Code Generation
DeepSeek R1 - Specialized for coding tasks
Best Practices
Choose the right model
Choose the right model
- Use Claude Sonnet 4 for general queries
- Use DeepSeek R1 for code-related questions
- Use Llama 4 Maverick for very long documents
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 headerPrompt
- Specify output format requirements
- Keep prompts concise and clear