smartyfy.mrindigi.com

AI Foundations for Students | 003. Generative AI: Patterns, Tokens and Limits

AI Foundations for Students · Lesson 03 of 36

Module 1: Understanding AI

In this lesson

Learning goal: Explain text generation, training versus use, and why fluent output can be false.

A text generator continues patterns

Generative AI produces candidate content such as text, images or audio. In this lesson we focus on a simplified view of a language model: it uses learned patterns and the supplied context to generate a sequence of text pieces. Those pieces are often called tokens. A token is not always a whole word; depending on the system it may represent part of a word, punctuation or other text. Token boundaries differ across models and languages.

The important beginner idea is that a language model works with a representation of text, not a perfect library of verified sentences. Training adjusts many numerical values from examples. During use, those learned values help produce a response to the current input. Actual systems can add tools, retrieval or other components. We should not assume that every answer involved a web search just because it sounds current.

Why plausible text can be wrong

Take this illustrative AI-style output, written for the lesson and not obtained from a live model: “The town library opened in 1842, according to the 1842 Library Report.” It looks specific. It contains both a date and a source-shaped title. Yet neither detail has evidence in this lesson. A convincing format can make an unsupported claim harder to notice.

A model can generate incorrect claims, invented references or mixtures of correct and incorrect information. People sometimes call these errors hallucinations. That label does not explain each cause, and it should not make us treat the output as a human’s experience. The practical response is to locate the exact claim, ask what evidence would support it, and check that evidence independently. Requesting a confident tone would not improve the evidence.

Context helps but has boundaries

Context is the information available to the system for the current response. A prompt might include a task, a short passage and previous conversation. Providing the right passage can make a question more answerable, but the model may still misread it or add unsupported details. Context can also contain irrelevant or malicious instructions, a topic we examine later. Treat source material as something to analyze, not automatic authority over your task.

A model has limits on the information it can process at once. Exact limits depend on the system, so this course does not promise any particular length. In practice, use short relevant passages, state the intended source boundary and inspect the result. More text is not always better. Extra material can distract from the question, introduce contradictions or expose information that was never needed.

Uncertainty is part of a good answer

A useful answer can distinguish what the source states, what is inferred and what is unknown. Suppose a fictional notice says, “The reading room closes at 5 pm on Monday.” It supports Monday’s closing time. It does not establish Tuesday’s hours or whether entry requires a card. The honest answer to those questions is that the supplied notice does not say.

Do not confuse a model’s displayed confidence or confident wording with a measured probability of correctness. Even numerical confidence needs an explanation of how it was evaluated. For students, the safer habit is evidence-linked language: “The notice states…” or “This is a suggestion that needs checking.” You can learn these habits on paper by examining invented responses, without needing any service account or live AI output.

Worked practice

Worked exercise 1: Split a toy sequence

Task: For a paper demonstration, choose the invented token pieces “re”, “read”, “ing”, and “.”. Explain why counting words and counting tokens need not give the same result.

Worked solution: The word “rereading” could be represented by the first three invented pieces and the period by a fourth. That makes four toy tokens but one word plus punctuation. These are demonstration pieces, not a claimed tokenizer output from a real model. The exercise shows why a token should not automatically be counted as one word.

Worked exercise 2: Check a source-shaped statement

Task: An illustrative answer says a festival begins on 19 May and cites “Town Events Guide 2028.” No source pack or link is supplied. What should you record?

Worked solution: Record the start date as unverified and the citation as a reference requiring verification. A title and year do not establish that a document exists or supports the statement. Find the organizer’s actual notice if the real date matters. Do not repeat the invented citation as if you had read it.

Worked exercise 3: Respect the passage boundary

Task: The fictional notice states, “The art club meets on Friday in Room 4.” Answer: “Who leads the club?”

Worked solution: A supported response is: “The notice does not name the leader. It only gives Friday and Room 4.” Do not invent a teacher’s name or infer it from the room number. If a real answer is needed, ask the club organizer or consult an authorized current source rather than filling the gap with a plausible person.

Check your understanding

MCQ 1: Which statement about tokens is safest?

  1. Each token is exactly one word
  2. Tokens can be pieces of words or other text
  3. A token always corresponds to one letter
  4. The same sentence has the same token count in every model
Check the answer and explanation

Answer: B. Tokenization varies, and tokens are not generally identical to words.

MCQ 2: A realistic citation title proves what?

  1. The source exists
  2. The claim is correct
  3. The writer has read it
  4. Nothing about support until the source is checked
Check the answer and explanation

Answer: D. A generated title may be invented or may point to a source that says something different.

MCQ 3: What does the Monday notice establish?

  1. Monday closing time
  2. Tuesday opening time
  3. Membership rules
  4. The library’s holiday closing time
Check the answer and explanation

Answer: A. Only the stated fact is supported; the other questions need additional evidence.

MCQ 4: Does fluent wording prove live web retrieval occurred?

  1. Yes, because current-sounding language requires a search
  2. Yes, if it includes a date and source-shaped title
  3. No
  4. Yes, if the response is longer than the supplied notice
Check the answer and explanation

Answer: C. Text generation and retrieval are different operations, even when combined in some systems.

MCQ 5: What is a useful uncertainty statement?

  1. The leader is probably the teacher who uses Room 4
  2. The source does not say who leads the club
  3. The notice mentions a room, so the room’s usual teacher must lead it
  4. The answer is likely correct because it sounds specific
Check the answer and explanation

Answer: B. It identifies the exact evidence gap instead of pretending the missing answer is known.

Sources and further reading