Paramètres de génération LLM
Generation parameters are the knobs that shape WHAT a model outputs once the prompt is fixed, not what you ask but how it produces it. Five of them show up everywhere. "max-tokens": the length ceiling of the answer, it drives cost and latency directly. "temperature": how strongly the model follows the highest probabilities, low gives predictable and repeatable, high gives varied and creative. "top-p" (nucleus): instead of tuning boldness, it cuts the tail of unlikely tokens and keeps only the plausible core. "repetition penalty": reduces words and phrasings that loop back. "stop-sequence": halts generation the moment a chosen word or symbol appears.
Strengths
- Five universal settings, present in every model API, once understood they transfer everywhere
- The max-tokens + temperature duo covers almost every real case, no need to master all five to be effective
- Direct lever on reproducibility: temperature at 0 makes an output stable, essential in eval and in prod
Limitations
- Tuning temperature and top-p together makes you chase an effect without knowing which one causes it, a source of wasted hours
- temperature at 0 is not guaranteed determinism: some models keep a residual variance, don't trust it blindly
Best for
- Devs integrating a model API and seeing cut or unstable answers without understanding why
- PMs and POs writing AI feature specs who need to know which setting makes an output reliable or creative