Guide
How does an AI answer get made?
Follow a question through context, text generation, and optional search. Learn what each step can miss.
Making Sense of AI · Part 4 of 8
Updated · 3 min read
https://greglum.com/learn/how-ai-answers-work
Give an assistant a notice and ask for an invitation. Before judging the invitation, it helps to know what information the assistant had to work with. Here is a fictional notice for this lesson:
The neighborhood book swap is November 14, from 10 a.m. to noon at the community hall. Bring up to 5 books. Entry is free. Children must attend with an adult. The notice does not say whether refreshments will be available.
Then you ask: "Write a short summary for a neighbor."
Your request is a prompt. The notice and other information available for this answer form part of its context. That can include conversation messages, product instructions, and material supplied by tools. What is included depends on the system.
A large language model, or LLM, is trained to work with language. Training develops patterns in its internal numerical settings from examples. Further training can shape how it follows instructions and responds.
When the model answers your question, it uses those learned patterns together with the information available now. Supplying the event notice gives it material to work from. It does not immediately retrain the underlying model or make the notice known to every other user.
Separate questions concern whether the service stores your conversation or later uses it to improve models. Those depend on product policies and settings. The privacy and actions guide explains those distinctions.
A language model processes text as tokens. A token can be a word, part of a word, or another unit of text. For a simple picture of generation, imagine the model repeatedly producing a next piece based on the material available and what it has generated so far.
3Blue1Brown's short LLM explanation gives a visual introduction to this process. It simplifies some details to build intuition. A whole assistant product can also use search, calculations, and other operations around the model.
The process can produce useful explanations and drafts, along with details that sound plausible and have no support. The sentences arrive without a record of where every fact came from. Fluency makes them pleasant to read; checking makes them usable.
An assistant may use a search tool to find information, then use that information in its response. Finding material is often called retrieval. Generating an answer and retrieving a source are different steps.
For the book swap, the notice supports the time, place, and book limit. It does not tell us whether refreshments are available. More confident wording cannot fill that gap. Another source might help, or the organizer might need to answer.
The ChatGPT capabilities overview shows how one assistant combines language models with tools. Do not assume every product has those tools or uses them for every question.
Imagine the assistant searches for a newer event notice before writing its answer. Put these steps in order: generate a reply, receive your question, retrieve the notice, make the retrieved text available to the model.
Your question comes first. The search retrieves a notice, the system includes its text in the context, and the model generates a reply. A product can repeat these steps, and some replies use no search at all.
Now suppose the search finds last year's notice. Which step needs attention?
The retrieval found the wrong source. Better wording cannot make last year's event details current. Check the notice's date before checking whether the summary matches it. The answer-checking guide carries that check through a complete example.