Text Generation
Continue a passage, one word at a time
What this capability means
Given a passage as context, the model writes what comes next. Both input and output are text and no particular transformation is targeted: it can continue a story, finish an explanation or draft an email. It differs from conversation in that no instruction format is required, and from summarisation or translation in that neither compression nor a language switch is the goal — both ends stay in the same modality.
How it is done
The dominant route is an autoregressive Transformer language model: text is split into tokens, the model predicts the probability of the next token position by position, and training maximises likelihood over the corpus. GPT, Llama and Qwen all follow it, differing in scale, data and post-training recipe. At inference, temperature, top-k and top-p shape diversity, while long outputs reuse cached keys and values to cut cost.
Representative products
27DeepSeek
DeepSeek-R1
A reasoning model trained with RL on chains of thought, its weights open under the MIT licence
Organizations involved
Typical uses
- First drafts and rewriting
- Drafting email, documents and copy
- Code comments and API docs
- Test data and synthetic corpora
How it is evaluated
- Perplexity
- Predictive uncertainty on held-out text; lower is better
- Human-preference Elo
- Preference ranking from pairwise comparison
- ROUGE/BLEU on constrained tasks
- Reference overlap when an answer key exists
Limits and hard parts
- Fluency is not truth: the model states wrong facts with confidence — hallucination
- Over long outputs, earlier setup drifts and the text contradicts itself
- Poor sampling settings can trap the model in repetitive or degenerate loops
Concepts behind it
NLP & Large Language Models
Transformer ArchitectureIntermediate
Replacing word-by-word relay with a room where everyone speaks at once, so long-range dependencies are one hop away
NLP & Large Language Models
Pretraining & Fine-tuningIntermediate
Learn language first from vast unlabelled text, then specialise with little data — the most data-efficient paradigm in modern AI
NLP & Large Language Models
Prompting & AlignmentExpert
Making a model helpful, honest and harmless is harder than simply making it bigger