---
title: "LLM text generation"
description: "Turning a probability distribution into actual text: greedy decoding is deterministic but dull and error-compounding; temperature reshapes the distribution"
canonical_url: "https://fanout.sh/ai-engineering/lessons/llm-text-generation"
md_url: "https://fanout.sh/ai-engineering/lessons/llm-text-generation.md"
access: "public"
---

# LLM text generation

Turning a probability distribution into actual text: greedy decoding is deterministic but dull and error-compounding; temperature reshapes the distribution

## Public overview

Turning a probability distribution into actual text: greedy decoding is deterministic but dull and error-compounding; temperature reshapes the distribution; top-k and top-p (nucleus) sampling cut the tail. These sampling knobs are the cheapest quality lever you own in production.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
