> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Selection Guide

> Choose the right AI model for your task to balance quality, speed, and cost

Selecting the appropriate AI model is crucial for optimizing workflow performance and cost. This guide helps you choose the right model based on task complexity, latency requirements, and budget constraints.

## Model Comparison Overview

| Model Tier | Example Models | Speed | Quality | Cost | Best For |
| - | - | - | - | - | - |
| **Fast** | GPT-3.5 Turbo, Claude Haiku | ⚡️⚡️⚡️ | ⭐️⭐️ | 💰 | Simple tasks, high volume, quick responses |
| **Balanced** | GPT-4o-mini, Claude Sonnet | ⚡️⚡️ | ⭐️⭐️⭐️⭐️ | 💰💰 | General purpose, most workflows |
| **Quality** | GPT-4, Claude Opus | ⚡️ | ⭐️⭐️⭐️⭐️⭐️ | 💰💰💰 | Complex reasoning, critical accuracy |
| **Specialist** | GPT-4 Vision, Whisper | ⚡️⚡️ | ⭐️⭐️⭐️⭐️ | 💰💰 | Multimodal tasks (images, audio) |

## Available Models

### OpenAI Models

**GPT-4 Turbo** (gpt-4-turbo)

* **Strengths**: Latest GPT-4, large context window (128K tokens), strong reasoning
* **Use Cases**: Complex analysis, long documents, advanced reasoning
* **Speed**: Moderate
* **Cost**: High

**GPT-4** (gpt-4)

* **Strengths**: Most capable OpenAI model, excellent reasoning, reliable
* **Use Cases**: Critical decisions, complex problems, high-stakes outputs
* **Speed**: Slower
* **Cost**: Highest

**GPT-4o** (gpt-4o)

* **Strengths**: Optimized for speed, multimodal (text + images), balanced performance
* **Use Cases**: General purpose, image analysis, real-time applications
* **Speed**: Fast
* **Cost**: Moderate

**GPT-4o-mini** (gpt-4o-mini)

* **Strengths**: Cost-effective, fast, good for most tasks
* **Use Cases**: General purpose, high-volume workflows, cost-conscious applications
* **Speed**: Very Fast
* **Cost**: Low

**GPT-3.5 Turbo** (gpt-3.5-turbo)

* **Strengths**: Very fast, lowest cost, good for simple tasks
* **Use Cases**: Simple generation, classification, high-volume processing
* **Speed**: Fastest
* **Cost**: Lowest

### Anthropic Models

**Claude Opus 4.8** (claude-4.8-opus)

* **Strengths**: Highest capability, excellent reasoning, nuanced understanding
* **Use Cases**: Complex analysis, creative writing, detailed explanations
* **Speed**: Slower
* **Cost**: Highest

**Claude Sonnet 4.6** (claude-4.6-sonnet)

* **Strengths**: Best balance of speed and intelligence, excellent for most tasks
* **Use Cases**: General purpose, workflows requiring both speed and quality
* **Speed**: Fast
* **Cost**: Moderate

**Claude Haiku 4.5** (claude-4.5-haiku)

* **Strengths**: Fastest Claude model, cost-effective, reliable
* **Use Cases**: Simple tasks, high-volume processing, quick responses
* **Speed**: Fastest
* **Cost**: Lowest

### Specialized Models

**GPT-4 Vision** (gpt-4-vision-preview)

* **Strengths**: Understands images, extract text from screenshots, analyze diagrams
* **Use Cases**: Image analysis, OCR, visual content understanding
* **Speed**: Moderate
* **Cost**: Moderate-High

**Whisper** (whisper-1)

* **Strengths**: Speech-to-text, multilingual, accurate transcription
* **Use Cases**: Transcribe audio, voice notes, meeting recordings
* **Speed**: Fast
* **Cost**: Low (per minute of audio)

## Selection Decision Tree

### Question 1: Does your task involve images or audio?

**Yes → Use Specialist Models**

* **Images**: GPT-4 Vision, GPT-4o (has vision), Claude Sonnet 3.5 (has vision)
* **Audio**: Whisper
* **Both**: GPT-4o (multimodal)

**No → Continue to Question 2**

### Question 2: How complex is the reasoning required?

**Simple** (Classification, extraction, simple generation):

* Use **Fast Models**: GPT-3.5 Turbo, Claude Haiku, GPT-4o-mini

**Moderate** (Analysis, summarization, most workflows):

* Use **Balanced Models**: GPT-4o-mini, Claude Sonnet 3.5, GPT-4o

**Complex** (Multi-step reasoning, critical decisions, creative tasks):

* Use **Quality Models**: GPT-4, Claude Opus, GPT-4 Turbo

### Question 3: What are your latency requirements?

**Real-time** (\<1 second response needed):

* GPT-3.5 Turbo, Claude Haiku

**Interactive** (1-3 seconds acceptable):

* GPT-4o-mini, GPT-4o, Claude Sonnet 3.5

**Batch** (no urgency, can wait):

* Any model (optimize for quality or cost)

### Question 4: What's your volume and budget?

**High Volume, Cost-Sensitive**:

* GPT-3.5 Turbo, Claude Haiku, GPT-4o-mini

**Moderate Volume, Balanced**:

* GPT-4o-mini, Claude Sonnet 3.5, GPT-4o

**Low Volume, Quality-Critical**:

* GPT-4, Claude Opus, GPT-4 Turbo

## Task-Specific Recommendations

### Text Classification

**Task**: Categorize emails, support tickets, documents

**Recommended Models**:

1. **GPT-4o-mini** (Best choice)
2. GPT-3.5 Turbo (Cheaper)
3. Claude Haiku (Alternative)

**Why**: Simple task, fast inference, high volume typical

**Example**:

```
Classify Email:
  Model: GPT-4o-mini
  Prompt: "Classify this email as: Urgent, Normal, or Low Priority"
  Temperature: 0.3 (deterministic)
```

### Data Extraction

**Task**: Extract invoice details, resume parsing, form processing

**Recommended Models**:

1. **GPT-4o-mini** (Best choice)
2. Claude Sonnet 3.5 (More accurate)
3. GPT-4o (With images)

**Why**: Structured output benefits from reliable models, moderate complexity

**Example**:

```
Extract Invoice Data:
  Model: GPT-4o-mini
  Use: Structured Output node
  Schema: {invoice_number, date, vendor, amount, items}
  Temperature: 0.0 (deterministic)
```

### Content Generation

**Task**: Write emails, social media posts, product descriptions

**Simple Content**:

* GPT-3.5 Turbo, GPT-4o-mini

**Quality Content**:

* Claude Sonnet 3.5, GPT-4o

**Creative Content**:

* Claude Opus, GPT-4

**Example**:

```
Generate Product Description:
  Model: Claude Sonnet 3.5
  Temperature: 0.7 (creative)
  Style: "Professional, engaging, highlights benefits"
```

### Summarization

**Short Summaries** (tweets, headlines):

* GPT-3.5 Turbo, GPT-4o-mini

**Standard Summaries** (paragraphs):

* GPT-4o-mini, Claude Sonnet 3.5

**Long Document Summaries** (reports, articles):

* GPT-4 Turbo (128K context), Claude Opus

**Example**:

```
Summarize Article:
  Model: GPT-4o-mini (articles &lt;20K tokens)
  Model: GPT-4 Turbo (long articles >20K tokens)
  Temperature: 0.3
```

### Question Answering

**Simple FAQ**:

* GPT-3.5 Turbo, GPT-4o-mini

**Knowledge Base Search**:

* Claude Sonnet 3.5, GPT-4o

**Complex Analysis**:

* GPT-4, Claude Opus

**Example**:

```
Answer Customer Question:
  Knowledge Base Search (retrieves context)
    ↓
  AI Answer:
    Model: Claude Sonnet 3.5
    Context: ((kb_results))
    Temperature: 0.2
```

### Code Generation

**Simple Scripts**:

* GPT-4o-mini, Claude Sonnet 3.5

**Complex Programs**:

* GPT-4, Claude Opus

**Code Review**:

* GPT-4, Claude Sonnet 3.5

**Example**:

```
Generate Python Script:
  Model: GPT-4o-mini (simple scripts)
  Model: Claude Opus (complex logic)
  Temperature: 0.5
```

### Translation

**Simple Translation**:

* GPT-3.5 Turbo, GPT-4o-mini

**Nuanced Translation**:

* GPT-4, Claude Opus

**Example**:

```
Translate Text:
  Model: GPT-4o-mini
  Prompt: "Translate to French, maintain tone and formality"
  Temperature: 0.3
```

### Sentiment Analysis

**Recommended Models**:

1. **GPT-4o-mini** (Best choice)
2. GPT-3.5 Turbo (Cheaper)
3. Claude Haiku (Alternative)

**Example**:

```
Analyze Sentiment:
  Model: GPT-4o-mini
  Output: [Positive, Neutral, Negative]
  Temperature: 0.2
```

### Image Analysis

**Recommended Models**:

1. **GPT-4o** (Best balance)
2. GPT-4 Vision (Higher quality)
3. Claude Sonnet 3.5 (With vision)

**Example**:

```
Analyze Product Image:
  Model: GPT-4o
  Prompt: "Describe this product. Identify brand, condition, notable features."
```

### Audio Transcription

**Recommended Model**: **Whisper** (only option)

**Example**:

```
Transcribe Meeting:
  Model: Whisper
  Language: English (auto-detect available)
  Output: transcript text
```

## Model Parameters

### Temperature

Controls randomness/creativity:

**Temperature: 0.0-0.3** (Deterministic)

* Use for: Classification, extraction, factual Q\&A
* Result: Consistent, predictable outputs

**Temperature: 0.5-0.7** (Balanced)

* Use for: General content generation, summaries
* Result: Natural, varied, but reliable

**Temperature: 0.8-1.0** (Creative)

* Use for: Creative writing, brainstorming, unique content
* Result: Diverse, creative, less predictable

**Examples**:

```
Data Extraction: temperature = 0.0
Email Response: temperature = 0.6
Creative Writing: temperature = 0.9
```

### Max Tokens

Limits output length:

**Short Outputs** (50-200 tokens):

* Classifications, short summaries, single-sentence responses

**Medium Outputs** (200-1000 tokens):

* Paragraphs, emails, standard summaries

**Long Outputs** (1000-4000 tokens):

* Articles, detailed reports, comprehensive analyses

**Recommendation**: Set max\_tokens slightly higher than expected to avoid truncation.

### Top P (Nucleus Sampling)

Alternative to temperature (rarely adjusted):

**Top P: 1.0** (Default)

* Use temperature instead

**Top P: 0.9**

* Slightly more focused than temperature
* Use for balanced creativity

**Recommendation**: Stick with temperature for most cases.

## Cost Optimization Strategies

### Strategy 1: Model Cascading

Use cheap models first, upgrade if needed:

```
Try GPT-3.5 Turbo (fast, cheap)
    ↓
Evaluate confidence or quality
    ↓
Conditional: confidence < 0.7
    └─ True → Retry with GPT-4 (expensive, accurate)
```

**Example**:

```
Classify Document:
  Model: GPT-4o-mini
  Output: category, confidence
    ↓
Conditional: confidence < 0.8
    └─ True → Reclassify with GPT-4
        ↓
        Model: GPT-4
        Output: final_category (high confidence)
```

### Strategy 2: Batch Processing

Process multiple items in single request:

**Instead of**:

```
For each email (1000 emails):
    Classify email → 1000 API calls
```

**Use**:

```
Batch 10 emails per request:
    Classify batch → 100 API calls (10x cheaper)
```

### Strategy 3: Caching

Cache results for repeated inputs:

```
Check Cache: question hash
    ↓
Conditional: cache hit
    ├─ True → Return cached answer (free)
    └─ False → Call LLM, cache result
```

### Strategy 4: Prompt Optimization

Reduce input tokens:

**Bad** (wasteful):

```
Prompt: "I want you to please take a look at the following email and tell me if you think it's spam or not spam. Here is the email: ..."
Input Tokens: 30+
```

**Good** (efficient):

```
Prompt: "Classify as spam or not spam:\n\n((email))"
Input Tokens: 8
```

### Strategy 5: Right-Size Model

Don't use GPT-4 for simple tasks:

**Overpowered**:

```
GPT-4 for "Extract email from text"
Cost: $0.30 per 1000 inputs
```

**Right-Sized**:

```
GPT-4o-mini for "Extract email from text"
Cost: $0.015 per 1000 inputs (20x cheaper)
```

## Performance Optimization

### Latency Optimization

**Use Faster Models**:

* GPT-3.5 Turbo: \~500ms response
* GPT-4o-mini: \~800ms response
* GPT-4: \~2-4s response

**Parallel Processing**:

```
List of 100 items
    ↓
Automatic Iteration (parallel):
    Process 10 items concurrently
    Result: 10x faster than sequential
```

**Reduce Input Size**:

```
Long Document (50K tokens)
    ↓
Summarize First (1K tokens)
    ↓
Analyze Summary (faster)
```

### Quality Optimization

**Use Higher-Tier Models**:

* Upgrade GPT-3.5 → GPT-4o-mini
* Upgrade GPT-4o-mini → GPT-4

**Increase Context**:

```
Provide More Context:
  - Relevant examples
  - Clear instructions
  - Domain knowledge
```

**Structured Output**:

```
Use Structured Output Node:
  - Forces valid JSON
  - Reduces errors
  - More reliable extraction
```

## Testing Different Models

### A/B Testing Pattern

Compare models on same task:

```
Split Traffic: 50/50
    ↓
Branch A: GPT-4o-mini
    Process with Model A
    Log: model="gpt-4o-mini", quality, latency, cost
    ↓
Branch B: Claude Sonnet 3.5
    Process with Model B
    Log: model="claude-sonnet", quality, latency, cost
    ↓
Merge Results
    ↓
Analyze:
    - Quality comparison
    - Speed comparison
    - Cost comparison
```

### Evaluation Workflow

Test models on sample data:

```
Load Test Dataset (100 examples)
    ↓
For Each Model:
    Process all examples
    ↓
    Evaluate Results:
        - Accuracy
        - Average latency
        - Total cost
        - Error rate
    ↓
Compare Models:
    Model A: 94% accurate, 800ms avg, $0.50 total
    Model B: 96% accurate, 1.2s avg, $2.00 total
    ↓
Decision: Choose Model A (good enough, 4x cheaper)
```

## Model-Specific Tips

### OpenAI Models

**GPT-4 Turbo**:

* Use for long context (>8K tokens input)
* Best for complex multi-step reasoning
* Enable JSON mode for structured output

**GPT-4o**:

* Use for multimodal (text + images)
* Faster than GPT-4, almost same quality
* Good for real-time applications

**GPT-3.5 Turbo**:

* Use for simple, high-volume tasks
* Set temperature=0 for consistency
* Great for classification, simple extraction

### Anthropic Models

**Claude Opus**:

* Best for nuanced understanding
* Excellent for creative tasks
* Strong reasoning capabilities

**Claude Sonnet 3.5**:

* Best all-around model
* Fast enough for interactive use
* High quality at reasonable cost

**Claude Haiku**:

* Fastest Anthropic model
* Good for simple tasks
* Cost-effective for high volume

## Common Pitfalls

### Pitfall 1: Using GPT-4 for Everything

**Problem**: Overspending on simple tasks

**Solution**: Start with GPT-4o-mini, upgrade only if needed

### Pitfall 2: Temperature Too High for Extraction

**Problem**: Inconsistent structured outputs

**Solution**: Use temperature=0 for deterministic tasks

### Pitfall 3: Wrong Model for Images

**Problem**: Using text-only model for image analysis

**Solution**: Use GPT-4o, GPT-4 Vision, or Claude Sonnet 3.5 (with vision)

### Pitfall 4: Not Testing Alternatives

**Problem**: Missing better/cheaper options

**Solution**: Test multiple models on your specific use case

## Best Practices

**Start Cheap**: Begin with GPT-4o-mini or Claude Haiku, upgrade if needed

**Measure Performance**: Track quality, latency, and cost metrics

**Right Model for Task**: Match model capability to task complexity

**Use Structured Output**: For extraction tasks, use Structured Output nodes

**Set Temperature Appropriately**: 0 for deterministic, 0.7 for creative

**Test on Real Data**: Evaluate models on your actual use cases

**Monitor Costs**: Check model cost per workflow in the flow's Analytics tab.

**Optimize Prompts**: Reduce unnecessary tokens in prompts

**Cache When Possible**: Cache repeated queries

**Update Regularly**: New models released frequently, reevaluate choices

***

Choosing the right model balances quality, speed, and cost to optimize your workflows. Start with balanced models and adjust based on results.

> **[Text Generation](https://docs.noxus.ai/building/ai/text-generation)**
>
> Generate text with AI models

> **[Structured Outputs](https://docs.noxus.ai/building/ai/structured-outputs)**
>
> Extract structured data reliably

> **[AI Operations](https://docs.noxus.ai/platform/billing/how-billing-works.md#what-counts-as-an-ai-operation)**
>
> Understand AI Operations billing

> **[Vision & Multimodal](https://docs.noxus.ai/building/ai/vision-multimodal)**
>
> Work with images and multimodal AI


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.