Prompt Engineering: The Model Predicts the Next Word
The model predicts the next word. It reads the words so far and picks the word most likely to come next.
The same prompt twice
The same prompt can give a different reply on a second run. The prediction is likely, not fixed.
Write a one-sentence product description for the Aurora Ceramic Mug. The mug costs $18 and holds 350 ml.One word changes the reply
One word changes the prediction. Formal pulls one set of words and friendly pulls another.
Write a friendly reply to a customer who asks where order 1042 is. Order 1042 is shipped and out for delivery.Politeness does not steer the model
Extra polite words do not make the reply better. The facts in the prompt do the work.
Please, if you would be so kind, write a reply about order 1042.Example
Write two different one-sentence replies to Maya about order 1042. Order 1042 is shipped and out for delivery.Key points
- The model predicts the next word, one word at a time.
- Each new word joins the words before it and shapes the next prediction.
- The same prompt can give different answers on different runs.
- Wording matters more than politeness. Small word changes shift the predictions.
This example runs one prompt against the local model and shows that two replies can come from the same words.
Note
The model does not look up facts. It predicts words from the patterns it learned.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
Why can the same prompt give different answers?