Interview Q&A / AI & Generative AI

BeginnerQuick answer1 min readUpdated 3 Oct 2026

Which sampling settings would you use for JSON extraction versus brainstorming taglines?

SHORT ANSWER

For JSON extraction use low temperature, near zero, so output is stable and format errors are rare. For brainstorming use a higher temperature, with perhaps a moderate top-p, so the model offers varied options. Always validate structured output.

Explain it simply

Picking between two jobs is like choosing between an accountant and a copywriter. The accountant should give the same number every time. The copywriter should surprise you.

For extraction of fields from an invoice, you want the most likely, most literal output. Set temperature at or near zero. A random synonym for a field name would break your parser.

For taglines for a college fest poster, you want range. A higher temperature, such as 0.8 to 1.0 on a typical scale, lets less common words in. You can ask for ten options in one call, or run several calls, and pick the best.

Settings reduce risk but do not remove it. For JSON, still parse and validate against a schema, and retry on failure.

Example

text
Job A: pull {"name", "amount", "date"} from a receipt -> temperature 0
Job B: "10 punchy taglines for Tech Fest 2026"        -> temperature around 0.9

What to say in the interview

"Deterministic tasks get low temperature; creative tasks get higher temperature, maybe with top-p to trim junk. I never rely on settings alone for structure: I validate the JSON and retry or repair if it fails."

#temperature#sampling#structured-output

Related questions

Practise more AI & Generative AI questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open AI & Generative AI quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.