AI Dictionary of Terms

GPT (Generative Pre-trained Transformer)

A family of large language models developed by OpenAI that uses a decoder-only transformer architecture to generate human-like text by predicting the next word in a sequence, trained on massive amounts of internet data.

The Simple Version

Imagine a highly advanced autocomplete on your phone, but instead of just finishing a word, it can finish a sentence, a paragraph, or an entire essay.

GPT works by reading the text you give it and asking, “Based on everything I’ve ever read, what word is most likely to come next?” It picks that word, adds it to the text, and then asks the question again for the next word. It does this over and over, building a coherent response one word (or token) at a time.

Detailed Explanation

GPT (Generative Pre-trained Transformer) pioneered the decoder-only transformer architecture for language modeling.

Core Principles:

  1. Autoregressive Generation: Predicts the next token $P(x_t x_1, …, x_{t-1})$ based only on previous tokens (left-to-right).
  2. Causal Attention: A masking mechanism ensures the model cannot “see” future tokens during training or generation, preventing cheating.
  3. Unsupervised Pre-training: Learns general language patterns by predicting the next word on trillions of tokens from the internet, books, and code.
  4. Instruction Fine-tuning (RLHF): Later versions (like ChatGPT) are fine-tuned on human conversations to follow instructions and be helpful.

Evolution:

Key Characteristics

Business Context

GPT models are the foundation of the generative AI boom:

Real-World Analogy

An improv actor. You give them a starting prompt (“You are a pirate who just found a map”), and they build the story line by line, reacting to what they just said, drawing on their vast knowledge of pirate tropes to keep the story going logically.

Code Example

# Text generation using OpenAI API (GPT-4)
from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="gpt-4",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum entanglement in one sentence."}
    ],
    temperature=0.7,
    max_tokens=50
)

print(response.choices[0].message.content)

Common Misconceptions

Sources & Further Reading