Learning goal
I can explain how context changes two likely next words.
How it works
The surrounding words give a language model context. Many language models predict a next piece of text from patterns in that context. More than one continuation can make sense. The activity uses whole words to make the choices easy to see.
Think of it like this
Imagine a comic panel with the last speech bubble covered. The earlier panels help you guess what kind of line belongs next. A reader also sees faces and scenes. A text-only model uses the text it receives.
Worked example
“Micah put the bat in the …” could lead to “bag” after a line about baseball. After a line about a bat rescue, “carrier” could be more likely. The word bat stays the same. The earlier lines tell us which kind of bat is meant, which changes the kinds of words that fit after it.
What to remember
Read the words around the blank. Changing the context can change the guess.
- Paint context“Mika dipped the brush in the …”
- Tooth context“Mika squeezed paste onto the brush by the …”
- Likely piecesFirst: paint. Second: sink.
Key words
- Language model
- A model that learns patterns in language. Many text-generating language models use earlier text to predict likely next pieces of text.
- Token
- A piece of text a language model works with, often a word, part of a word, punctuation, or a space together with other characters.
- Prediction
- A guess based on information, such as guessing how many people will visit a booth next week.
Activity
Trade the sentence clues
Materials Paper and a pencil or a partner who can read the lines.
- Finish “The coach put the ball in the …” with two likely words.
- Finish “The baker put the dough in the …” with two likely words. Circle the earlier words that made your choices change.
- Try changing only “baker” to “robot”. Predict whether that one edit changes your guesses and explain your reasoning.
Talk it through Some options may fit more than one sentence. Your reasons show how the extra words make an option more likely.
Quick check
Answer and explanation
Earlier text and patterns learned from examples. Earlier text gives context. Learned patterns help the model decide which pieces are likely.
Answer and explanation
The words paste and brush together suggest brushing teeth. Several words together give a better clue about which kind of brush the sentence means.