---
title: "How a Chatbot Picks Its Next Word"
description: "A chatbot is not looking an answer up. It reads what has been written so far, picks a likely next word, feeds that back in and does it again, from patterns taken out of a very large amount of text."
canonical: https://lightmysky.com/learn/computing/how-a-chatbot-picks-its-next-word-mt_1Zbhamhzai
source: https://lightmysky.com/learn/computing/how-a-chatbot-picks-its-next-word-mt_1Zbhamhzai.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# How a Chatbot Picks Its Next Word

A chatbot is not looking an answer up. It reads what has been written so far, picks a likely next word, feeds that back in and does it again, from patterns taken out of a very large amount of text.

Subject: Computing · Area: Artificial Intelligence · Ages 12 to 13
Page: https://lightmysky.com/learn/computing/how-a-chatbot-picks-its-next-word-mt_1Zbhamhzai

## Ready when they can

- Describe the loop of picking one word at a time and feeding it back in
- Say where the patterns came from, and that none of them is a rule a person typed in
- Explain why the same question can come back with two different answers

## Lesson: One likely word after another

A chatbot is not looking your answer up in a book. It reads what is written so far, picks a likely next word, tacks it on, and repeats the loop until the answer is done.

Its sense of likely comes from patterns in a huge pile of text. Nobody typed in rules for every question. Reading all that writing taught it which words tend to follow which.

**Example.** Ask it to finish The cat sat on the. It may pick mat, then read the longer line and pick purring next. Ask twice and you may get rug instead, because each pick leaves room for chance.

**Tip.** Likely words can still be wrong words. A chatbot can sound sure while stating a false fact, so double-check important claims in a book or a source you trust. Use it as a language helper, not an oracle.

**Recap.** Chatbots loop over likely next words learned from vast text, so answers vary and need checking.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Machine Learning Basics](https://lightmysky.com/learn/computing/machine-learning-basics-mt_K6qtan847r)
- [Deepfakes and AI-Generated Content](https://lightmysky.com/learn/computing/deepfakes-and-ai-generated-content-mt_tzMr83pS8v)

## Opens up

- [What a Trained Model Is: Weights, Not Rules](https://lightmysky.com/learn/computing/what-a-trained-model-is-weights-not-rules-mt_3_1toZUxak)
- [Why a Chatbot Can Be Confidently Wrong](https://lightmysky.com/learn/computing/why-a-chatbot-can-be-confidently-wrong-mt_TMHNkprrks)
