Skip to content

Module 1: How AI Works

Module 1 of 10

Finished on this deviceNext moduleFirst unfinished module

EveryoneAbout 13 minutes

Read aloud from this page's text by an AI-generated voice, not a human narrator; the text is authoritative.

What You Will Be Able to Do

  • Explain, in one sentence each, what a large language model (LLM) is and how it produces text.
  • Explain why these systems sometimes state false things confidently, and why that is a feature of how they work rather than an occasional glitch.
  • State two practical consequences of knowledge cutoffs and context windows for your own use.
  • Describe how AI systems in medicine learn from images, genetic data, and other data besides text, and how gaps in that data can leave some patients less well served.

The Core Idea

The Two-Minute Version

2:20 · AI voice · Plays from YouTube when you press play.A narrated, animated walk through the core idea, with captions. The trial in it is made up, and so are its numbers.

A large language model, the kind of artificial intelligence (AI) behind today's chatbots, is a system trained on enormous amounts of text to do one thing: predict the next small piece of text, over and over, until an answer takes shape. Everything impressive (fluent explanations, working code, a differential diagnosis discussion) and everything that goes wrong (confident fabrication, invented citations) follows from that single mechanism. The model is not consulting a database of facts. It is producing the most plausible continuation of the conversation, and most of the time the most plausible continuation is also true. When it is not, the output looks exactly as confident. Whether an answer is right, and what to do with it, is a judgment that stays with you.

For the diagrams behind this module, read How LLMs Work, a short plain-language tour of the prediction loop, the context window, how training works, and why hallucination happens. Read it now or after the self-check; this module stands on its own. The Glossary sorts the family of terms: machine learning is how most of today's AI is built, generative AI makes new text and images, and prediction models turn data into a score or a flag.

Three consequences worth internalizing:

  1. Knowledge has a date. Models learn from training data with a cutoff. Anything after that date is invisible to the model unless it can search the web or you paste the material in. For a fast-moving field, always ask: would the answer have changed recently?
  2. Memory has a size. The context window is the model's working memory for your conversation. Very long conversations and documents can push earlier material out of focus. New conversation, fresh start.
  3. Fluency is not accuracy. The polish of the prose carries no information about its truth. Check what you rely on, with more care the more depends on it (Module 2 shows how to match the check to the stakes); the AI Responsible Use Policy requires you to verify AI-generated content before you use it in academic work, research, or clinical work.

The three consequences worth internalizing

Knowledge has a date

After the cutoff: nothing, unless it searches or you paste it in.

Memory has a size

Very long chats push earlier material out of focus.

Fluency is not accuracy

"Confident, polished, specific" tells you nothing about whether it is true.

Check it before you rely on it.

Everything impressive and everything that goes wrong with these systems follows from the same mechanism.

Beyond Text: Images, Genes, and Signals

Chatbots learn from text, but much of the AI in medicine learns from other data: medical images, genetic data, and signals such as electrocardiograms. Like chatbots, these models learn statistical patterns from large sets of examples rather than rules a person wrote. Many learn from examples labeled with the right answer: shown many thousands of retinal photographs graded by eye specialists, for instance, a model learns the patterns that go with each grade and applies them to new cases. Many clinical tools that show a score or a flag work this way: prediction models trained on records of past patients, such as the risk score in Module 9. The United States Food and Drug Administration (FDA) has authorized AI software that automatically detects more than mild diabetic retinopathy in retinal photographs of adults with diabetes who have no earlier diagnosis of diabetic retinopathy, as a screening test (FDA decision summary).

What such a model can do depends on the examples it learned from, including whose they were. Leading dermatology models did substantially worse on a set of images curated to include diverse skin tones, especially on dark skin and uncommon diseases; dermatologists, who often label the images such models learn from, also did worse on dark skin and uncommon diseases, and in that study, further training on the diverse images closed the gap between light and dark skin (Daneshjou et al., 2022).

A 2019 analysis found that polygenic risk scores, which estimate a person's risk of a disease from many genetic variants at once, were several times more accurate for people of European ancestry than for people of other ancestries, because the genetic studies they were built from had mostly included people of European descent (Martin et al., 2019). A tool built on data like these tends to work best for the patients the data represent best, which is how bias in data can carry existing inequities forward. Module 9 shows a related problem: a score built to predict the wrong thing.

The same holds for the other data medicine runs on. Risk scores learn from clinical records, study tools turn course materials into practice questions and estimate readiness from earlier students' answers (Module 4), and research tools search and summarize the published literature (Module 8). In each, a group that is scarce in the data can be served less well, as when a readiness estimate built mostly on other students' results misjudges a student unlike them. A tool that looks accurate in the people it was tested on may also be untested for the patients or learners you have in mind.

Self-Check

A colleague says their chatbot "looked up" an answer in its database and so it must be right. What is wrong with that mental model?

The model did not look anything up (unless it explicitly ran a web search). It generated the most statistically plausible continuation of the conversation from patterns learned in training. Plausible usually overlaps with true, but nothing in the mechanism guarantees it, so the answer needs verification like any unsourced claim.

You ask a model about a drug approval from last month and it confidently describes an older approval instead. Why?

The approval likely postdates the model's knowledge cutoff. The model cannot know events after its training data ends, and rather than say so it may produce the most plausible answer from what it does know. Asking the model to search the web, or pasting in the source, fixes this; trusting unaided recall for recent events does not. Even then, the model summarizes what it finds through the same prediction, so open the source when a detail matters.

When is the model's confident tone evidence that its answer is correct?

Never. Tone is a property of the text generation, not of the underlying accuracy. Treat confidence and correctness as fully independent until verified.

A skin-lesion app reports high accuracy, but nearly all of the images it was tested on showed light skin. What do you want to know before trusting it for a patient with dark skin?

How well it does on skin like your patient's, and what it is meant for. High accuracy on light skin says little about dark skin, and if dark skin was also scarce in what it learned from, it can be less accurate there, as leading dermatology models were. Without results reported for patients like yours, treat its answer as untested for this patient.

Going Deeper

Color key: LessonBenchmark

End of This Route

Back to competency I.1a

End of This Route

Back to competency IV.1a

Central Group on Educational Affairs (CGEA) competency domain: Understanding AIAssociation of American Medical Colleges (AAMC) AI competencies for learners: 4 of 26 taught or checked here

Content last reviewed September 1, 2026. Review dates are maintained as described on the About page.

Report a problem with this page