Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 3

GenAI Glossary for Beginners

Recommended resources

Welcome back! In our last session, we created a map of the generative AI landscape, categorizing models by the type of content they produce—their modality. You designed a "collection quest" to help your future students explore this diverse world of text, image, and code generation.

Today, we'll zoom in from that high-level map to the fundamental mechanics of how these models, particularly Large Language Models (LLMs), actually work. Our goal is to define the essential vocabulary you'll need to explain these systems: tokens, parameters, inference, and the context window. Mastering this terminology is like learning the laws of physics before trying to build an engine. For you as an educator, being able to explain these concepts in plain language is a cornerstone of teaching GenAI effectively.

Let's begin with a simplified diagram that will serve as our guide for this lesson. It shows the journey from a user's prompt to the model's response.

This diagram illustrates the core workflow of an LLM, showing the input prompt, the internal processing involving training data and parameters, the role of the context window, and the final output or response.

We will use this diagram to frame our discussion as we unpack each key term.

1. Tokens: The Building Blocks of Language

Look at the "Input (Prompt)" stage in the diagram. When you type "What is the capital of France?", the model doesn't see words or characters in the same way a human does. Instead, it breaks the text down into smaller pieces called tokens.

Simplifying Generative AI : Explaining Tokens, Parameters, Context Windows and more.

To start, let's get a simple, intuitive definition of a token.

In the video "Simplifying Generative AI," watch the segment from this section on tokens. The speaker describes them as the "building blocks of language for LLMs" and uses the helpful analogy of breaking down sentences into smaller, manageable pieces when learning a new language.

Tokens can be words, parts of words (subwords), or even single characters and punctuation. The process of converting text into tokens is called tokenization.

Anatomy of an LLM: Tokens, Weights and Parameters | Webopedia

This article from Webopedia provides a clear example of how tokenization works in practice.

Read the sections "What are LLM tokens?" and "How do AI tokens work?". Pay close attention to the example that shows how the same sentence can be tokenized differently depending on the method used (word-based vs. subword-based).

As a rule of thumb, for English text, one word is roughly equivalent to 1.3 tokens. This is why you'll often see costs for using AI models quoted "per token," as it's the fundamental unit of computation.

For someone with your computer science background, it's useful to know that there's more happening under the hood. Tokenization isn't just splitting strings; it involves a predefined "vocabulary" and a sophisticated algorithm.

How Tokenization, Inference, & LLMs Actually Work

This next video offers a more technical deep-dive into tokenization, which will be valuable for your own understanding and for answering questions from more advanced learners.

Watch the first part of "How Tokenization, Inference, & LLMs Actually Work" from the beginning to the end of the token section. The presenter discusses model vocabularies, how spaces and capitalization are handled, and the role of "special tokens" used to give the model instructions.


2. Parameters: The Model's Learned Knowledge

Now, let's turn our attention to the "LLM Processing" part of our diagram, which points to "Training Data" and "Parameters." After a model is trained on vast amounts of data, the knowledge it has "learned" is stored in its parameters.

Think of parameters as millions (or billions) of internal knobs and dials. During training, the model adjusts these dials over and over again until its predictions are as accurate as possible. After training is complete, these parameter values are fixed. They represent the collective patterns, facts, grammar, and even stylistic nuances from the training data.

Simplifying Generative AI : Explaining Tokens, Parameters, Context Windows and more.

The concept of parameters can feel abstract, so an analogy is helpful.

Watch the segment on parameters from the same "Simplifying GenAI" video. The analogy of video game settings that control the game's behavior is an excellent, non-technical way to frame this for beginners.

The number of parameters is often used as a rough measure of a model's size and potential capability. For example, GPT-3 has 175 billion parameters, while some newer models have over a trillion.

From Tokens to Context Windows: Simplifying AI Jargon - Publications

This article provides a concise and clear definition of parameters and their significance.

Read the section titled "Parameters". It highlights a crucial point: while more parameters often mean a more capable model, the quality of the training data is equally, if not more, important.

Within your M.Tech context, you'd recognize parameters as the weights and biases of the neural network. The term "parameters" encompasses all the learned variables that the model uses to make decisions. The "weights" specifically define the strength of the connections between neurons, determining how information flows through the network.


3. Inference: The Process of Generating a Response

So, the model has turned our prompt into tokens and has its parameters ready. What happens next? The actual process of generating a new sequence of tokens—the response—is called inference. This is the "LLM Processing" step in action.

Inference is not a one-shot calculation. It's an iterative loop. The model takes the input tokens, uses its parameters to calculate the probability of every possible next token in its vocabulary, and then selects one. This new token is then added to the input sequence, and the whole process repeats, one token at a time.

How Tokenization, Inference, & LLMs Actually Work

The concept of inference as a loop is fundamental. This video provides the clearest explanation of this process.

Watch the segment on inference from this section of the technical video. Focus on the step-by-step breakdown: prompt -> predict probabilities -> sample a token -> append to prompt -> repeat. This algorithmic view should resonate with your programming experience.

This probabilistic, token-by-token generation is why LLMs can sometimes seem creative and other times make strange errors. It's also why you can get a different answer to the same prompt if you run it twice. The model is sampling from a distribution of possibilities, not retrieving a fixed answer from a database.


4. Context Window: The Model's Short-Term Memory

As the inference loop runs, generating token after token, how does the model keep track of the conversation? This is where the context window comes in. As shown in our diagram, it's a key part of the process.

The context window is the maximum number of tokens the model can "see" at any one time. It includes the original prompt plus the conversation history and the response being generated so far. It's the model's short-term memory.

Simplifying Generative AI : Explaining Tokens, Parameters, Context Windows and more.

Let's get a quick analogy for the context window.

Watch the very brief explanation from the context window segment in the "Simplifying GenAI" video. The idea of a friend who can only remember the last few sentences you said is a perfect, simple metaphor.

A larger context window allows the model to handle longer documents and maintain more coherent, extended conversations. However, there are trade-offs.

From Tokens to Context Windows: Simplifying AI Jargon - Publications

This reading explores the implications and limitations of the context window.

Read the section "Context Window Limit". Note the discussion about the "lost in the middle" problem, where models can sometimes struggle to recall information from the middle of a very long context. This is a practical limitation to be aware of when designing prompts or analyzing long texts.


Your Project: The Artificer's Lexicon

As a technical trainer, you know the power of a good glossary. Let's build the first entries for the GenAI course you're designing.

Quest: "The Artificer's Lexicon, Part 1"
Objective: Create a set of clear, multi-layered explanations for the core terminology of LLMs.

For each of the four terms we covered today (Token, Parameter, Inference, Context Window), draft a glossary entry that includes:

  1. A Simple Definition: A single, clear sentence suitable for an absolute beginner.
  2. An Analogy: A memorable, non-technical comparison to help anchor the concept (feel free to use ones from this lesson or invent your own).
  3. A Technical Note for Inquisitive Learners: A sentence or two that adds a layer of technical depth for students who want to know more. This is where you can hint at concepts like subword tokenization, the scale of parameters, the iterative nature of inference, or the "lost in the middle" problem.

This quest will not only solidify your own understanding but also produce a tangible asset for your future course, perfectly aligning with your goal of learning by building.


Conclusion

Today, we've decoded the core language of LLMs. You now have a working definition for the four pillars of their operation:

  • Tokens: The fundamental building blocks of text that models process.
  • Parameters: The learned knowledge of the model, stored as numerical values.
  • Inference: The iterative, token-by-token process of generating a response.
  • Context Window: The model's short-term memory, which limits how much information it can consider at once.

With this vocabulary in hand, you're now equipped to move beyond what these models do and dig deeper into how they do it.

In our next lesson, we will build directly on this foundation to explore the Transformer architecture, the revolutionary model design that powers most modern LLMs. We'll finally get to see how tokens, parameters, and the context window come together within the "engine" of self-attention.