A prompt is the input given to a generative model to guide what it produces. It might ask a language model to answer a question, supply text to summarize, or describe an image to create. The wording matters: “Summarize this” leaves much open, while a request for a one-paragraph summary of three risks for a named audience gives clearer direction. section 2.14 section 7.1 section 4.7
A prompt can provide different kinds of guidance:
- Instructions state the task, audience, tone, boundaries, or desired output format. section 7.1
- Context supplies information the model can use, such as a document, search results, or conversation history. section 5.9 section 7.1
- Examples demonstrate the desired task. A request without examples is zero-shot; one with a few examples is few-shot. Neither requires retraining the model. section 2.14
From request to example-guided prompt
A writer sorting articles could ask a model to assign each title to dog breeding, exoplanets, or Pittsburgh. If the results miss the intended pattern, the writer could add examples such as “The latest discovery of space telescopes”: Exoplanets. The examples guide the response without changing the model’s training. section 2.14
In a chat system, the user’s message may be only one part of the final prompt. A system prompt can set an overall response style or safety guidance; retrieved information and conversation history can also affect the reply. System prompts can even show an AI agent how to invoke tools. These instructions are useful but blunt: a small wording change can have unintended effects, and prompting may be less precise than post-training for a narrow behavior change. section 5.9 section 8.11 section 7.11
Figure 5.12 A sample composition of an LLM prompt deployed in the chat context (e.g., ChatGPT, Claude, Gemini)
The diagram separates the system prompt, surrounding context, and latest user message that can jointly shape a chat response. section 5.9
Prompts also carry risks. Entering a client contract into a dialogue agent could disclose confidential information, depending on how the service handles inputs. Instructions placed in a user message or external content can attempt to redirect a model; this is prompt injection. Clearer prompts can improve results, but they do not guarantee correctness, confidentiality, or safety. section 3.10 section 5.9 section 6.7

















































