A large language model (LLM) represents relationships among words and uses context to predict a likely sequence of text. Given a prompt, it predicts one word at a time until it completes a response. Because those choices are nondeterministic, the same prompt can produce different answers. An LLM generates plausible text; it does not guarantee understanding, correctness, or intent. section 1.2.3 section 6.5.2
Predicting the next word
For “The person opened the ________,” an LLM might predict “door” or “box.” Both fit the context, while “the,” “it,” or “open” fit poorly. It continues making similar predictions to produce a complete answer, such as Python code generated from a natural-language prompt. section 1.2.3
Working with an LLM requires treating its output as a suggestion rather than a verified result:
- Describe a desired program in ordinary language through a prompt. section 1.2.3
- Expect different responses because generation is random or nondeterministic. section 1.2.3 section 6.5.2
- Test and inspect generated code instead of assuming that it is correct or secure. section 1.5 section 6.5.2
- Prefer an editable language such as Python when generated code needs correction, rather than inspecting machine code directly. section 1.2.3
Figure 1.2 Going from prompt to program with Copilot
Trace the path from a natural-language prompt to a generated program through Copilot. section 1.2.3


































































