PromptLab Docs
DocsCore Concepts
Back to App

Temperature & Parameters

These three settings control how an LLM generates its response. Understanding them is fundamental to prompt engineering.

Temperature

Temperature controls the randomness of the model's output. It affects how the model samples from its probability distribution at each token generation step.

  • 0.0 — Deterministic. Always picks the most likely next token. Identical input = identical output every time.
  • 0.7 — Balanced. Some variation while remaining coherent. Good general default.
  • 1.0–1.2 — Creative. Explores less likely paths. More varied, surprising responses.
  • 2.0 — Very high randomness. Outputs become incoherent at extreme values.

Temperature is not about "creativity" in the human sense — it's about sampling distribution. High temperature makes the model consider less probable word choices. Low temperature makes it stick to the most statistically likely continuations.

💡 Tip
Use 0.0 for factual questions, data extraction, classification. Use 0.7–1.2 for writing, brainstorming, creative generation.

Max tokens

Max tokens sets an upper limit on the response length. One token is roughly 0.75 words in English.

TokensApproximate length
256~190 words — short paragraph
512~380 words — half a page
1024~760 words — full page
4096~3000 words — long document

Setting max tokens too low causes the model to truncate mid-sentence. Setting it too high wastes tokens (and API cost) for tasks that need short answers. Match max tokens to your expected output length.

Model selection

PromptLab uses Groq-hosted models. Groq's inference is exceptionally fast due to their LPU hardware — you'll notice very low latency compared to standard GPU inference.

Larger models (70B parameters) are more capable but slightly slower and more expensive per token. Smaller models (7B–8B) are faster and cheaper but may struggle with complex reasoning tasks.

Quick reference

Task typeTemperatureMax tokens
Factual Q&A0.0256–512
Data extraction / classification0.0–0.2256–512
Summarization0.3–0.5512–1024
General assistant0.71024
Creative writing1.0–1.21024–4096
Brainstorming / ideation1.0–1.5512–1024