Prompt context is the information a foundation model receives to understand the situation surrounding a task. It can include reference documents, previous conversation turns, customer details, retrieved database records, tool results, or descriptions of the intended audience. For example, a support assistant answering a refund question needs the applicable refund policy and relevant purchase details, not just the question itself. Supplying that information allows the model to answer for the specific situation rather than relying only on general patterns learned during training.
Context, instructions, and negative prompts serve different purposes. Context supplies background or evidence, such as a policy stating that unopened items can be returned within 30 days. An instruction specifies what to do, such as determining whether a purchase qualifies and explaining the decision. A negative instruction specifies what to avoid, such as not inventing exceptions. In image generation, a negative prompt commonly describes unwanted visual elements. These components can appear in the same request, but contextual facts are not themselves commands, and negative wording does not guarantee compliance.
In cloud applications, an application layer typically assembles context before invoking a model endpoint. A retrieval-augmented generation application searches an authorized document collection, selects relevant passages, and includes those passages alongside the user question. For an operations assistant, the context might contain the current incident timeline, recent deployment details, and excerpts from an approved runbook. The instruction could ask the model to propose diagnostic steps supported by those excerpts and identify missing information rather than guess.
Clear structure helps the model distinguish evidence from directions. Applications can use supported message roles, labeled sections, or delimiters to separate instructions, retrieved documents, and the user request. Document identifiers and timestamps help communicate provenance and freshness. However, formatting is not a security boundary: retrieved text can contain prompt-injection attempts that tell the model to ignore its instructions. Enforce document permissions before retrieval, treat external content as untrusted data, and independently validate sensitive actions.
Context has a finite capacity. A model's context window limits the tokens it can process, and many models require input and generated output to fit within a shared token budget. More context can increase input charges and processing latency, while irrelevant or contradictory passages can reduce answer quality. Select the most useful evidence, remove duplication, reserve capacity for the response, and evaluate whether summarization loses important conditions or exceptions.
Providing context does not retrain the model or automatically create persistent memory. Applications must supply or explicitly manage conversation history across requests. Context also does not guarantee factual answers: models can misinterpret evidence or generate unsupported details. Test factual support, permission boundaries, and behavior when evidence is absent or conflicting. Avoid placing unnecessary personal data or credentials in prompts, and review logging and retention settings because contextual information may also enter application traces.