Educate · Sample learning material

AI predicts,
one token at a time.

See how text becomes small pieces, how surrounding words change their role, and why the same prompt can lead to a different response.

Start the lessonFoundational · All staff · Interactive
A sentence becomes pieces

The patient reported hypoglycemia.

Then the model considers what may come next.

The idea

Fluent language starts with a sequence of small choices.

Tools like ChatGPT can draft a summary, rewrite an email, or respond to a policy question in seconds. Fluent language can create a strong impression of understanding.

The AI model builds a response one small piece at a time. Each piece is called a token. The model considers possible next tokens, selects one based on the tool's settings, and repeats.

Step 1 · Tokens

First, your words become tokens.

A token can be a whole word, part of a word, or punctuation.

Inside the AI, each token is represented through a long list of numbers. During training, the model adjusts internal numbers and relationships as it practices predicting what comes next.

Try the mechanismSimplified teaching example

The patient reported hypoglycemia overnight.

Exact token splits vary across AI systems.

Step 2 · Context

Surrounding words change the role of a token.

The same token can play a different role in a different sentence.

The model uses surrounding words as clues. Changing the wording can change how the model uses a term and the answer you receive.

One token, two usesSimplified highlights

Billing added the charge to the account.

“Billing” and “account” support the financial use of “charge.”

Real models compare many patterns at once.

Step 3 · Prediction

Then it predicts the next token, again and again.

Several next tokens can fit the same sentence.

The model gives possible next tokens different chances. Once a token is selected, it becomes part of the text used for the next choice. A small early difference can lead to a different sentence.

Possible next tokensIllustrative percentages

A patient was admitted to the _____

hospital42%
unit28%
ICU18%
ward12%

The model considers many more options than this teaching example shows.

Step 4 · The catch

A fluent answer can still be wrong.

Likely wording and supported facts are different questions.

A high probability means the wording fits the text so far and patterns the model learned. Verification against trusted evidence is what establishes support for a generated claim.

Fictional example created for this lesson
“According to a 2021 study in the New England Journal of Medicine, the protocol reduced readmissions by 34%.”

This citation has no supporting source. Its journal, year, and statistic fit the pattern of academic writing. A convincing pattern can still carry an invented claim.

The idea in thirty seconds

Five points connect the mechanism to safe use.

  1. 01
    Text becomes tokens.

    Tokens can be words, parts of words, or punctuation.

  2. 02
    Surrounding words shape a token's role.

    The words around a token help determine how the model uses it.

  3. 03
    Possible next tokens get different chances.

    The model gives likely choices a stronger chance.

  4. 04
    The same prompt can produce different answers.

    More than one likely path may be available.

  5. 05
    Fluent answers can be false.

    Trusted sources and human review help establish whether a claim is supported.

Explain it back: How can two responses to the same prompt differ, and what establishes whether either response is accurate?

Apply the lesson

What this means for your workday.

01

Use it for first drafts

Summaries, emails, rewrites, and brainstorming can move faster with a useful starting point.

02

Verify important facts

Check names, numbers, dates, citations, dosages, and policies against a trusted source.

03

Use approved tools

Keep patient information and confidential data inside the approved, secured tools your organization provides.

04

Own the final output

You remain responsible for what you send, sign, or act on after using an AI-generated draft.

Evidence behind the lesson

Sources and further reading

The lesson stays in plain language. These references support the technical mechanics and healthcare safety context.

  1. OpenAI. tiktoken and How to count tokens with tiktoken. View source ↗
  2. Vaswani A, et al. Attention Is All You Need. 2017. View source ↗
  3. Ethayarajh K. How Contextual Are Contextualized Word Representations? 2019. View source ↗
  4. OpenAI Cookbook. Reproducible outputs with the seed parameter. View source ↗
  5. World Health Organization. Ethics and governance of artificial intelligence for health: Guidance on large multi-modal models. 2024. View source ↗

Continue with Educate

Build the shared foundation your workforce needs.

Tokens and AI is one example of how Henecorp turns AI concepts into practical healthcare learning.