# How to Choose the Right AI Model

{% embed url="<https://youtu.be/fTq0GFGL-vk>" %}

Choosing the right AI model in MindStudio is essential to balancing cost, performance, and quality. This guide walks through the key considerations and demonstrates how to use the **Profiler** tool to compare models directly.

## Key Evaluation Criteria

When selecting an AI model, consider the following factors:

### 1. Price

* Each model has a different cost per token for input (prompt) and output (response).
* Token cost is measured per **million tokens (MTOK)**.
* Tokens roughly equate to words (1 token ≈ 0.75 words).

Cheaper models are suitable for automations and utility tasks. More expensive models often yield better reasoning and generation quality, ideal for final outputs.

### 2. Latency

* Latency refers to how long the model takes to generate a response.
* Lower-latency models are preferable for interactive or real-time use cases.

### 3. Output Quality

* Evaluate the coherence, tone, and style of responses.
* Some models produce more creative outputs, while others are better for concise summaries or factual tasks.
* Quality is best assessed by comparing outputs in the **Profiler**.

### 4. Context Window

* Determines how much information the model can ingest at once.
* Ranges from 4,000 tokens to over 1,000,000 tokens depending on the model.
* Larger windows are useful for document summarization, legal analysis, or full-site scraping.

Examples:

* GPT-4 Mini: 128K tokens
* Claude 3.5 Haiku: 200K tokens
* Gemini 2.0 Flash: 1M tokens

### 5. Max Response Size

* Controls how long the model’s output can be.
* Some models are capped at 4,000 tokens while others can produce 8,000–16,000 tokens or more.
* Useful when generating long-form articles, reports, or stories.

## Using the Profiler to Compare Models

MindStudio’s **Profiler** tool lets you test models side by side:

1. Open the **Model Settings** tab.
2. Click the **Profiler** button in the top-right corner.
3. Select two or more models for comparison.
4. Standardize settings like temperature and max tokens.
5. Input your prompt (e.g., “Write a long-form blog post about space”).
6. Observe:
   * Start and finish times
   * Output length and style
   * Token usage and cost

Example Comparison:

* **Claude 3.5 Haiku**: More expensive, shorter output, faster start.
* **GPT-4 Mini**: Slightly cheaper, longer and more detailed output.
* **Gemini 2.0 Flash**: Fastest response, low cost, huge context window.

## Workflow Integration

You can open any **Generate Text** block inside your AI agent and run its prompt through the Profiler to preview output differences across models without altering your workflow.

## Summary

To select the best model:

* Use **cheaper models** for fast, repetitive tasks.
* Choose **more capable models** for final outputs, reasoning-heavy, or creative tasks.
* Evaluate models across:
  * Cost per token
  * Latency
  * Quality of response
  * Context capacity
  * Output size
* Use the **Profiler tool** to directly test and compare models in real time.

Choosing the right model ensures your AI agents are both effective and efficient—tailored precisely to your needs.


---

# Agent Instructions: 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:

```
GET https://university.mindstudio.ai/1-core-building-principles/how-to-choose-the-right-ai-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
