The ideas

A neural network is a very large function with many adjustable numbers, called parameters. Training nudges those numbers, a little at a time, until the network gives the right outputs for its training examples.

A large language model (LLM) is a neural network trained on a huge amount of text to do one thing: predict the next token. A token is a piece of text — a word, part of a word, or often a single Chinese character. Predict a token, add it to the text, and repeat, and you get a whole answer.

The key idea inside these models is the attention mechanism. For each token, the model works out which other tokens matter to it, and how much. In "the bank of the river", attention is how "bank" gets its meaning from "river". The Transformer architecture, published in 2017, is built around attention, and today's LLMs are Transformers.

The text you give a model is the prompt. A model can only see a limited amount of text at once, called its context window. And because it produces likely text rather than checked facts, it sometimes says things that sound right but are false. This is called hallucination.

An agent is a model that can take actions, such as searching the web or running code. It works in a loop: the model picks a step, a program carries it out, and the result goes back into the context window. Then the model picks the next step, until the task is done. This is the agentic loop.

The words

English Chinese
neural network 神经网络 (shénjīng wǎngluò)
large language model 大语言模型 (dà yǔyán móxíng); usually just 大模型 (dà móxíng)
attention mechanism 注意力机制 (zhùyìlì jīzhì)
token 词元 (cíyuán)
prompt 提示词 (tíshìcí)
context window 上下文窗口 (shàngxiàwén chuāngkǒu)
agent 智能体 (zhìnéngtǐ)
hallucination 幻觉 (huànjué)

These are the mainland forms. Taiwan writes 神經網路 and 大型語言模型, and often says AI代理 or just "AI agent" for an agent. In conversation, many people say "token" and "prompt" in English.

Learn more