Skip to content

Reference

Inference Parameters Guide

What temperature, seed, max tokens, and the other inference parameters do, and why getting them right is the difference between a benchmark and a lottery.


What each parameter controls

Leaving any field blank sends no value to the provider, which then applies its own default. Provider defaults vary, so if you need reproducible results, set values explicitly rather than relying on placeholders.

ParameterPlaceholderWhat it controlsTier
Temperature0.7Output randomness. Higher = more variation. Lower = more deterministic.All
Max tokens1000Maximum output length. Caps cost and affects completeness scores.All
Seede.g. 42Fixes the random state for near-identical outputs on repeated runs.Pro
Top-p1.0Nucleus sampling threshold. Rarely needs changing.Pro
Frequency penalty0.0Discourages repetition of tokens already in the output.Pro
Presence penalty0.0Discourages returning to topics already covered.Pro
Prompt cachingtoggleCaches repeated prompt prefixes to reduce cost. Anthropic only, auto-enabled by OpenAI and Grok.All

Temperature

Temperature controls how much randomness the model introduces when selecting each output token. At high values the model explores a wider range of possible continuations. At low values it converges on the most probable one.

We ran GPT-4.1 Nano on a support ticket summarisation task: five runs at temperature 0.7 with no seed, then five runs at temperature 0.1 with seed 42. The rubric required three exact bullets: what the customer wants, the cause (“not stated” if absent), the next step (“not specified” if absent). The Accuracy criterion required no inference beyond what the ticket explicitly says.

Ticket

Hi, I’m a Pro subscriber and my scheduled daily benchmark stopped running three days ago. I set it up two weeks ago and it was working fine. I haven’t changed anything on my end. I need this fixed urgently or I’d like a refund for the days it hasn’t been running.

GPT-4.1 Nano · score per run · support ticket summarisation

The lower-temperature run scored worse. At temperature 0.1 with seed 42, Nano locked into the same output on 4 of 5 runs:

GPT-4.1 Nano 50
  • The customer wants the scheduled daily benchmark to be fixed and to resume running.
  • not stated
  • not specified

The first bullet infers “to resume running,” a reasonable reading, but one the rubric penalises. It also drops the refund option the customer explicitly stated. At temperature 0.7, output variation meant Nano usually landed on a more literal restatement:

GPT-4.1 Nano 100
  • The customer wants the scheduled daily benchmark to be fixed or a refund for the days it hasn’t been running.
  • not stated
  • not specified

The diagnostic named the cause on every failing run: the prompt does not constrain the first bullet’s content, so the model fills the gap with an inference. Low temperature locked that inference in. High temperature introduced enough variation that Nano occasionally produced a passing restatement.

Insight: Low temperature removes variation. If the model’s default behaviour on your task is wrong, locking it in makes things worse. The fix here is the prompt, but you would not have found the gap without locking the parameters first.

When to use high temperature: Creative tasks, diversity testing, or when you want to see the range of outputs a model can produce. Treat the spread across multiple runs as the result, not any single run.

When to use low temperature: Summarisation, classification, extraction, compliance scoring. Any task where consistent, comparable results matter. Run a few passes first to confirm the model’s default behaviour on your task is what you want locked in. For compliance benchmarks specifically, parameter discipline is what makes a score auditable. See the Compliance Store Guide for the full workflow.


Seed

A seed fixes the random state the model uses to generate output. Combined with low temperature, it produces near-identical outputs on repeated runs of the same prompt.

Warning: Seed alone is not enough. Seed is most effective at low temperature. At high temperature, output variation can override the seed’s effect.

Pick any integer and use it consistently across all runs in a benchmark. The specific value does not matter. Consistency does. If you change the seed between runs, you are running a different experiment.

Tier gate: Seed is a Pro feature. On Starter, the field is visible but disabled.

Provider support: Not all providers support seed. When set for a provider that does not support it, the value is ignored.

Run your first benchmark with locked parameters

Set your parameters once. Every run after that is a measurement, not a guess.

Run your first benchmark

Max tokens

Max tokens caps the length of the model’s output. Every provider charges per output token, so the cap directly controls cost. It also affects scores: a response cut mid-sentence fails completeness criteria not because the model got it wrong, but because you stopped it before it finished.

When to set it deliberately:

  • Cost control: if your task has a predictable output length, cap it. A three-bullet summarisation task doesn’t need 1000 tokens of headroom. Set it to roughly 2x your expected output length.
  • Enforcing conciseness: a tight cap forces the model to be brief. If your rubric rewards brevity, the cap is part of the spec.
  • Detecting verbose models: a model that uses far more tokens than the task requires is a signal. A cap surfaces that.
  • Matching production: if your production system caps output at 200 tokens, your benchmark should too. A benchmark with no cap doesn’t predict production behaviour.

Using the same ticket and rubric as the temperature section, we ran GPT-4.1 Nano at max tokens 100 (sufficient headroom) and max tokens 10 (forced truncation), both at temperature 0.7 with no seed.

GPT-4.1 Nano · score per run · max tokens 100 vs max tokens 10

At max tokens 10, every run scored zero. The response was cut mid-sentence before the model could produce a single complete bullet:

GPT-4.1 Nano 0
The customer wants the daily benchmark to be

The diagnostic named the cause immediately:

Diagnostic finding

Severity: high | Source: parameters

max_tokens=10 prevents generation of the three required bullets and exact phrases.

Raise max_tokens to 50 or higher.

No rubric adjustment, no prompt change. The fix is a single parameter. This is the diagnostic layer doing its job: it reads the parameter settings alongside the output and tells you which layer caused the failure.

Warning: If completeness scores are unexpectedly low, check max tokens before adjusting your rubric or prompt. Open the result detail drawer and check the finish_reason field. A value of length confirms the output was cut at the token limit.

Reasoning models: Reasoning models (Claude, o-series) consume tokens on internal chain-of-thought before producing visible output. If max tokens is set too low, the response pane shows: “Reasoning model consumed full token budget – no visible response. Increase max_tokens.” Set a higher cap than you would for a standard model on the same task.

Leaving the field blank uses the provider’s default, which varies.


Top-p, frequency penalty, presence penalty

These are secondary levers. Most benchmarks do not need to touch them.

Top-p (placeholder 1.0) controls nucleus sampling. The model only considers tokens whose cumulative probability reaches the top-p threshold. At 1.0 all tokens are considered. Lowering it narrows the model’s vocabulary. Leave it at 1.0 unless you have a specific reason to constrain token selection. Changing it without understanding the effect on your task is more likely to introduce unexpected behaviour than improve results.

Frequency penalty (placeholder 0.0) discourages the model from repeating tokens that have already appeared in the output. Useful for long-form generation tasks where repetition is a quality problem. For short structured outputs it has no meaningful effect.

Presence penalty (placeholder 0.0) discourages the model from returning to topics already covered. Similar use case to frequency penalty.

Tier gate: All three are Pro features. On Starter, the fields are visible but disabled.


Prompt caching

When enabled, repeated prompt prefixes are cached at the provider level. If your benchmark uses a fixed system prompt across many prompts, caching means the provider does not re-process that prefix on every call. This reduces cost and latency.

Insight: A 500-token system prompt across 50 benchmark runs is 25,000 tokens of repeated processing per benchmark execution. Caching reduces repeated processing costs on supported providers.

Provider behaviour varies:

  • OpenAI and Grok: Prompt caching is enabled automatically by the provider regardless of this setting. The toggle has no effect on these providers.
  • Anthropic: Caching is opt-in. The toggle controls whether caching is requested for Anthropic calls. Enable it when running benchmarks with a long fixed system prompt against Claude models.
  • Other providers: Caching support varies. Check provider documentation.

The cost shown in results is always the actual provider-reported cost per call. There is no before/after comparison surface in the dashboard.


Why this matters for benchmarks

Parameters must be set before a benchmark starts and kept consistent across every run. Changing them mid-benchmark breaks comparability.

Warning: Two runs at different parameter settings are not two data points in the same experiment. They are two different experiments that happen to use the same prompt.

The practical rule: decide your parameter profile before you run anything. Apply it to every run in the benchmark. If you need to test a different profile, create a new benchmark.

If your production system runs at temperature 0.3 with a 500-token cap, your benchmark should use the same settings. A benchmark run at temperature 0.7 with no cap does not predict production behaviour for a capped system.


The compliance case for low temperature and seed

Warning: LLM Prover measures consistency with the documents you upload. It does not provide regulatory certification, legal advice, or a compliance audit. Scores are evidence to support your compliance process, not a substitute for it.

For compliance benchmarks, parameter discipline is not optional. A compliance score produced at default temperature is not a compliance score. It is a sample. Run it again and you may get a different number. You cannot show a sample to an auditor.

The temperature section above shows exactly how this plays out: low temperature locks in the model’s default behaviour, high temperature introduces variation. For a summarisation task, that variation occasionally helps. For a compliance task, you need the opposite. You need to know that the score you got is the score you will get next time. Low temperature plus a fixed seed is what makes that true.

Insight: If you need to show a compliance benchmark result to a stakeholder or auditor, run it at temperature 0.1 or lower with a fixed seed. Anything else is not a result you can stand behind.

What’s next