在本页阅读时间 9 分钟
概述
ChatGPT is a product built around such models. Knowing how the prediction works explains both why these systems write fluently and why they can state false things with confidence.
主要要点
- A large language model predicts the next token of text, one token at a time, using probabilities learned from enormous amounts of written material.
- ChatGPT is a product built on language models; OpenAI launched it on November 30, 2022, fine-tuned from a GPT-3.5 series model.
- Chat assistants are built in two stages: pretraining on raw text, then alignment with human-written examples and human rankings, known as RLHF.
- In OpenAI's InstructGPT study, people preferred answers from a 1.3-billion-parameter instruction-tuned model over those of the 175-billion-parameter GPT-3.
- DeepMind's Chinchilla showed that a 70-billion-parameter model trained on 1.4 trillion tokens could outperform much larger models trained on less text.
- LLMs can produce fluent but false statements, so facts, figures, quotes and citations from them need checking against original sources.
深入探讨
A large language model is a computer program that has learned the statistical patterns of language by reading a very large amount of text. Its job, at the lowest level, is simple: given some text, predict what comes next. It does this one token at a time. A token is a chunk of text such as a whole common word, part of a rarer word, a number or a punctuation mark. The model assigns a probability to every token in its vocabulary, picks one, adds it to the text, and repeats. Large refers to the number of adjustable internal numbers, called parameters: GPT-3, described in a 2020 OpenAI paper, had 175 billion. ChatGPT, by contrast, is a product. It wraps one or more language models in an app with a chat interface, safety filters, memory features and, in later versions, tools such as web search. The model and the product are not the same thing.
Inside, almost every current LLM is a Transformer, the design introduced by Google researchers in 2017. First, each token is turned into a list of numbers called an embedding. Then the text passes through a stack of identical layers. Each layer has an attention step, in which every token looks back at the earlier tokens and pulls in information from the ones that matter for it, and a feed-forward step, which transforms each token's numbers on its own. GPT-3 stacked 96 such layers, each 12,288 numbers wide with 96 attention heads, and could look at 2,048 tokens of text at once, a limit called the context window. After the last layer, the model converts the final token's numbers into a probability for every possible next token.
Building a chat assistant takes two broad stages. The first is pretraining. The model reads a huge collection of text and, at each position, is penalized according to how much probability it gave the token that actually came next. GPT-3 was trained on 300 billion tokens, mostly filtered web pages plus books and Wikipedia, using about 3.14 times 10 to the 23rd power arithmetic operations. The result is a model that can continue any text but does not reliably follow requests. The second stage is alignment. In OpenAI's 2022 InstructGPT work, people wrote example answers to prompts and the model was fine-tuned on them; then people ranked several model answers from best to worst, a separate reward model learned to predict those rankings, and reinforcement learning nudged the language model toward answers the reward model scored highly. This is called reinforcement learning from human feedback, or RLHF. In human evaluations, answers from a 1.3-billion-parameter InstructGPT model were preferred to those of the original 175-billion-parameter GPT-3.
The key milestones are well documented. June 2017: the Transformer paper. May 2020: GPT-3 shows that a sufficiently large model can do new tasks from a few examples written into the prompt, which its authors called few-shot learning. March 2022: InstructGPT introduces the instruction-following recipe, and DeepMind's Chinchilla paper shows that many large models had been trained on too little text. Chinchilla, with 70 billion parameters trained on 1.4 trillion tokens, outperformed the 280-billion-parameter Gopher and the 175-billion-parameter GPT-3, and the authors concluded that training text should double whenever model size doubles. November 30, 2022: ChatGPT launches as a free research preview, trained with the same RLHF methods using dialogue data. March 2023: GPT-4 accepts images as well as text and scores around the top 10% on a simulated bar exam, though its report discloses no details of model size or architecture.
LLMs are often compared with search engines and with older chatbots. A search engine finds existing documents and shows where they came from. An LLM generates new text from patterns it learned, so its answer may be fluent but has no built-in link to a source unless the product adds retrieval or search. Older chatbots, such as phone menus and customer service scripts, matched keywords to replies written in advance; an LLM composes each reply fresh, which makes it far more flexible and far less predictable. Among LLMs, closed models are offered only through a company's app or API, while open-weight models publish their parameters so anyone can run them; the Stanford AI Index 2025 found the performance gap between the best open and closed models shrank from 8% to 1.7% on some benchmarks in a year.
The main weakness is that predicting likely text is not the same as knowing facts. OpenAI's own ChatGPT launch post listed the problems plainly: the model sometimes writes plausible-sounding but incorrect answers, gives different answers to slightly reworded questions, is often too wordy, guesses at ambiguous questions instead of asking, and can still follow harmful instructions or show bias. A 2025 paper by Adam Tauman Kalai and colleagues argues that these confident errors, usually called hallucinations, persist partly because training and benchmark scoring reward guessing over admitting uncertainty. Other limits follow from the design. A model knows nothing after the date its training text was collected unless it is connected to search. It cannot see its own sources. And the GPT-4 report itself notes the model is less capable than people in many real-world situations.
Costs fall into training and use. Training is the expensive part: GPT-3's 3.14 times 10 to the 23rd operations was already a very large budget in 2020, and the largest models since then have used far more. Chinchilla's results showed that a smaller model trained on more text could match or beat a larger one while being cheaper to run afterward. Using a model is priced per token, both for the text sent in and the text generated, so long documents and long answers cost more. The Stanford AI Index 2025 measured a more than 280-fold drop in the price of GPT-3.5-level performance between late 2022 and late 2024. For ordinary users the practical cost is mostly time: checking claims, supplying context and verifying anything that will be relied on.
04工作示例
Compute next-token probabilities and see temperature at work
Imagine the prompt The capital of France is and three candidate next tokens with raw scores from the model: Paris 5, Lyon 3, France 2.
Exponentiate each score: e to the 5 is about 148.4, e to the 3 is about 20.1, e to the 2 is about 7.4. Their sum is about 175.9.
Divide each by the sum to get probabilities at temperature 1: Paris about 0.84, Lyon about 0.11, France about 0.04.
Now divide every score by a temperature of 2 before exponentiating: e to the 2.5 is about 12.2, e to the 1.5 is about 4.5, e to the 1 is about 2.7, sum about 19.4.
Compute the new probabilities: Paris about 0.63, Lyon about 0.23, France about 0.14.
Note that the model would pick Lyon roughly one time in nine at temperature 1 and nearly one time in four at temperature 2, even though Paris is correct.
它显示了什么
Probabilities in each case sum to about 1, which is the check. The exercise shows that an LLM chooses words by sampling from a probability distribution, so a higher temperature produces more varied text and also more chances of a wrong token.
现实世界的实施
Conversational assistants: OpenAI launched ChatGPT on November 30, 2022 as a free research preview, fine-tuned from a GPT-3.5 series model with reinforcement learning from human feedback so it could handle follow-up questions.
Learning from a few examples: the 2020 GPT-3 paper showed a 175-billion-parameter model performing translation, question answering and arithmetic from a handful of examples placed in the prompt, with no retraining.
Professional exams: OpenAI's GPT-4 Technical Report from March 2023 states that GPT-4 passed a simulated bar exam with a score around the top 10% of test takers, and accepts images as well as text.
Cheaper everyday use: the Stanford AI Index 2025 reports the cost of GPT-3.5-level performance fell more than 280-fold between November 2022 and October 2024, which is why summarizing, drafting and coding help became widely affordable.
The Future of ChatGPT and Large Language Models (LLMs)
Several open problems are shaping language models after 2025. Reliability is the most visible. The 2025 paper Why Language Models Hallucinate proposes changing how leaderboards score answers so that admitting uncertainty is not punished, rather than adding more specialized hallucination tests; whether benchmark makers adopt that approach is still an open question. A second direction is grounding. Products increasingly connect models to search engines, document stores and software tools so answers can be checked against current sources, which reduces but does not remove fabricated details. A third is efficiency. Following the 2022 Chinchilla findings, developers have favored training smaller models on more text, and the Stanford AI Index 2025 recorded both falling inference prices and a narrowing gap between open-weight and closed models. Transparency is a fourth issue. The GPT-4 Technical Report of March 2023 withheld model size, hardware and training data details, citing competition and safety, which makes independent evaluation of such models harder. Researchers continue to debate whether next-token prediction plus more scale will keep yielding broader reasoning abilities, or whether different training methods will be needed.
付诸实践
为什么这很重要
- 速度与规模. 语言工作流程可以在不牺牲一致性的情况下更快地移动。
- 交通与覆盖范围. 它扩展了跨语言和沟通方式的访问。
- 更清晰的判决. 团队可以花更多时间进行判断,而自动化则可以处理重复。
留意
- 幻觉的事实可以悄悄地进入报告、支持流程或研究成果。
- 及时的敏感性可能会在类似的请求中产生不一致的结果。
- 如果访问控制薄弱,敏感文本数据可能会暴露。
后续步骤
- 在推出之前定义输出格式、语气和质量标准。
- 当准确性很重要时,请使用可信来源进行地面响应。
- 为高风险输出保留人工审查检查点。
- 跟踪故障模式并定期重新训练提示或工作流程。
资料来源与延伸阅读
- arXiv (Google, 2017)您所需要的就是关注
- arXiv (OpenAI, 2020)Language Models are Few-Shot Learners
- arXiv (OpenAI, 2022)Training language models to follow instructions with human feedback
- arXiv (DeepMind, 2022)Training Compute-Optimal Large Language Models
- OpenAIIntroducing ChatGPT
- arXiv (OpenAI, 2023)GPT-4 Technical Report
- arXiv (Kalai, Nachum, Vempala and Zhang, 2025)Why Language Models Hallucinate
- Stanford Institute for Human-Centered AI2025年人工智能指数报告
不断探索
常见问题
What is ChatGPT and Large Language Models (LLMs)?
A large language model (LLM) is a neural network trained on enormous amounts of text to predict the next small piece of text, called a token, and then tuned to follow instructions. ChatGPT is a product built around such models. Knowing how the prediction works explains both why these systems write fluently and why they can state false things with confidence.
自回归语言模型的常见训练目标是什么?
The guide explains that an autoregressive language model uses context to score possible next tokens.
语言模型可以将一个词拆分为多个处理单元。这些单元是什么?
Text is converted into tokens, which can represent words, word parts, or other units.
聊天机器人与大型语言模型之间有什么关系?
The guide distinguishes the model from the application that can wrap it with other systems.
哪项陈述区分了训练、提示和检索?
The guide treats training, prompting, retrieval, and tools as different mechanisms.
提供来源能消除幻觉吗?
Relevant sources can help, but the answer still needs to be checked against them.