A language model is a prediction machine: it receives a text, the prompt, and tries to predict the words that follow it (Alammar & Grootendorst, 2024, p. 173). The most basic prompt is a half-finished sentence; the most elaborate can combine several components: a persona ("you are an expert in astrophysics"), the instruction, the context, the output format, the audience, the tone and the data (Alammar & Grootendorst, 2024, pp. 177–178). The practice of adjusting these components by trial and error is called prompt engineering.
The crucial point is that a prompt is not an order in the sense in which a program instruction is. When someone types "All humans are mortal and Socrates is human, therefore…", they are not asking the model to carry out a deduction but, strictly speaking, to report which words tend to follow that sequence in the corpus; that the answer is "Socrates is mortal" is good news, not a proof (Shanahan, 2024, p. 76). This is why details that are trivial to a human, such as a punctuation mark or the order of the parts, can change the result considerably, and why Buckner (2024) describes prompt engineering as ad hoc tweaking without much systematic guidance (2024, pp. 278–279). Position matters too: models tend to attend more to the beginning and end of a long prompt than to its middle (Alammar & Grootendorst, 2024, p. 177).
The prompts the user sees are not all the model sees: there is usually an invisible system prompt and a chat template. And the prompt takes up room in the context window, measured in tokens. For a linguist, the prompt is context in the pragmatic sense: it does not convey an intention that the model recognizes, but shifts the distribution of possible continuations. Shanahan (2024) puts it this way: prompt engineering will remain necessary until we better understand the relationship between what we say and what we want (2024, p. 72).