liveBook · Manning

Probability theory

As explained in Software Testing with Generative AI

Probability is a mathematical measure of the likelihood that an event or outcome occurs.

Probability measures how likely an outcome is. In language models, training produces a probability distribution used to predict the next word. section 2.1

Keyboard word suggestions

After selecting “I am,” a keyboard may rank “away” highly and “sandalwood” low. Each suggestion reflects the model’s learned probabilities. section 2.1

These probabilities emerge from unsupervised training on massive datasets, which creates model weights and balances that support prediction. section 2.1

Figure 2.1 Probability distribution in action

Visualizes how candidate words receive different probabilities after preceding text. section 2.1

How Software Testing with Generative AI covers it

How deep it goes
Defines probability distributions and connects them to training, model weights, and prediction without mathematical derivation.
Examples
Uses phone-keyboard suggestions, including “I am” followed by “away” or “sandalwood.”
What you can do after
Understand how trained language models rank possible next words.
How it connects
Connects probability with large language models, machine learning, unsupervised learning, supervised learning, and probability distributions.

Also explained in

Compare how 16 books explain probability theory →

Related concepts

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