1 When computers begin to "understand" humans
With the development of artificial intelligence, AI is gradually entering the daily lives of ordinary people. Compared with computer programs of the past that needed to learn how to operate, today's AI has a very obvious change: you can talk to it just like you talk to other people, tell it what you want to know, what problems you have encountered, what tasks you need to complete, or even just express an incomplete idea, and it can often understand your meaning based on the context and give a corresponding answer.
On the surface, this may seem like just a change in how humans interact with computers, but upon closer examination, the change is far more complex than it appears:Because human language is not a simple set of commands.
The same sentence can have completely different meanings in different contexts; a seemingly ordinary sentence may contain jokes, sarcasm, innuendo, or even unspoken meanings. Often, we even omit some mutually understood information, yet the other person still grasps what we truly mean.
However, when faced with these complex expressions, today's AI is often able to provide responses that fit the context. This is why, when conversing with AI, we easily develop a very intuitive feeling:It seemed to really understand.
And when this ability extends further to answering questions, analyzing information, explaining concepts, reasoning, and even engaging in sustained conversations about a single issue, we can easily make another association:Does it also possess some kind of human-like thinking ability? After all, in our daily experience, someone who can continuously communicate with us and respond to our questions in this way is very likely to make us feel that...There is also some kind of thought process behind it..
This inevitably raises the question: Does "looking like it's thinking" really mean it can think like a human? If not, then how exactly does a computer acquire this near-human language ability?
To understand these issues, we may need to start with humanity itself and re-examine a problem we take for granted:How exactly do people learn to use language?
2. If you can recite three hundred Tang poems by heart, even if you can't compose poetry, you can still recite it.
“"Read three hundred Tang poems by heart, and even if you can't compose poetry, you can still recite it," is a very familiar saying to Chinese people. It is usually used to describe how someone who originally couldn't compose poetry can seemingly acquire a certain ability to "compose poetry" simply by reading and becoming familiar with a lot of poems.
But upon closer examination, this matter is actually quite intriguing:How can someone learn to write poetry simply by reading a lot of poems?
Following our usual understanding of learning, to learn something, it seems we should first master the corresponding rules. So, if we want to learn to write poetry, we should first learn what five-character and seven-character lines are, what rhyme, tonal patterns, and parallelism are, understand the formats of different poetic forms, and how lines should be organized. After mastering these rules, we can then create poetry according to those rules. This is a very clear learning path:First, learn the rules, then act according to the rules.
But this statement describes a different path: it doesn't emphasize learning all of poetry theory first, but rather a very simple process:Read carefullyThe so-called "familiarity with reading" refers to becoming familiar with a large number of specific lines of poetry through constant exposure and repeated reading. In this process, one may gradually learn what sentences sound poetic, what expressions sound natural when put together, and what rhythms flow smoothly. Even if one cannot accurately articulate the rules, one may slowly develop something we often call "a feel for language."
For example, a person may not be able to explain what tonal patterns are, but can still feel that a sentence sounds "wrong"; or they may not be able to accurately explain the characteristics of a certain poetic style, but can still write sentences with a similar style.
In other words, the language ability that people develop through learning is not just the mastery of explicit rules, but may also include the underlying patterns behind numerous specific examples that are difficult to describe directly. As these patterns are gradually internalized, they are no longer just "things seen before," but begin to become experiences that can be drawn upon when facing new expressions.
From this perspective, it actually describes a learning phenomenon that is not unfamiliar to us. Take practicing spoken English as an example: In China, many people learn English by starting with vocabulary and grammar, studying for many years, but they may not be able to communicate naturally; however, some elderly people who have hardly received systematic English education, when they enter an English-speaking environment and face real communication needs every day, may be able to buy things, ask for directions, and even bargain with others in English in just a few months.
They may not have a complete grasp of English grammar, nor can they explain why they say everything in the way they say it, but through continuous exposure and use, some expressions that originally required conscious thought will become familiar unconsciously, and the rules of the language will gradually settle into a certain way.Language skills that can be used directly.
3 When "thorough reading" becomes a skill
From the preceding discussion, we already know thatThere is more than one path to acquiring language skills: mastering the rules first. Extensive exposure and repeated use can gradually make language rules that originally required deliberate thought become second nature.Internalized into a capability that doesn't require conscious effort to activate..
Once this ability is truly formed, a significant change will occur: past accumulated experience will no longer be used only to process content already seen, but will begin to be applied to…New expressionsEven if someone has never written on a particular subject before, they can still write a poem that fits that style based on their accumulated language experience. This poem is not a simple copy of a previous poem; it may even contain sentences that have never been seen before, yet it still conforms to their established language habits.
To form such a new expression, the language experience accumulated in the past must first be involved in understanding and relating the content at hand. Seeing the "bright moon" might evoke thoughts of "hometown," "longing," and "night"; seeing the "lone boat" might conjure up images of "wandering," "river," and "parting." These connections don't necessarily arise from explicit reasoning, but rather gradually form through long-term language exposure and are naturally recalled when encountering related expressions.
These connections further influence our judgment of the following content. For example, someone familiar with Tang poetry, upon seeing "A bosom friend afar brings a distant land near" will easily think of the next line, "Though separated by vast distances, we are as close as neighbors." Here, the preceding words already provide a strong clue to the following content.The more you read and the more familiar you become with this style of expression, the easier it will be to judge what might happen next based on the information already presented when faced with new content.
Here we can see that the so-called "ability to recite" is not simply about reciting content that has been read before, but rather about utilizing accumulated language experience.Starting with the current expression, establish connections between content, and judge and generate subsequent content accordingly.
The foundation of all this is that the extensive content encountered in the past did not simply remain in memory after the learning ended, but gradually transformed into an experience that can continue to participate in language processing.
4. How does AI generate answers step by step?
If we apply this process to AI, the question becomes: How does AI utilize a vast amount of language information it has encountered in the past to generate new expressions it has never seen before?
If you think about it carefully, when we answer a question, we don't simply find a ready-made answer from memory. For example, if someone asks us, "Why is the sky blue?", we will retrieve relevant information from our existing knowledge, determine the direction of our answer, and then organize our expression.The question itself provides context, and that context, in turn, influences what we should say next.
So, how does this process happen when we hand a problem over to AI?
Glossary
AI
AI is a broader concept. Chatbots, AI assistants, and other applications we use daily can all be considered AI applications. For users, we are directly interacting with "AI."
Large Language Model
Chatbots can generate text answers based on the questions we input because they run large language models behind the scenes.What users see is an AI application; the real responsibility for predicting and generating subsequent text based on context lies with the large language model within it. The “prediction” and “generation” discussed later in this chapter specifically refer to this process.
For example, if we ask AI, "Why is the sky blue?" AI might start its answer by saying, "Sunlight is scattered after entering the atmosphere." In this case, that sentence becomes the content that has already been generated.
Next, the model will use the current context, including this sentence, to predict what content is more likely to appear later. Thus, it might predict that "sunlight contains different colors of light," then "different colors of light have different wavelengths," and then "blue light is more easily scattered than other colors of light," and so on.
This process can be simply represented as:

As you can see, the AI does not follow a pre-written route to extract the answers one by one. Instead, after each step is generated, it continues to predict the next step based on all the content that has appeared at that time.
Ultimately, what we see is a complete answer that revolves around this question.However, this complete answer did not exist from the beginning, but was gradually formed in the process of its generation.
From this perspective, the most basic working principle of large language models can actually be summarized in one sentence:Based on what has already happened, predict what is most likely to happen next.
Of course, this is just one possible way of developing the answer. If a different angle is chosen at the beginning, the subsequent content may also develop in different directions.In other words, the same question does not necessarily correspond to a fixed path of answering.
5. How can AI predict the next step?
In the previous chapter, we saw that the basic process of a large language model generating answers can be summarized as follows:Based on what has already happened, predict what is most likely to happen next. But then the question arises: how does AI know what content is "most likely" to appear?
The term "most likely" here is not a vague statement.From a mathematical perspective, the prediction of a large language model is essentially a probabilistic judgment: given the content that has already appeared, the model will judge the probability of different subsequent content and select the more likely result.
Let's look at a simple example first. Suppose we see:“"The sun rises from the east..."”When we think of "rise," the word "rise" immediately comes to mind. Of course, it's not the only word that can follow it; it could be "appear," "move," or even something else. But in everyday language, "rise" is clearly more natural, a feeling we develop through long-term exposure to and use of language.
When faced with similar situations, large language models also need to determine what to generate next from multiple possible subsequent content. For example:

Therefore, "prediction" here is not simply judging whether a word is "right" or "wrong", but rather calculating the probability of different subsequent content appearing based on the current context, and deciding what content to generate next.
So, what does the model use to calculate these probabilities? The answer is:trainDuring training, the model is exposed to a large number of language instances. For example, it may repeatedly see expressions like "the sun rises in the east." As training continues, the parameters within the model are constantly adjusted, and different words, expressions, and the relationships between them gradually form stable associations within the model.
Therefore, when the model sees "the sun rises from the east..." again in the future, it does not need to find a complete standard answer on the spot, but can use the parameter relationships formed during the training process to calculate different subsequent content.In the current context, "rise" is easier to predict because these parameter relationships give it a higher probability.
Moreover, the model doesn't need to have seen the exact same sentences in the training data to make predictions. As long as the linguistic relationships formed during training can be applied to new contexts, it can handle specific expressions that haven't appeared before. This is why large language models can generate a large number of sentences that have never appeared directly in the training data:It learns not only what content has appeared in the past, but also the complex relationships between these contents, which in turn affect new predictions.
It needs to be emphasized that,The most probable outcome does not necessarily mean it is correct.The model's predictions may closely match the context, and the generated content may seem very reasonable, but this does not mean that the facts are necessarily accurate or the logic is necessarily sound.Because the model first addresses "what content is most likely to appear next," rather than directly determining "what is true or correct."“This is also an important entry point for understanding the limitations of large language models.
6. How does the model learn to predict?
In the previous chapter, we saw that the reason why large language models can predict the most likely content to appear next is because the parameters inside the model form a large number of complex relationships during the training process.
However, these relationships are not present in the model from the outset.The model initially doesn't know what content is more likely to appear later; it needs to be trained to gradually develop this predictive ability. So, how exactly does the training take place?
Let's use the previous example again. Suppose that the training data contains the following sentence:“"The sun rises in the east."” After the model observes "the sun rising in the east," it needs to predict the next most likely occurrence.
Initially, its predictions may not be accurate. For example, it might think "falling" is possible, or even give a result completely out of context. At this point, training can continue:

The most crucial point here is that...The model doesn't simply memorize the answer after "seeing the correct answer." Instead, through repeated predictions and corrections, it continuously adjusts the parameters within the model based on the differences between the predicted and actual results. This alters the probability of different content appearing in subsequent predictions, gradually bringing the predicted results closer to the actual results.
If we simply understand parameters as a large number of adjustable values within the model, then they can be seen as the "internal state" that the model gradually forms during training.After extensive training, these parameters gradually form various linguistic relationships that the model learns from the training data, further influencing its predictions when faced with new content.
In other words, training is not simply about storing large amounts of text, but about letting the model repeatedly go through...Prediction, comparison and adjustmentThe process.Training data provides instances of learning, while parameters are the final results of these learning processes.
As we discussed earlier, language learning also involves continuous exposure, use, and correction, gradually developing language skills. For example, when a child first starts speaking, they don't know which words should be put together or how to organize a sentence; but as they are exposed to more and more, they will gradually become familiar with the relationships between these expressions.
Although the training of large language models is completely different from the human learning process, both ultimately exhibit a noteworthy phenomenon:What you learn during the learning process doesn't disappear after you finish learning; it continues to influence how you handle new situations later on.
7. How does the model utilize context?
We previously discussed how models gradually "learn" to predict through training, but learning to predict is only the first step. When a new question enters the model, it also needs to consider the context, determine which information should be prioritized, and use this information to decide what to predict next. So how exactly does the model achieve this?
For example, in the sentence, "Xiaoming put the book on the table because it's old," when we see "it," we don't just look at the word itself, but we consider the preceding context to determine what it refers to—the relationship between "it" and "book" is clearly more important than the relationship between "it" and "Xiaoming." If we change it to "because it's sturdy," our understanding of "it" might change again.
This shows that when understanding a sentence, we do not treat each word in isolation, but rather combine it with the context to make judgments.What content is more relevant to the current content?This correlation will affect our understanding of the current content, and consequently, our prediction of subsequent content. Large language models also need to address similar issues when dealing with language.
Taking the previous example: "Why is the sky blue?" the model cannot simply deal with "why", "sky" and "blue" separately, but needs to combine these contents and the relationships between them to form a holistic representation of the current problem.When the model starts generating answers, this processed contextual information continues to influence subsequent predictions. For example, after generating "sunlight", the model still needs to combine the previous information such as "sky" and "blue" to continue predicting the content that may appear later, such as "atmosphere" and "scattering".
At this point, a problem arises for the model:If different parts of a sentence can influence each other, how should the model handle the relationships between these parts? Transformer provides a model structure for handling this type of problem, enabling the model to connect information from different locations when processing input and to involve these relationships in subsequent computations.
One crucial mechanism is called... Attention (attention mechanism)If we want to understand it in an intuitive way, we can think of it as:When processing certain content, the model will determine which content in the context is more relevant based on the current situation, and allow these contents to have a greater impact on the current processing.
For example, when dealing with "it", "book" may be more relevant than "Xiaoming"; when dealing with "blue", "sky" may be more relevant than other content.These enhanced contextual relationships will further influence the model's representation of the current content and ultimately participate in subsequent probability predictions. The model uses this method to allow different elements in the context to participate in the next generation step.
8. Returning to the original question
We've been asking several seemingly simple questions: Why is AI able to generate an answer to a question that didn't exist before? Why, after extensive training, is it able to handle new questions that didn't directly appear in the training data? And why can a complete answer gradually unfold around the current question?
At this point, these issues can actually be understood on the same chain: the large language model is trained with a large amount of language data, and changes its internal parameters through continuous prediction, comparison and adjustment; after training is completed, when faced with new input, it will combine different contents and their relationships in the context to predict the most likely content to appear next; each generated content will become part of the subsequent prediction, and finally form the complete answer we see.
Now, let's revisit the question posed in Chapter 1: Why does AI give people the feeling that it "understands"?
The reason is that when faced with human language, it doesn't simply treat the input as a set of isolated words, but rather can combine it with context to produce a coherent and context-appropriate response. When this ability is used continuously in a conversation, this performance easily reminds us of "understanding" and "thinking."
However, if you break down the process behind this performance layer by layer, you will find that it is ultimately based on a series of predictions.This is also a key perspective for understanding large language models: don't just look at what it behaves like, but also ask how it does it.