Beginner · Generative AI
Completion
Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.
TL;DR. The text a language model generates in response to a prompt.
Technical Definition
The text a language model generates in response to a prompt.
How it works
Originally LLMs literally completed a partial text; chat models now produce structured responses, but the underlying mechanism is still autoregressive next-token generation. API responses include the completion plus metadata like token counts and finish reason.
Related Concepts
- Large Language Model (LLM) — A massive neural network trained on vast text corpora to understand and generate human language with remarkable fluency.
- Prompt — The input text — instructions, context, examples — given to a language model to elicit a response.
- Sampling — The process of choosing the next token from the probability distribution a model outputs.