Skip to content
Last Dictionary

completion

nounAlso: text completion, model completion, completions API, chat completion

In plain wordsThe text an AI language model writes in response to a prompt — literally, its continuation of the text it was given.

  1. 1

    The output a language modellanguage model, n.: A system that has learned how likely different sequences of words are, so it can predict the next word in a text and, by doing that repeatedly, write text of its own. generates by continuing a promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results., token by token, until it emits an end token, reaches a stop sequencestop sequence, n.: A piece of text that tells an AI model to stop writing as soon as it produces it — for example, stopping at a blank line or just before the next question. or hits a length limit. The word reflects how autoregressiveautoregressive model, n.: A model that produces a sequence one piece at a time, each new piece depending on the pieces already produced — like writing a sentence word by word without going back. models work: even a chat reply is technically a completion of a formatted conversation. Pricing and rate limits count completion (output) tokens separately from prompt (input) tokens, and output tokens usually cost several times more because they are generated one at a time.

    The completion was cut off at 512 tokens, so raise max_tokens.

  2. 2

    APIs

    A style of model API that takes raw text and returns its continuation, as in OpenAI's original Completions endpoint (2020), as distinct from the role-structured 'chat completions' style introduced in 2023, which became the de facto industry interface, and from newer agent-oriented APIs that manage tools and conversation state.

  3. 3

    Software tools

    Suggestion of the rest of a word, line or block as a user types — autocomplete or code completion — now often produced by language models, as in GitHub CopilotGitHub Copilot, prop. n.: An AI assistant from GitHub, built into programmers' code editors, that suggests code as they type, answers questions about code and can carry out coding tasks on its own. and other coding assistants built on code generationcode generation, n.: Having an AI write computer code from a description in plain language, from finishing a single line as you type to building whole programs..

Origin

'Completion' for a model's output became standard with OpenAI's GPT-3 API (June 2020), whose core endpoint was named completions; the editor sense of completion (autocomplete) is older.

Related

See also
  • promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results.
  • next-token predictionnext-token prediction, n.: The simple task most AI chatbots were trained on: given some text, guess the next small piece of it. Repeating that guess, piece by piece, produces whole answers.
  • decodingdecoding, n.: The method a language model uses to turn its predictions into actual text — for example, always picking the most likely next word, or choosing somewhat at random among the likely ones.
  • model APImodel API, n.: A web service through which programs send requests to an AI model run by a company and receive its answers, usually paying per use instead of running the model themselves.
  • stop sequencestop sequence, n.: A piece of text that tells an AI model to stop writing as soon as it produces it — for example, stopping at a blank line or just before the next question.
  • OpenAI-compatible APIOpenAI-compatible API, n.: An AI service that accepts the same request format as OpenAI's, so software written for OpenAI's models can use other companies' or self-hosted models by changing an address and key.
Contrast with
  • promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results.

Mentioned in

promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results.