GENAI 102
M05 · L03
Sampling & Reasoning Effort

You Choose How It Picks

A model does not just hand you an answer — you can tune how it picks each next token. The gap between reliable output and creative output is partly the model, and partly your settings.

01 / 08
GENAI 102
M05 · L03
The Sampling Knobs

Two Kinds of Dial

At each step the model has a ranked list of possible next tokens. These settings shape which one it commits to.

  • Temperature — low keeps it focused and repeatable; high makes it varied and creative.
  • Top-p / top-k — limit the pool of candidate tokens the model is allowed to draw from.
  • Together they trade off consistency against surprise — think in directions, not magic numbers.
02 / 08
GENAI 102
M05 · L03
Match The Setting To The Job

Reliable or Creative

The right setting depends entirely on what the step is for. There is no single “best” value.

Rule of thumb
Extraction, classification, or code — you want low variance and repeatable answers. Brainstorming and drafting — you want more room to roam.
03 / 08
GENAI 102
M05 · L03
A Second Lever

Reasoning Effort

Many models can “think” more before they answer — a separate lever from sampling.

  • More effort helps hard, multi-step tasks — planning, tricky logic, careful analysis.
  • It costs more time and tokens, so it is not free.
  • For simple lookups or formatting, extra effort is usually wasted.
04 / 08
GENAI 102
M05 · L03
One Size Does Not Fit All

Settings Per Step

The same settings rarely fit every part of a pipeline. Treat each step as its own decision.

Worked example
A pipeline might use focused settings for parsing a message into fields, then looser settings for drafting a friendly reply — same app, two very different needs.
05 / 08
GENAI 102
Build It
From Concept to Capstone

Build It

How to implement: run the same prompt twice — once at a low temperature, once at a higher one — and compare the outputs. Pick the setting that fits the task, not the one that looks impressive.

  • Weekly AI Tasks tracker — parse incoming messages with LOW temperature, so the structure is consistent and checkable.
  • Personal brand site — draft prose with a bit more freedom, then tighten; but keep facts grounded regardless of temperature.
06 / 08
GENAI 102
Knowledge Check

Check what stuck

Three questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

07 / 08
GENAI 102
Summary
Recap

What you learned

Temperature and top-p / top-k trade consistency for creativity; reasoning effort buys careful thinking at the cost of time and tokens. Match every setting to the step, and keep facts grounded no matter what.

08 / 08