Tech

Explained: How AI chatbots actually work

Explained: How AI chatbots actually work

AI chatbots can write essays, answer questions and hold surprisingly human conversations. Here’s what’s actually happening behind the screen, and why they sometimes get things confidently wrong.

Chatbots such as OpenAI’s ChatGPT, Google’s Gemini and Anthropic’s Claude are powered by what’s called a large language model, or LLM.

A language model is a type of artificial intelligence designed to work with text. “Large” refers to its size. These models contain billions of internal settings, called parameters, that are adjusted during training.

How they’re trained

Training starts with huge amounts of text, including books, websites, articles and computer code. The model reads that text broken into small chunks called tokens, which can be words or parts of words.

Over and over, it tries to predict the next token in a passage, compares its guess with the real answer and adjusts its parameters to do better next time. After trillions of these predictions, it learns grammar, facts, writing styles and patterns of reasoning.

This first stage takes thousands of specialised chips, usually from Nvidia, running for weeks or months in huge data centres, at a cost that can run into hundreds of millions of dollars.

The model is then fine-tuned to be a helpful assistant. People rate its answers, and it learns to give responses that are more useful, accurate and safe.

What happens when you ask a question

When you type a question, the chatbot doesn’t look up an answer in a database. It generates a response one token at a time, each time predicting the most suitable next piece based on your question and everything it has written so far.

Many chatbots can now also search the web, read documents you upload, write and run code, or take actions on a computer, which makes them far more capable than a model working from memory alone.

The limits

Because chatbots generate text based on patterns rather than checking facts, they can produce answers that sound right but are wrong, including invented quotes, statistics or sources. These are known as hallucinations.

A model’s built-in knowledge also stops at the date its training data ends, unless it can search for newer information.

There are wider concerns too, including the use of copyrighted material in training, the huge amounts of electricity data centres use, privacy, and the impact on jobs.

The best way to use a chatbot is like a capable assistant: helpful for drafting, summarising, explaining and brainstorming, but worth double-checking for anything important.

Up next
Naomi Simson reveals what separates great founders from the rest

What does it really take to build a successful business?

Read the story →
Ticker Today takes a daily view of the world of news, politics and business.With Ahron YoungWhisky & Suits explores law, property finance and business over fine whisky.With Imran Khan and Chris ChristofiThe Founders Method explores practical lessons and systems for entrepreneursWith Jonathan Byrt and Jesse LeeworthyThe Connector explores property and urban growth across Australia and the UK.With Belinda CoateThe Property Playbook delivers research-led insights for property investors.With Tim Graham and Terry RyderState of Hospitality explores the challenges facing Australia's hospitality.With Jeremy KoadlowBuying Power helps young professionals enter property and build lasting wealth.With Victor and Reshmi KumarThe Airport Economist explores global trade, business and economic outlooks.With Tim HarcourtMedia Movers explores the trends shaping Australia's media and global news.With James ManningBroker Business explores strategies to build, grow and sustain a business.With Rex AfrasiabiMoney Matters explores practical financial strategies to build lasting wealth.With Dr Steven EnticottBeyond Education explores the ideas and technology shaping future learning.With Greg CampitelliTicker Air explores the latest aviation news, travel trends and developments.With Ahron YoungEarly Years Dialogue explores the issues shaping Australia's early learning.With Paul MondoMarkets and Machines explores AI, regulation and trends shaping the markets.With Chris BergSocial Intelligence explores how social media and AI transform our daily lives.With Dr Karen SutherlandThe AI Edge explores how artificial intelligence reshapes the world economy.With Brad Gastwirth

More from Ticker

Watch

More in Tech

View all →