Repaso
Español

You use an LLM to extract invoice totals into JSON. Which sampling setting suits this task best?

Options

  1. A high temperature, to get creative formats
  2. A low temperature, close to 0, so the output is as consistent as possible (Correct option)
  3. Any value: temperature does not affect the output
  4. The maximum value, to avoid repeated answers

Answer

A low temperature, close to 0, so the output is as consistent as possible

Why

Extraction has one right answer, so you want the model to take its most likely choices, not to explore. A low temperature does that.

It does not guarantee valid or correct output: you still validate the result against a schema.

High temperature is for tasks where variety is useful, like brainstorming names.

Remember

Extraction: low temperature, then validate.

Key terms

Practice this question in Repaso