Why does a chatbot give different answers to the same question?

A chatbot gives different answers to the same question because it generates each reply by choosing among likely next words, and that choice usually includes some randomness. It is not retrieving one stored answer.

Picture a fictional 30-person architecture practice, Fairline Architects. A partner asks the office manager, Rowan, to explain three things before the practice adopts an AI assistant. Rowan's notes read: 'asked it twice about permitted development rules, got two different answers'; 'it gave a reference to a planning guidance document number that doesn't exist'; 'the image tool made a lovely sketch of the new studio but the windows don't line up'. The partner wants to know whether the tool is broken. It is not. It is doing exactly what it was built to do.

How is a generative AI model trained?

A large language model is first trained on a huge collection of text to predict the next piece of text, then further trained to follow instructions and give helpful answers. Anthropic's glossary describes pretraining as training on a large unlabelled corpus to predict the next word given the previous context, followed by fine-tuning and reinforcement learning from human feedback, where people rank example answers and the model learns to prefer the better ones.

The model does not keep a copy of every document. It adjusts billions of internal numbers until its predictions match the patterns in the data. What it ends up with is closer to a very detailed sense of how language and ideas usually fit together than to a searchable library.

What are tokens, and how does the model predict them?

Tokens are the small units a model reads and writes, often a word or part of a word, and the model writes by repeatedly predicting a likely next token. Google's machine learning course describes a language model as estimating the probability of a token or sequence of tokens occurring within a longer sequence, and notes that roughly 400 tokens equal about 300 English words.

For each step, the model scores many possible next tokens. The application then picks one, sometimes the most likely, often one sampled from the likely options. A setting called temperature controls how adventurous that choice is: higher values give more varied wording, lower values give more predictable wording. Anthropic notes that even at the lowest temperature, results are not fully deterministic. That is the answer to Rowan's first note.

How do AI image generators work?

Many AI image generators use a method called diffusion: the model learns to remove noise from images, then creates a new image by starting from random noise and refining it step by step, guided by your text description. Hugging Face's diffusion course describes training by adding noise in different amounts and teaching the model to repair it, and generation as gradually refining random noise until an image emerges.

Because the model is shaping plausible pixels rather than following an architect's drawing, details such as window alignment, text on signs or the number of fingers can come out wrong. That is Rowan's third note.

What does this mean for how you use the tools?

It means you should give the tool the facts you want it to work from, rather than relying on its memory. Weak prompt: 'What are the permitted development rules for a rear extension?' The answer is fluent, varies between attempts and may mix rules from different years or countries, and it may include a plausible but invented document reference, which explains Rowan's second note.

Improved prompt: Rowan pastes the relevant section from the official planning guidance and asks: 'Using only the text below, summarise the size limits for a single-storey rear extension in a table. If something is not covered in the text, say not covered.' Now the model's job is to restate and organise text it can see, which it does well, and Rowan can check every line against the source.

What are the limits of generative AI?

The main limits are that generative AI can state false things confidently, has a knowledge cut-off unless connected to search or documents, can work only with what fits in its context window, and can reflect bias in its training data. None of these are bugs to be fixed by asking more politely; they follow from how the models work.

Check facts, numbers, names and references against a source you trust, and give the tool source material whenever accuracy matters.

Where does this lesson fit in the Tosheo.ai catalogue?

How generative AI works sits in the AI Foundations category. It is an early lesson in AI for beginners and the opening lesson in the generative AI course. On Tosheo.ai, the hands-on task asks you to predict and then test how a tool behaves when you change temperature-like settings or supply source text, and the rubric feedback checks that your explanation would make sense to a colleague.

Sources and scope

Google for Developers, Machine Learning Crash Course, introduction to large language models and tokens (checked 19 October 2026) ↗

Anthropic Claude documentation, glossary: pretraining, RLHF, temperature and tokens (checked 19 October 2026) ↗

Hugging Face Diffusion Models Course, unit 1 introduction to diffusion (checked 19 October 2026) ↗

Ho, Jain and Abbeel, Denoising Diffusion Probabilistic Models, arXiv 2020 (checked 19 October 2026) ↗