liveBook · Manning

Language model

As explained in Data Storytelling with Altair and AI

A large language model is a neural language model with many learned parameters that generates or transforms text based on input context.

A large language model (LLM) is a machine-learning model that predicts plausible language. Transformer architectures made it possible to train models such as GPT and BERT on massive datasets, producing strong language-generation capabilities. In data storytelling, LLMs provide textual context through commentaries and annotations rather than replace judgment about the story or its audience. section 7.4 section 7.0

Choose how to extend an LLM according to the information it must know:

  • Use ChatGPT directly when the task does not require specialized domain information. section 7.4
  • Apply fine-tuning when a pretrained model should adapt to a domain using task-specific prompt–completion pairs. section 7.6 section 7.4
  • Use retrieval-augmented generation (RAG) when generation must incorporate domain knowledge from an external vector database. section 7.6 section 7.4

Adding context to a data story

A data storyteller can ask ChatGPT to generate a commentary or explain an anomalous chart point with an annotation. The result should be calibrated to the audience and reviewed before inclusion. An entirely AI-generated story might invent a political scandal, illustrating why human-in-the-loop validation matters. section 7.1 section 10.1.1

Figure 7.10 A criterion to establish whether to extend an LLM or not
figure

Use the criterion to decide whether direct LLM use is sufficient or whether domain knowledge requires fine-tuning or retrieval-augmented generation. section 7.4

How Data Storytelling with Altair and AI covers it

How deep it goes
Defines prediction and transformer foundations, then stops short of explaining how LLMs work technically.
Examples
Demonstrates ChatGPT-generated commentaries and annotations, domain-tailored models, vector-database retrieval, and a fabricated political scandal.
What it assumes
Assumes familiarity with data stories and audiences while introducing LLMs through practical context-generation tasks.
What you can do after
Apply ChatGPT for data-story context, extend it with fine-tuning or RAG, and validate generated content before publication.
How it connects
Ties LLMs to transformers, generative AI, ChatGPT, fine-tuning, retrieval-augmented generation, vector databases, 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 Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.