Ask a language model to finish “the robot picks up the …” twice and you may get two different answers. Ask again with the temperature at zero and you get the same one every time.
You will look inside the simplest possible language model, a table of counts, and implement the two ways of choosing the next word.