liveBook · Manning

Language model

As explained in Inside AI

A large language model is a machine-learning model trained on large text corpora to process and generate human-language text.

A large language model (LLM) is a generative AI system trained on vast amounts of text to produce human-like language. It can help draft content, answer questions, translate, summarize, and assist with code. Chatbots such as ChatGPT make these capabilities available through ordinary conversation. section 5.2 section 1.4

An LLM first learns patterns from large text datasets, then may be fine-tuned for particular tasks. When given a prompt, it predicts what word or token is likely to come next; a token may be a whole word or a word fragment. Repeating that prediction produces a response. The model need not always select the most likely option, which can make its wording less formulaic. section 5.2 section 5.3.1

From a prompt to a response

Given “The benefits of electric vehicles are …”, a language model ranks possible next tokens, such as “numerous” or “economic”, and continues generating text. A fluent continuation shows how it uses learned language patterns; it does not, by itself, establish that every claim in the response is true. section 5.3.1 section 5.12

Useful applications come with limits:

  • Summaries can help readers grasp a long document, and generated code can speed up a programming task. section 5.2
  • Customer-support responses can address common questions, but their usefulness depends on the information and prompts supplied. section 5.7 section 5.12
  • Convincing prose may still be inaccurate, fictional, repetitive, or biased by faulty training data. section 1.3 section 5.8

Treat an LLM as an aid to communication and problem-solving, not as a source of guaranteed understanding. It can produce coherent language without reliably grasping implied meaning or real-world context. Check important claims and consider the risks of disinformation and overreliance before using its output. section 5.6 section 5.8

How Inside AI covers it

How deep it goes
Explains pretraining, fine-tuning, tokens, and next-token prediction through a prompt example without descending into implementation.
Examples
Illustrates generation with an electric-vehicle prompt and applications including summarization, translation, coding assistance, and customer support.
What it assumes
Assumes no specialist AI knowledge and explains tokens and prediction through an everyday prompt.
What you can do after
Evaluate/understand it: identify useful LLM tasks while checking plausible output for errors, bias, and misleading claims.
How it connects
Connects language models to generative AI, chatbots, natural language processing, deep learning, and hallucination.

Also explained in

Compare how 67 books explain language model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Inside AI. The section links point to the parts of the book it draws on.