Join our Newsletter — 33% off our NHI Course
Home› Guides› How AI Chatbots Work for Beginners: From your…
Guide AI Platforms

How AI Chatbots Work for Beginners: From your prompt to the answer, including what gets stored

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 1 December 2026 10 min read
On this page

An AI chatbot is an app that sends your message to a language model and shows its answer.

This guide is for anyone who types questions into an AI chatbot at home or at work. You do not need technical skills. It follows one message from your screen to the answer, and shows what may be kept along the way.

In short

  • The chatbot app adds hidden instructions, called a system prompt, to your message before the model sees it.
  • The model writes a reply, and the app shows it to you.
  • Your chats are often saved. Depending on the service and your settings, some may be read by reviewers or used to improve models.
  • Check the privacy settings, and do not type anything you would not want a stranger to read.

What you will learn

  • Follow a message from the chat box to the model and back.
  • Explain what a system prompt and chat memory are.
  • Find out what a chatbot service may store and for how long.
  • Choose settings that keep more of your data private.
Your message (prompt)
the question or instruction you type into the chat box.
The writing engine (model)
the AI system that reads the text and writes a reply.
Chat history
the saved record of your past conversations.

What is an AI chatbot?

Think of a restaurant. You give your order to a waiter. The waiter adds the kitchen's house rules, passes it to the chef, then brings back your meal. The restaurant may also keep a copy of your order.

A chatbot works the same way. The app is the waiter. The language model is the chef. The house rules are the system prompt, hidden instructions that steer how the model answers [3]. The saved order is your chat history.

Where the comparison stops working: a waiter cannot be talked into ignoring the house rules by a note hidden in your menu. A model can sometimes be steered by text inside a web page or file it reads [4].

If you want to know how the model itself writes text, read How Large Language Models Work. This page follows the whole trip, including what gets stored.

Why does it matter?

People paste all kinds of things into chatbots: emails, contracts, code and health questions. Knowing where that text goes helps you decide what to share.

If you use a chatbot at home

What could happen: you share private details, and a reviewer later reads that chat.

Check this: read the service's privacy page and history settings.

Next: AI and Privacy for Beginners

If you use a chatbot at work

What could happen: you paste customer data into a personal chatbot account your employer does not manage.

Check this: use only the AI tools your workplace has approved.

Next: AI Acceptable Use Policies for Beginners

If you connect a chatbot to other systems

What could happen: the access tokens that link the chatbot to your other systems are stolen and used to pull data.

Check this: list what each chatbot connection can reach, and remove what is not needed.

Next: Salesloft Drift Breach 2025 [5]

What does it look like?

Here is a made-up view of what the app might send to the model behind the scenes.

Example only. All values are made up.

System:  You are a helpful assistant for EXAMPLE Ltd.  (1)
Memory:  User likes short answers. (FAKE)              (2)
History: [last 0000 messages in this chat]             (3)
User:    Summarise this email for me: ...              (4)
Saved:   chat history ON, review possible              (5)
  1. The system prompt. You do not see it, but it shapes every answer.
  2. In a real file, this line would contain facts the chatbot has remembered about you from earlier chats.
  3. Recent messages, so the model can follow the conversation.
  4. Your prompt, including anything you pasted in.
  5. Your settings, which decide whether the chat is kept and how it may be used.

Why this is risky: anything you paste becomes part of the stored chat, along with what the chatbot remembers about you.

The safer way: remove names, numbers and private details before you paste, and check your history settings.

How does it work?

  1. You type a prompt. You might also share a file or a screen. One service lists these among the things it collects [2].
  2. The app adds context. It adds the system prompt, recent messages and, if turned on, saved memories.
  3. The model writes a reply. It works from all that text together, not just your latest message.
  4. The app shows the answer.
  5. The chat may be stored. Your settings decide whether the chat is kept in your history and whether it may help train models [1].
Diagram titled From your prompt to the answer. Five boxes in a row joined by arrows. Your prompt: what you type, plus any files. The app: adds the system prompt, history and memory. The model: writes a reply from all that text. The answer: shown to you in the chat. Storage, highlighted: chat history, possible review and training, depending on settings. Notes underneath say to check history and training settings, and not to type anything you would not want a reviewer to see.
Figure 1. Your prompt travels with hidden context to the model, and the chat may be stored afterwards.

What gets stored varies by service. Services are listed alphabetically here, as two examples. With ChatGPT, a setting called "Improve the model for everyone" decides whether your chats may be used for training. Temporary Chats are deleted within 30 days and are not used for training [1].

With Gemini Apps, a subset of chats is read by human reviewers, and reviewed chats can be kept for up to three years. Saved history is deleted after 18 months by default [2]. Google advises not to enter confidential information you would not want a reviewer to see [2].

Chatbots can also be linked to other systems. In 2025, Salesloft reported that an attacker used stolen access tokens from its Drift chat integration to take data from customers' Salesforce systems [5]. Those tokens belong to non-human identities, so they need owners and limits too.

A worked example

This story is made up to show the idea.

Hugo Vance manages a small letting agency. A tenant sends a long, angry email. Hugo copies it, including the tenant's name, address and phone number, into a free chatbot on his phone. He asks for a calm reply.

The reply is good. Later he wonders where that email went.

He opens the chatbot's settings and privacy page. He finds three things. His chats are saved in his history. Some chats may be read by reviewers. His chats may be used to improve the service unless he changes a setting.

Hugo also learns about the system prompt. The app adds its own instructions to everything he types. That explains why the answers always sound polite and careful.

He makes changes. He turns off the setting that lets his chats help train models. He deletes the chat with the tenant's details. For quick, one-off questions, he uses the temporary chat option where his service offers one.

He also sets a rule for his team. Before pasting anything into a chatbot, remove names, addresses and phone numbers. For anything sensitive, use only the AI tool the agency pays for and has approved.

Hugo learned that a chatbot is not a private notebook. What he types may be kept, so he now decides what to share before he pastes.

Myths and mistakes

What people thinkWhat is true
My chats disappear when I close the app.Many services save chats to your history. Gemini Apps, for example, keep saved history for 18 months by default [2].
No person ever reads my chats.Some services have human reviewers read a subset of chats [2].
The model only sees what I typed.The app also sends a system prompt and recent messages, and sometimes saved memories.
The system prompt is a secret that keeps the chatbot safe.OWASP says a system prompt should not be treated as a secret or used as a security control [3].
Turning off training deletes my old chats.It changes how new chats are used [1]. Delete old chats separately if you want them gone.

What can I do this week?

  • Open your chatbot's settings and find the history and training options.
  • Delete any old chats that hold private details.
  • Check what the chatbot has saved in its memory about you, if it has a memory feature.
  • Ask your workplace which AI tools are approved for work data.

Checklist

  • I can describe how a prompt travels to the model and back.
  • I know the app adds a hidden system prompt to my messages.
  • I have checked my chatbot's history, memory and training settings.
  • I remove names and private details before pasting text in.
  • I use temporary chats for one-off questions where my service offers them.
  • I use only approved AI tools for work data.
  • I know chatbot connections to other systems need owners and limits.

Common questions

What happens to my message after I press send?

The app combines it with a hidden system prompt, recent messages and any saved memories. It sends all of that to the model, which writes a reply. The app shows you the answer and may save the chat to your history.

Are my chatbot conversations used to train AI?

Sometimes, depending on the service and your settings. ChatGPT, for example, has an "Improve the model for everyone" setting you can turn off. Check each service's data controls or privacy page, because the options differ.

What is a system prompt?

It is a set of hidden instructions the app gives the model before your message. It shapes the tone, rules and focus of the answers. You usually cannot see it, and it should not contain passwords or other secrets.

Can someone else read my chats?

Possibly. Some services have human reviewers read a subset of chats to improve quality. Anyone with access to your account can also read your history. Use a strong password and two-step sign-in on your chatbot account.

Is a temporary chat fully private?

Not fully, but it keeps less. With ChatGPT, Temporary Chats are not used for training and are deleted within 30 days. They may still be checked for abuse during that time, so avoid sharing highly sensitive details.

Where next?

Ready for the detail? Read the practitioner guide: Generative AI Data Loss Prevention Guide. It covers how organisations stop sensitive data leaking into AI chatbots and other generative AI tools.

Also useful:

Related NHI Mgmt Group resources: LLM Data Retention and Training-Use Policies by Provider, Prompt Injection Guide and System Prompt Hardening vs External Guardrails.

Key terms

Chatbot
An app you talk to in a chat window. AI chatbots use a language model to write their replies.
LLM
A large language model: an AI model trained on large amounts of text to read and write language.
Prompt
The question or instruction you give an AI model.
System prompt
Hidden instructions the app gives the model to shape its answers.
AI memory
Facts a chatbot saves about you from past chats and reuses later.
Data retention
How long a service keeps your data before deleting it.
OAuth token
A digital pass that lets one app reach another app's data without a password.

Sources and further reading

  1. OpenAI Help Center, "Data Controls FAQ". https://help.openai.com/en/articles/7730893-data-controls-faq (accessed 30 Nov 2026).
  2. Google, "Gemini Apps Privacy Hub", Gemini Apps Help. https://support.google.com/gemini/answer/13594961 (accessed 30 Nov 2026).
  3. OWASP, "LLM07:2025 System Prompt Leakage", OWASP Top 10 for LLM Applications 2025. https://genai.owasp.org/llmrisk/llm072025-system-prompt-leakage/ (accessed 30 Nov 2026).
  4. OWASP, "LLM01:2025 Prompt Injection", OWASP Top 10 for LLM Applications 2025. https://genai.owasp.org/llmrisk/llm01-prompt-injection/ (accessed 30 Nov 2026).
  5. Salesloft Trust Center, "Drift Security Update: Salesforce Integrations", 2025. https://trust.salesloft.com/?uid=Drift+Security+Update%3ASalesforce+Integrations+%283%3A30PM+ET%29 (accessed 30 Nov 2026).

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.