Welcome back! In our last lesson, we deconstructed the process of tokenization, revealing how LLMs "see" and process text. We established that everything from cost to performance is governed by these fundamental units. This understanding of tokens as the building blocks of an LLM's world provides the perfect foundation for our topic today.
Now that we know what LLMs are built on, it's time to explore what they can't do. As powerful as these models are, they are not infallible thinking machines. They have specific, predictable weaknesses. For you as an educator designing a GenAI course, understanding these is paramount. It allows you to set realistic expectations for your students, design robust learning activities, and teach them how to use these tools critically and effectively.
Today's learning outcome is to identify common LLM limitations, including hallucinations, context window constraints, and training data biases. We will examine each of these failure modes, explore their root causes, and discuss practical strategies to mitigate them.
1. The Finite Memory: Context Window Constraints
In the previous lesson, we discussed the "token budget" and the concept of a context window. Let's formalize that now. A Large Language Model's context window is its working memory. It's the maximum number of tokens—encompassing your prompt, any prior conversation history, and the model's own generated response—that it can consider at any single moment.
When a conversation exceeds this limit, the oldest information is typically discarded to make room for new tokens. The model effectively develops amnesia about the beginning of the interaction.

This simple mechanical limit has profound implications. To see it explained in a very accessible way, the following video from IBM Technology is an excellent primer.
What is a Context Window? Unlocking LLM Secrets
This video offers a clear, concise explanation of what a context window is, how it's measured in tokens, and the challenges associated with larger context windows.
Please watch the entire video. Pay attention to these key points: The initial analogy of the context window as a "working memory" using "IBUs". The explanation of how tokens relate to the context window size. The discussion of the challenges larger context windows present, including the quadratic scaling of compute requirements and the "lost in the middle" phenomenon from this point onwards.
As the video highlighted, a larger context window isn't a silver bullet. The self-attention mechanism, which we touched on in a previous lesson, has a computational complexity that scales quadratically with the sequence length (). This means doubling the context length can quadruple the processing power required.
Furthermore, research has shown a "lost in the middle" problem, where models tend to pay more attention to information at the very beginning and very end of a long context, sometimes ignoring critical details buried in the middle.
This article provides a superb overview of the key limitations of LLMs, starting with the context window.
What Large Language Models Can't Do - Cension AI
This article from Cension.ai clearly outlines the core limitations of LLMs and, importantly, provides practical workarounds for each.
Start by reading the section Why can’t LLMs process very long text?. Take note of the practical strategies listed to work around this constraint, such as chunking and summarization.
2. The Plausible Untruth: Hallucinations
Perhaps the most famous limitation of LLMs is their tendency to hallucinate. This term describes when a model generates text that is fluent, confident, and plausible-sounding, but is factually incorrect, nonsensical, or untethered from the provided context.
The root cause of hallucination lies in the fundamental nature of an LLM: it is a next-token predictor, not a fact-checker. It assembles text based on statistical patterns learned from its training data. If a factually incorrect statement is statistically likely, the model may generate it with high confidence.
.gif)
To get a clear definition and see different types of hallucinations, let's turn to another short video from IBM Technology.
Why Large Language Models Hallucinate
This video provides a clear definition of hallucinations and categorizes them, from simple contradictions to significant factual errors.
Watch the first two sections of the video, covering "what a hallucination is" and "why they happen". This will give you a solid framework for understanding the problem.
Now that we have a grasp of what hallucinations are and their basic causes, let's explore this in more detail. The following guide provides an excellent, developer-focused breakdown of why hallucinations occur and what can be done about them.
Reducing LLM Hallucinations: A Developer's Guide - Zep
This guide from Zep offers a deep dive into the mechanics of hallucinations and provides a structured overview of mitigation techniques.
First, read the section Why LLMs Hallucinate to solidify your understanding of the causes. Then, jump to the section Prompting Techniques to Reduce Hallucinations. This section is particularly valuable as it covers the most direct and accessible methods for controlling hallucinations, which will be the focus of our next lesson.
As the article mentions, while we can't eliminate hallucinations entirely, we can significantly reduce them. The techniques range from simple prompt instructions ("If you don't know the answer, say so") to more advanced methods like Retrieval-Augmented Generation (RAG) and fine-tuning, which we will cover in detail later in this course.
3. The Ingrained Worldview: Training Data Limitations
The final category of limitations stems directly from the data the model was trained on. An LLM's knowledge is not a live, updating database; it's a static snapshot of the data it was fed, with all the biases and time-capsules that implies.
Stale Knowledge
Every model has a knowledge cut-off date. It is "blind" to any events, discoveries, or information that emerged after that date. Asking a model about recent news will result in either a refusal to answer or, more dangerously, a hallucination where it attempts to extrapolate based on old patterns.
Inherent Bias
LLMs are trained on vast swathes of text from the internet, which is a reflection of human society—including its prejudices and stereotypes. Consequently, models can learn and amplify these biases. For example, if the training data predominantly associates the word "doctor" with male pronouns, the model might default to using "he/him" when generating text about doctors, reinforcing a stereotype.
The article we looked at earlier provides a concise summary of both these issues.
What Large Language Models Can't Do - Cension AI
We'll return to this article to explore the limitations that stem directly from the model's training data.
Please read the sections Why do LLMs have stale knowledge? and Why do LLMs reflect and amplify bias?. Pay attention to the mitigation strategies, as they are critical for building responsible AI applications.
Understanding these limitations is not just an academic exercise. It is the key to designing effective and responsible learning experiences. When your students understand why the AI fails, they can learn to prompt it more effectively, critically evaluate its outputs, and use it as a powerful but imperfect tool.
Your Project: "The AI Interrogation" Quest
Let's apply this knowledge to your course design. Your task is to blueprint a game-based activity where your students' mission is to "interrogate" an AI to expose its inherent limitations. This turns the model's weaknesses into a discoverable learning experience.
Challenge: "The AI Interrogation"
Objective: To design a series of prompts that reliably make an LLM demonstrate its limitations regarding its context window, knowledge cut-off, and tendency to hallucinate.
Your Task:
Create an outline for this quest, including the following components for three "mini-challenges":
-
The Amnesia Test (Context Window):
- Prompt Sequence: Describe a sequence of at least 3-4 prompts for a conversation. The first prompt should establish a key, unusual fact (e.g., "From now on, refer to me as Captain Starlight. My favorite color is chartreuse."). The following prompts should be designed to fill the context window with other text, and the final prompt should ask a question that relies on the initial fact (e.g., "What is my favorite color?").
- Expected Outcome: Describe what the "failure" looks like (e.g., "The model says it doesn't know or gives a generic answer.").
-
The Liar Detector (Hallucination):
- Prompt Design: Craft a single, clever prompt asking a question about a non-existent but plausible-sounding topic. Think of things like a fictional historical event, a fake scientific concept, or a non-existent function in a well-known programming library.
- Expected Outcome: Describe the ideal hallucinated response (e.g., "The model provides a detailed explanation of the 'Inverse Gamma-Warp' function in Python's
mathlibrary, complete with fake arguments and a plausible use case.").
-
The Time Traveler Test (Stale Knowledge):
- Prompt Design: Formulate a question about a significant event that occurred very recently (i.e., definitely after the knowledge cut-off of common models). For example, asking about the winner of a major sports championship that just concluded.
- Expected Outcome: Describe how the model might respond, either by stating its knowledge cut-off or by hallucinating an incorrect answer based on older data.
For each challenge, briefly explain the learning objective: what specific insight about LLM limitations should your students gain from successfully "breaking" the AI?
Conclusion
Today we've confronted the crucial limitations that define the boundaries of what current LLMs can do. It's essential to see these not as bugs, but as inherent properties of the technology in its current form.
Key Takeaways:
- Context Windows are Finite: An LLM's memory is limited by its token count, causing it to "forget" earlier parts of long conversations. This is a hard architectural constraint.
- Hallucinations are a Feature, Not a Bug: As probabilistic text generators, LLMs are optimized for plausibility, not truth. They will confidently invent information if it fits a learned pattern.
- Training Data is Destiny: Models are a static snapshot of their training data, making them inherently prone to having stale knowledge and reflecting societal biases.
We've now completed our foundational look at how LLMs are built, trained, and where they fail. In our next lesson, we will pivot from theory to practice and begin to master the primary tool for controlling these powerful systems. We will learn how to apply core prompting strategies: zero-shot, few-shot, and chain-of-thought prompting, turning our understanding of these limitations into a practical skillset for guiding LLMs toward more accurate and useful outputs.