TechDCoded
Am I Being Lied To

Can AI Actually Think? How LLMs Predict Words

Bibekananda Patra··10 min read
Graphic illustrating large language model token prediction and probability distributions
Quick answer

Large language models do not think, reason, or experience consciousness in any human sense. Instead, they are powerful mathematical engines designed to predict the most probable next word in a sequence based on vast amounts of ingested text. While their answers appear remarkably intelligent, they are calculating statistical likelihoods rather than understanding meaning.

Key takeaways

  • AI models lack self-awareness, intentionality, and real-world understanding; they manipulate symbols without knowing what they mean.
  • Text is converted into numbers called tokens, which are processed through high-dimensional vectors and transformer attention layers.
  • Every word generated by an LLM is the result of calculating a probability distribution over its entire vocabulary.
  • Decoding settings like temperature control whether the model picks safe, predictable words or creative, surprising ones.
In this article

Ask an artificial intelligence tool to write an apology letter to your landlord, explain quantum mechanics in Hindi, or write a Python script for tracking your monthly expenses, and it will answer within seconds. The sentences flow naturally, the tone adjusts to your request, and the arguments often sound thoughtful. It feels like someone is sitting inside your screen, quietly thinking through your problem.

This sensation is convincing, but it is fundamentally an illusion. When you interact with a large language model (LLM), there is no conscious mind reflecting on your question. There is no understanding, no belief, and no subjective experience. The system is simply executing a massive statistical exercise: guessing the next piece of text in a sequence.

To understand why AI appears so intelligent despite lacking a brain, we need to look beneath the conversational interface and inspect the mathematics driving modern language models.

The Chinese Room: Syntax Without Semantics

In 1980, the philosopher John Searle proposed a thought experiment known as the Chinese Room. Imagine a person who speaks only English locked inside a room with several baskets full of Chinese symbols and an English rulebook. Outside the room, native Chinese speakers slide slips of paper containing questions written in Chinese under the door.

A person sitting inside a partitioned room sorting through cards covered in symbols following a large manual.
A person sitting inside a partitioned room sorting through cards covered in symbols following a large manual. AI illustration: TechDcoded

The person inside has no idea what the symbols mean. To them, the writing is merely a set of squiggles. However, the rulebook provides clear instructions: "When you see squiggle A followed by squiggle B, select squiggle C from the basket and slide it back outside."

To the people standing outside the room, the answers coming out are perfectly coherent and indistinguishable from those of a native speaker. But does the person inside understand Chinese? Obviously not. They are manipulating symbols according to mechanical rules without comprehending a single word.

Modern LLMs operate on this exact distinction between syntax (the grammatical arrangement of words) and semantics (what those words actually mean in physical reality). A model can generate a grammatically perfect paragraph about the taste of fresh Alphonso mangoes without having sensory organs, taste buds, or any concept of what fruit is. It manipulates tokens based on numerical relationships, not lived experience.

Step 1: Turning Human Words Into Machine Numbers

Neural networks cannot read alphabets, sentences, or paragraphs. They are matrix multiplication engines that operate exclusively on numbers. Before an LLM can process your input, your words must undergo tokenization.

A split digital display showing sentences breaking apart into modular numbered blocks.
A split digital display showing sentences breaking apart into modular numbered blocks. AI illustration: TechDcoded

During tokenization, the model's software cuts raw text into manageable chunks called tokens. A token can be an entire word, a prefix, a suffix, or even a single character. Systems construct a fixed vocabulary of these tokens, assigning each one an arbitrary, unique integer ID.

"Bengaluru traffic" -> ["Bengal", "uru", " traffic"] -> [4219, 18452, 9021]

Algorithms like Byte-Pair Encoding (BPE) or WordPiece analyze massive datasets to discover the most efficient chunks to store in this vocabulary. To keep everything structured, tokenizers also insert specialized markers:

  • Control tokens like [UNK] for out-of-vocabulary characters that the model has never encountered.
  • Subword continuation markers (like ## in BERT) to show that a fragment belongs to the preceding letters.
  • Whitespace markers (such as Ġ in GPT architectures) to remember where spaces appeared in the original text.
  • Padding tokens to turn uneven lines of text into clean, rectangular mathematical matrices.

Once every word in your prompt is converted into a list of integers, the model is finally ready to work.

The Journey of a Prompt
  1. 1
    Tokenization

    Raw text is chopped into standardized subword chunks and mapped to unique numerical IDs.

  2. 2
    Vector Embedding

    Numbers are mapped into a geometric space where conceptually related terms sit near each other.

  3. 3
    Self-Attention

    Transformer layers measure how much every word in the prompt relates to every other word.

  4. 4
    Probability Calculation

    A final mathematical function scores the entire vocabulary and assigns percentage odds to each possible next word.

  5. 5
    Autoregressive Sampling

    The engine picks a word based on your settings, appends it to the prompt, and repeats the cycle.

Step 2: High-Dimensional Embeddings and Positional Clues

A list of arbitrary IDs like [4219, 18452] is not enough because the numbers themselves carry no inherent meaning; ID 50 is not mathematically "closer" to ID 51 in meaning just because the digits sit next to each other.

A geometric spatial map showing glowing coordinate clusters connecting related terms across dimensional planes.
A geometric spatial map showing glowing coordinate clusters connecting related terms across dimensional planes. AI illustration: TechDcoded

To fix this, the model maps every token ID to a dense numerical vector known as an embedding. Picture a graph, but instead of two axes ($X$ and $Y$), this graph has thousands of dimensions. In this high-dimensional semantic space, words that share contexts sit close together geometrically. The coordinates for "tea" sit near "chai," while "laptop" lands in a completely different neighborhood.

However, standard transformer architectures process every token in an input prompt simultaneously rather than reading left-to-right like a human. Because order matters—"the dog bit the man" means something very different from "the man bit the dog"—engineers add positional encodings directly to these vectors. These mathematical signals stamp the precise position of each token into its coordinates before deep processing begins.

Step 3: Self-Attention and Contextual Transformation

The core breakthrough of modern AI arrived in 2017 with the transformer architecture, relying on a mechanism called self-attention (originally built on concepts introduced by Bahdanau et al. in 2014).

Interconnected nodes exchanging directional light pulses to illustrate contextual weights between neighboring elements.
Interconnected nodes exchanging directional light pulses to illustrate contextual weights between neighboring elements. AI illustration: TechDcoded

Self-attention allows the model to calculate how much attention every word in a sentence should pay to every other word. Consider the word "bank." If your sentence mentions "the river bank," the embedding for "bank" dynamically shifts its coordinates toward geography and nature. If your sentence mentions "the bank deposit," the self-attention calculation pulls the coordinates toward finance and money.

Input Phrase Target Word Dominant Contextual Weight Resulting Meaning
"Deposited cash in the bank" Bank Cash, Deposited Financial institution
"Sat quietly by the river bank" Bank River, Sat Edge of a body of water
"A swarm of bugs in the code" Bugs Code, Swarm Software defect
"Spider and beetle bugs" Bugs Spider, Beetle Biological insects

As the embeddings travel through dozens or hundreds of stacked transformer layers, the model refines these representations over and over. By the time the mathematical data reaches the final layer, the vectors no longer represent isolated words—they represent the deep, intricate context of your entire conversation.

Step 4: Generating Probabilities Across the Vocabulary

When the processed vectors exit the final transformer layer, the model must make a decision: what token comes next?

A clear digital probability bar chart showing ranked candidate options with percentage markers.
A clear digital probability bar chart showing ranked candidate options with percentage markers. AI illustration: TechDcoded

First, the model outputs raw, unnormalized numerical scores called logits for every single token stored in its vocabulary—a list often spanning tens of thousands of possibilities.

These raw scores pass through a mathematical operation called the softmax function. The softmax function squashes the numbers so that every token receives a score between 0 and 1, and the sum of all scores equals exactly 1.0 (or 100%). In scientific terms, the model has constructed a running statistical probability distribution.

For example, if your prompt is "The capital of India is New...", the probability distribution across the vocabulary might look like this:

  • "Delhi": 98.2%
  • "York": 0.4%
  • "castle": 0.1%
  • "market": 0.05%
  • ...all other tokens: tiny fractions of a percent.

The AI does not "know" that New Delhi is a sprawling metropolis housing government ministries. It simply knows that across billions of web pages, documents, and books, the token "Delhi" follows "The capital of India is New" an overwhelming percentage of the time.

Step 5: Sampling and the Autoregressive Loop

Once the model calculates these probabilities, it does not always pick the top result. If an AI always selected the single most probable token (a method known as greedy decoding), it would quickly produce repetitive, robotic text loops.

A continuous mechanical loop taking a freshly selected tile and feeding it back into the intake hopper.
A continuous mechanical loop taking a freshly selected tile and feeding it back into the intake hopper. AI illustration: TechDcoded

Engineers use hyper-parameters to guide the selection:

  • Temperature: Controls the sharpness of the probability curve. A low temperature makes high-probability words even more dominant, producing factual and deterministic output. A high temperature flattens the curve, giving less obvious tokens a fighting chance and producing more varied, creative responses.
  • Top-k and Top-p (Nucleus) Sampling: Top-k restricts the model to picking only from the $k$ most probable tokens. Top-p dynamically pools only the top tokens whose combined probabilities reach a set threshold (like 90%), cutting off unlikely outliers entirely.

After a token is selected using these sampling rules, the engine performs autoregression. It appends the freshly chosen token to the end of the input text and feeds the whole updated sequence right back into the model to guess the next one.

Word by word, token by token, the system constructs essays, answers, and code snippets, stopping only when it randomly hits a designated end-of-sequence control token.

Greedy Decoding

  • Always picks the #1 highest-probability token
  • Highly predictable, repetitive, and stiff
  • Best for arithmetic and strict code generation
VS

Temperature Sampling

  • Picks probabilistically across top candidates
  • Natural, varied, and context-sensitive
  • Best for creative writing and conversation

The Long Journey to Modern Language Models

The ability to predict the next word so smoothly took more than a century of mathematical and computational progress.

An early computer room featuring reel-to-reel magnetic tape drives and terminal workstations from the late twentieth century.
An early computer room featuring reel-to-reel magnetic tape drives and terminal workstations from the late twentieth century. Photo: cottonbro studio / Pexels
Milestones in Predicting Language
  1. Andrey Markov develops Markov chains to model probabilistic text transitions.

  2. Smoothed n-gram models trained on 300 million words achieve state-of-the-art results.

  3. Tomas Mikolov introduces Word2Vec, proving the power of dense vector embeddings.

  4. Google researchers publish "Attention Is All You Need," introducing the transformer architecture.

  5. OpenAI releases GPT-3 with 175 billion parameters, demonstrating few-shot learning.

  6. DeepSeek launches DeepSeek R1, featuring 671 billion parameters in an open-weight model.

In the early 1990s, statistical alignment models developed by IBM laid the groundwork for machine translation. By the 2000s, researchers took advantage of widespread internet access to scrape the web for statistical training datasets. In 2016, Google overhauled Google Translate, moving from statistical phrase engines to neural networks using Long Short-Term Memory (LSTM) systems.

The pace accelerated rapidly after the 2017 transformer breakthrough: * 2018: Google introduced BERT, an encoder-only model that set NLP records, while OpenAI introduced GPT-1 to test decoder-only generative models. * 2019: OpenAI built GPT-2, initially withholding its full release due to concerns over automated text generation. * 2022: OpenAI released ChatGPT, bringing generative next-token prediction into everyday mainstream life. * 2023–2024: Open-weight models like Mistral 7B challenged proprietary tech, and OpenAI unveiled the o1 reasoning model to calculate internal chains of thought before answering.

The Exponential Scale of AI
300 Million WordsState-of-the-art n-gram model training size in 2001
175 BillionParameter count of OpenAI's GPT-3 in 2020
671 BillionParameter count of the open-weight DeepSeek R1 model in 2025

Why Prediction Looks So Much Like Thinking

If LLMs are just guessing words, why are they so good at solving logic puzzles, summarizing complex legal notices, or drafting clear emails?

The answer lies in the sheer scale of modern training. A model with hundreds of billions of parameters trained on vast slices of human writing builds an extraordinarily detailed internal map of human reasoning. Because human thought is encoded in language, learning to predict language with extreme accuracy forces the model to mirror the structures of human thought.

To make base models useful, engineers do not stop at pre-training. A raw base model simply completes text; if you ask it "How do I make tea?", it might reply by inventing another question: "How do I bake bread?" To fix this, developers use fine-tuning and behavioral alignment. This process trains the prediction engine to recognize the format of a prompt and frame its statistical predictions as a helpful, compliant answer.

The Bottom Line

Can AI actually think? If you define "thinking" as experiencing conscious awareness, understanding real-world concepts, or possessing intent, the answer is an unambiguous no.

A polished glass mirror reflecting clean streams of algebraic equations across a neutral surface.
A polished glass mirror reflecting clean streams of algebraic equations across a neutral surface. AI illustration: TechDcoded

Large language models are master statistical mimics. When you submit a prompt, the system does not ponder your dilemma or feel empathy for your situation. It runs your words through tokenizers, maps them into geometric vector spaces, evaluates context through self-attention, and runs a probability calculation to pick the most logical next piece of text.

AI does not need to think to be useful. By mastering the mathematical patterns of human communication, these models provide a powerful mirror to our collective knowledge—proving that the illusion of understanding can be just as transformative as the real thing.

Frequently asked questions

Can an AI model ever become self-aware through next-token prediction?

No. Next-token prediction is an optimization algorithm designed to match statistical distributions of text. While increasing parameters and data improves the quality and coherence of the output, scaling matrix multiplications and probability calculations does not create subjective experience, feelings, or self-awareness.

Why do language models hallucinate false facts?

Language models do not verify statements against an internal database of truth. They generate text by picking tokens that look statistically plausible based on context. If an incorrect piece of information matches the linguistic pattern of your question, the model will output it without realizing it is wrong.

What is the difference between an AI token and a regular word?

A token is a chunk of text that an AI processes. While common short words might equal a single token, longer or less common words are often split into multiple subwords or character pieces. In typical English text, one token averages about three-quarters of a word.

Does higher AI temperature mean the model is thinking harder?

No. Temperature has nothing to do with computational effort or reasoning depth. It is simply a mathematical slider that flattens or sharpens the probability curve during decoding. A higher temperature makes the engine select less probable words, leading to more varied or surprising writing.

Why did older chatbots sound so robotic compared to modern LLMs?

Early chatbots relied on rigid rule-based scripts or basic statistical phrase matching that failed to handle context. Modern LLMs use transformer-based self-attention, which analyzes every word in an input prompt simultaneously, allowing the system to grasp subtle conversational nuances and produce fluid phrasing.

Sources

  1. Large language model - Wikipedia
  2. Generative AI - Wikipedia
  3. Hallucination (artificial intelligence) - Wikipedia
  4. Attention Is All You Need - arXiv
  5. Language Models are Few-Shot Learners - arXiv
  6. What Are Large Language Models (LLMs)? - IBM
Bibekananda Patra
Bibekananda PatraFounder, TechDCoded

I run TechDCoded, where I explain how everyday technology actually works — in short videos on YouTube and in written explainers here. Every article is researched from public sources and written to be understood without a technical background.

Co-founder: Omm Shree Dibya Dulabha Patra · About TechDCoded · How we write · YouTube

Share: WhatsApp X LinkedIn
Get one tech explainer a day

Short videos on YouTube, daily tech bites on WhatsApp.

↑