Model Types and Parameters

Compare general-purpose, reasoning, and multimodal models, understand temperature, top-p, and output limits, and choose models for your tasks.

🎯 Introduction

Suppose you are building AI customer support. Some requests only require classifying feedback as positive or negative. Others involve a complex dispute or understanding a product photo.

You can try LLMs for all these tasks, but they may call for different models and settings.

This article answers two questions: How do you choose a model for a task? Which settings influence how that model generates responses?


🧱 Common Model Types

First, consider what the model needs to do.

TaskCapability to considerWhy
Summarize customer feedbackGeneral language capabilitiesPrimarily understanding and organizing text
Analyze a complex support disputeReasoningRequires combining conditions and analyzing them step by step
Understand a product photoImage understandingInput includes images as well as text

These priorities lead to three common terms:

  • General-purpose language models: suitable for everyday questions, summarization, rewriting, translation, and routine coding assistance.
  • Reasoning models: typically optimized for complex analysis, such as combining conditions or solving difficult logic and coding problems. They are not necessarily faster or cheaper for every simple task.
  • Multimodal models: handle one or more other kinds of information alongside text, such as images or audio. Check each model's capabilities to learn which inputs and outputs it supports.

These are overlapping categories. A single model may handle everyday questions, offer strong reasoning, and understand images.

Ask which capabilities your task requires, rather than starting with the model's category label.


🧱 Is a Larger Model Always Better?

When discussing training and inference, we introduced internal parameters.

These are the many numerical values used in model computation. Training adjusts them to help the model learn patterns; during everyday use, the model uses them to generate answers.

A model with seven billion parameters contains roughly seven billion computational values. It does not store seven billion answers or expose seven billion settings for you to adjust.

More parameters may offer greater potential, but parameter count alone does not determine results. Training methods, task characteristics, and actual evaluations also matter.

For example:

  • For high-volume review classification into positive, negative, and neutral, a fast, inexpensive model that meets accuracy requirements may be appropriate.
  • For complex code errors, a model that performs better on similar coding tasks may be needed.

Suitability for the task matters more than having the most parameters.

Next, we introduce a different kind of parameter: generation parameters developers may set when calling a model, rather than internal values learned in training.


🧰 Three Common Generation Parameters

Models repeatedly predict the next token and select from candidates.

How do they choose among candidates, and how long may a response be? Generation parameters address these questions.

Temperature: Influencing Randomness

Suppose the model is completing “This weekend, let's go to…” and considers continuations related to a park, a mall, or the beach.

Lower temperature generally favors high-probability candidates more strongly. Higher temperature may give lower-probability candidates a greater chance.

The percentages in this diagram are hypothetical teaching examples, not actual model predictions.

Temperature: how candidate probabilities change

These example distributions use the same prompt with different settings. Whole words stand in for the tokens a model actually processes.

Lower temperature

Park85%
Mall12%
Beach3%

Higher temperature

Park50%
Mall30%
Beach20%
Top-p = 0.9: keep candidates by cumulative probability

Add candidates from most to least likely until the total first reaches or exceeds 90%.

A
50%
Cumulative: 50%
Kept
B
30%
Cumulative: 80%
Kept
C
15%
Cumulative: 95%
Kept
D
5%
Cumulative: 100%
Excluded

A and B add up to 80%. Adding C brings the total to 95%, so A, B, and C are kept.

All probabilities are illustrative. Support and implementation details for temperature and top-p vary by model.

Compare the two temperature columns: the park dominates more at the lower setting, while alternatives have more opportunity at the higher one.

Higher temperature does not make answers smarter. For fixed formats and stable results, start testing with a lower setting. For copy that explores different expressions, try a higher setting.

Note: Low temperature guarantees neither correctness nor identical wording across runs.

Top-P: Controlling the Candidate Set

Temperature primarily changes the probability distribution. Top-p narrows the selection pool using cumulative probability.

Suppose four candidate tokens are sorted from highest to lowest probability:

CandidateProbabilityCumulative probability
A50%50%
B30%80%
C15%95%
D5%100%

Cumulative probability adds probabilities from the top down: the first two total 50% + 30% = 80%.

With top-p = 0.9, selection typically retains the smallest candidate set whose cumulative probability reaches or exceeds 90%. Here, A, B, and C remain; D is excluded. Selection then occurs among the retained candidates.

The top-p section in the diagram distinguishes retained and excluded candidates.

Keep in mind:

  • top-p = 0.9 does not mean a 90% chance of a correct answer.
  • It does not retain only individual tokens with probabilities above 90%.
  • Both temperature and top-p affect variety. When learning, understand each first rather than making large adjustments to both at once.

Max Output Tokens: Limiting Response Length

If you request an entire article but set a small output limit, the model may stop after the introduction.

Max output tokens limits how many tokens a response may generate. It is a ceiling, not a target the model always reaches.

Distinguish it from the previous article's context window:

  • Context window: limits the total content capacity for a request.
  • Max output tokens: limits the length generated in this response.

Both limits must be satisfied. A model may have additional input and output limits.

Remembering the Three Settings

ParameterMain effectSimple interpretation
TemperatureCandidate probability distributionHow strongly high-probability content is favored
Top-pCandidate selection poolWhich candidates remain available
Max output tokensResponse length ceilingHow many tokens may be generated

Supported settings and ranges differ by model. Some reasoning models do not allow temperature or top-p adjustments.

If support responses must contain fixed fields, lowering temperature alone cannot guarantee the format. Use structured output capabilities supported by the model or API, and validate results in your program. Implementation comes later in the AI SDK course.


💡 Choosing a Model for a Task

Apply these ideas to a review analysis feature that classifies many daily reviews as positive, negative, or neutral.

Follow this sequence:

  1. Check the input: it is text only, so image and audio capabilities need not be a priority.
  2. Assess difficulty: this is a relatively well-defined classification task; start by testing faster, less expensive models.
  3. Consider business needs: high request volume makes speed and cost relevant alongside accuracy.
  4. Evaluate real reviews: prepare reviews with known labels, test several candidate models, and compare actual results.

For complex code debugging, emphasize finding the cause and providing reliable explanations rather than speed alone.

If users upload product photos and ask what they show, select a model supporting image input.

Model selection balances task requirements, quality, speed, and cost. The strongest model is not automatically the best fit.

After choosing a model that supports temperature and top-p, use real cases to decide whether adjustments help. In development, also consult the provider's current capability descriptions and API documentation.


❓ Knowledge Check

Q1: Does temperature 0 guarantee identical output every time?

No. Lower temperature often improves consistency, but implementation and server environment factors can still introduce differences. It cannot replace deterministic program rules.

Q2: Can reasoning models handle ordinary conversation?

Yes. But if a lighter model meets a simple task's needs, a more complex one may not be more economical.

Q3: Does top-p 0.9 mean the model is 90% confident its answer is correct?

No. It controls cumulative probability for candidate tokens, which is different from factual accuracy.


🧪 Exercise

Suppose you are building:

  • Feature A: classify many daily product reviews as positive, negative, or neutral.
  • Feature B: answer product questions using uploaded photos and text descriptions.

Answer:

  1. Which two business metrics deserve the most attention for A, and why?
  2. Why does B require considering multimodal capabilities?
  3. For candidate probabilities of 60%, 25%, 10%, and 5%, how many candidates are typically retained with top-p = 0.8?
  4. If responses frequently stop midway, which length setting should you check? What other limits matter?

Success criteria: For A, consider classification accuracy, then speed and cost in light of request volume. B requires image input. The first two candidates remain in question 3, totaling 85%. For question 4, check max output tokens along with the context window and any separate model output limit.


🎉 Congratulations! You understand common model capabilities, internal parameters versus generation parameters, and choosing a model for a real task. Next, we will explore embeddings.