GUÍA de IA en idiomas

ChatGPT y grandes modelos de lenguaje (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.

Escuche esta guíaNarrado por IA · ~8 min

En esta pagina9 minutos de lectura
  1. Descripción general
  2. Conclusiones clave
  3. Buceo profundo
  4. Compute next-token probabilities and see temperature at work
  5. Implementación en el mundo real
  6. The Future of ChatGPT and Large Language Models (LLMs)
  7. Poniéndolo en práctica
  8. Fuentes y lecturas adicionales
  9. Sigue explorando
  10. Preguntas frecuentes

Descripción general

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.

Conclusiones clave

  1. A large language model predicts the next token of text, one token at a time, using probabilities learned from enormous amounts of written material.
  2. ChatGPT is a product built on language models; OpenAI launched it on November 30, 2022, fine-tuned from a GPT-3.5 series model.
  3. Chat assistants are built in two stages: pretraining on raw text, then alignment with human-written examples and human rankings, known as RLHF.
  4. 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.
  5. 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.
  6. LLMs can produce fluent but false statements, so facts, figures, quotes and citations from them need checking against original sources.

Buceo profundo

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.

04Ejemplo resuelto

Compute next-token probabilities and see temperature at work

  1. 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.

  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.

  3. Divide each by the sum to get probabilities at temperature 1: Paris about 0.84, Lyon about 0.11, France about 0.04.

  4. 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.

  5. Compute the new probabilities: Paris about 0.63, Lyon about 0.23, France about 0.14.

  6. 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.

lo que muestra

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.

Implementación en el mundo real

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.

Poniéndolo en práctica

Por qué es importante

  • Velocidad y escala. Los flujos de trabajo lingüísticos pueden avanzar más rápido sin sacrificar la coherencia.
  • Acceso y alcance. Amplía el acceso a través de idiomas y estilos de comunicación.
  • Decisiones más claras. Los equipos pueden dedicar más tiempo a juzgar mientras la automatización se encarga de la repetición.

cuidado con

  • Los hechos alucinados pueden aparecer silenciosamente en informes, flujos de apoyo o resultados de investigaciones.
  • La sensibilidad rápida puede crear resultados inconsistentes en solicitudes similares.
  • Los datos de texto confidenciales pueden quedar expuestos si los controles de acceso son débiles.

Próximos pasos

  1. Defina el formato de salida, el tono y los estándares de calidad antes del lanzamiento.
  2. Respuestas terrestres con fuentes confiables siempre que la precisión sea importante.
  3. Mantenga un punto de control de revisión humana para los resultados de alto riesgo.
  4. Realice un seguimiento de los patrones de error y vuelva a capacitar las indicaciones o los flujos de trabajo con regularidad.

Fuentes y lecturas adicionales

  1. arXiv (Google, 2017)Atención es todo lo que necesitas
  2. arXiv (OpenAI, 2020)Language Models are Few-Shot Learners
  3. arXiv (OpenAI, 2022)Training language models to follow instructions with human feedback
  4. arXiv (DeepMind, 2022)Training Compute-Optimal Large Language Models
  5. OpenAIIntroducing ChatGPT
  6. arXiv (OpenAI, 2023)GPT-4 Technical Report
  7. arXiv (Kalai, Nachum, Vempala and Zhang, 2025)Why Language Models Hallucinate
  8. Stanford Institute for Human-Centered AIThe 2025 AI Index Report

Sigue explorando

Boletín gratuito

Recibe el resumen diario de IA

Tres noticias verificadas sobre IA cada mañana de lunes a viernes, explicadas con claridad. Gratis para siempre y sin anuncios.

Un correo cada día laborable. Date de baja con un clic. Nunca vendemos ni compartimos tu dirección.

Ponte a prueba

Take the ChatGPT and Large Language Models (LLMs) quiz

Corrección inmediata en cada respuesta y un certificado para compartir, con un ID verificable, cuando apruebas un curso.

Empezar el cuestionario

Apoya la educación gratuita sobre IA. AI Understanding es una organización sin fines de lucro 501(c)(3): sin anuncios ni muros de pago, nunca. Hacer una donación

Preguntas frecuentes

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.

What is a common training objective for an autoregressive language model?

The guide explains that an autoregressive language model uses context to score possible next tokens.

A language model can split one word into several processing units. What are those units?

Text is converted into tokens, which can represent words, word parts, or other units.

How does a chatbot relate to an LLM?

The guide distinguishes the model from the application that can wrap it with other systems.

Which statement distinguishes training from prompting and retrieval?

The guide treats training, prompting, retrieval, and tools as different mechanisms.

Does supplying sources eliminate hallucinations?

Relevant sources can help, but the answer still needs to be checked against them.