liveBook · Manning

Probability distribution

As explained in Software Testing with Generative AI

A mathematical representation assigning probabilities to the possible values or outcomes of a variable.

A data distribution assigns probabilities to possible outcomes. In language models, it ranks candidate next words after a given sequence, making likely and unlikely continuations distinguishable. section 2.1

Phone keyboard suggestions

After entering “I am,” a keyboard model may rank “away” highly and “sandalwood” very low. Choosing “away” updates the distribution for the next prediction. section 2.1

Figure 2.1 Probability distribution in action

Visualizes how candidate words receive different probabilities after a partial phrase. section 2.1

How Software Testing with Generative AI covers it

How deep it goes
Defines probability-based prediction and connects it to training, but stops short of mathematical formalization.
Examples
Uses phone-keyboard suggestions, the phrase “I am,” and candidate words such as “away” and “sandalwood.”
What you can do after
Understand how trained models rank possible next words using learned probabilities.
How it connects
Connects probability distributions with language models, machine learning, unsupervised learning, and model weights.

Also explained in

Compare how 27 books explain probability distribution →

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.