Raedan Institute logo

Large Language Models Explained: How ChatGPT and Its Rivals Actually Work

In November 2022, OpenAI released ChatGPT to the public. Within five days it had one million users. Within two months it had one hundred million. That is a faster adoption rate than any consumer technology in history, including the iPhone. The reactions ranged from wonder to alarm. Meanwhile, the commentary that followed frequently lacked any accurate understanding of what the technology actually is. Understanding large language models is increasingly a prerequisite for thinking clearly about the most consequential technology of the current decade. This means knowing what they are and how developers build them. It also means knowing what they can genuinely do and where their fundamental limits lie.

This article does not require a technical background. However, it does require a willingness to think carefully about three things. First, consider how learning works. Second, consider what patterns in data can and cannot tell us. Finally, consider the difference between processing language fluently and understanding it in any meaningful sense.


The Transformer: The Architecture That Changed Everything

All modern large language models rest on the transformer architecture. Vaswani et al. introduced it in a 2017 paper titled ‘Attention Is All You Need’. The key innovation of the transformer is the attention mechanism. It is a way of allowing the model to consider the relationship between all words in a sequence simultaneously. The model does not process them one at a time. This parallel processing makes transformers extraordinarily efficient on modern GPU hardware. In addition, it allows them to capture long-range dependencies in text. These include the way a pronoun at the end of a paragraph relates to a noun at its beginning. They also include the way a conditional clause shapes the meaning of what follows.

The transformer architecture replaced earlier recurrent neural networks (RNNs and LSTMs) as the dominant approach to language modelling. Since then, researchers have applied it not only to text but to images (Vision Transformers), audio and multi-modal inputs. GPT (Generative Pre-trained Transformer) is the model family underlying ChatGPT. It uses a decoder-only transformer architecture. Developers train it on a next-token prediction objective. The task is this: given all the preceding tokens in a sequence, predict the next one. However, this seemingly simple objective, applied at enormous scale, produces systems with capabilities that surprised even their creators.


Pre-training, Fine-tuning and RLHF: How Models Learn to Be Useful

Training a large language model happens in stages. In the pre-training stage, developers train the model on a massive corpus of text using the next-token prediction objective. Estimates suggest GPT-4’s training data includes over a trillion tokens. These tokens come from the internet, books, code repositories and other sources. This process is computationally intensive. Training frontier models requires thousands of specialised AI chips running for weeks or months. In addition, estimates put the costs at tens to hundreds of millions of dollars.

Pre-training produces a model that is capable of generating coherent, contextually appropriate text. However, the model is not yet reliably helpful, honest or safe. The second stage is fine-tuning with human feedback. Specifically, it uses a technique called Reinforcement Learning from Human Feedback (RLHF). This technique refines the model’s behaviour using human evaluators who rate outputs for helpfulness, accuracy and harmlessness. This is the stage that transforms a raw language model into a useful assistant. The process is far from perfect. RLHF-trained models can still produce confident errors and exhibit biases. In addition, attackers can manipulate them through adversarial prompts. Even so, the process substantially improves the practical usefulness of the resulting system.


Hallucinations: The Most Important Limitation

Large language models have one limitation that matters most in practice. It is the tendency to generate factually incorrect statements with high apparent confidence. New users most frequently underestimate it. People widely refer to this phenomenon as ‘hallucination’. However, this anthropomorphic term somewhat obscures what is actually happening. LLMs generate text by predicting the most probable next token given the preceding context. The correct answer may involve specific factual knowledge that is rare in the training data. Alternatively, it may require genuine reasoning rather than pattern matching. In either case, the model may generate a plausible-sounding but incorrect answer.

Making models larger does not solve the hallucination problem. In fact, even the most advanced models available in 2026 have not eliminated it. As a result, users with relevant expertise must verify LLM outputs on factual matters before relying on them. These matters include dates, citations, statistics and technical specifications. Systems that integrate LLMs with real-time web search or structured databases can mitigate this problem for factual queries. However, they cannot eliminate it. Therefore, for anyone integrating LLMs into professional workflows, systematic verification of outputs in high-stakes domains is non-negotiable. In addition, our article on generative AI and the future of work discusses the practical workflow implications. Our piece on AI ethics explores the ethical dimensions of confident errors.


The Frontier in 2026: What the Latest Models Can Do

By June 2026, the frontier of large language model capability has advanced considerably beyond GPT-4. That model defined the 2023 wave. Multi-modal models are capable of processing and generating text, images, audio and video together. They have become the standard rather than the exception. A long-context window is the amount of text a model can process in a single interaction. These windows have extended to millions of tokens. As a result, models can reason across entire books, codebases or document collections. Reasoning models perform extended internal computation before producing a response. In addition, they show substantially improved performance on mathematical, logical and scientific tasks.

The competition to build frontier models has intensified. It involves OpenAI, Google DeepMind, Anthropic, Meta and a growing number of Chinese labs. In addition, its geopolitical dimensions go beyond commercial competition. Our article on the AI arms race explores the strategic context of this competition. Some readers are new to AI and want the foundational picture before engaging with the capabilities of current frontier models. For them, our article on what is artificial intelligence is the starting point.


References

  • Vaswani, A. et al. (2017) ‘Attention is all you need’, Advances in Neural Information Processing Systems, 30.
  • Brown, T. et al. (2020) ‘Language models are few-shot learners’, Advances in Neural Information Processing Systems, 33, pp. 1877–1901.
  • Ouyang, L. et al. (2022) ‘Training language models to follow instructions with human feedback’, Advances in Neural Information Processing Systems, 35.
  • Bender, E.M. et al. (2021) ‘On the dangers of stochastic parrots: can language models be too big?’, Proceedings of FAccT 2021, pp. 610–623.