The dials that change the prompt without changing the words
The same prompt at temperature 0 and temperature 1 is, effectively, two different prompts. The sampler is part of the contract — yet most prompt-engineering content ignores it.
What each knob actually does
- Temperature — scales the logits before sampling. Low = deterministic, narrow. High = exploratory, surprising. Not a confidence dial.
- Top-P (nucleus sampling) — restricts sampling to the smallest set of tokens whose cumulative probability ≥ p. Tames extreme temperatures.
- Top-K — older cousin of top-p. Less common in 2026 frontier APIs.
- Seeds — some providers expose seeds for reproducibility (best-effort, not bit-exact).
- Stop sequences — strings the sampler stops at. Useful for fenced outputs.
Practical settings
Default to temperature 0 (or 0.2) for tasks with a right answer (extraction, classification, JSON output). Use 0.7–1.0 for creative or generative tasks where variety matters. Almost never go above 1.2; you usually want top-p around 0.9 instead.
The thinking-budget knob
On reasoning models (Claude extended thinking, OpenAI o-series, Gemini thinking), thinking budget is a fourth dimension. We cover it in Track 4.
[contract] 아래 후보 중 "내부 투자검토 메모에 가장 적합한 후보" 하나를 선택하라.
후보:
선택 기준:
출력 contract:
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
이런식으로 점점 복잡하게 했는데도 결과값은 temperature=0.0 | average_score=10.00/10 | perfect=5/5 temperature=0.7 | average_score=10.00/10 | perfect=5/5 temperature=1.2 | average_score=10.00/10 | perfect=5/5 이처럼 전부 만족을 하네요. 아마도 제가 temperature별로 명확한 답을 얻을 수 있는 문제를 선택해서, 문제의 변별력이 떨어졌나봐요