# Prompt

A prompt is the input context supplied to a generative model to communicate a task, evidence, constraints, examples, or desired output.

- Type: artifact
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-26
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/prompt/>)

## What it means

A prompt is the collection of instructions and contextual material presented to a generative model for a particular interaction. It can include system and user messages, examples, retrieved passages, tool definitions, images, or other modalities. A prompt influences output but is not a deterministic program, a security boundary, or a substitute for application logic.

## Why it matters

Prompts are part of an AI product's behavior and should be designed, versioned, tested, and reviewed like other product artifacts. Clear task framing and relevant context can improve results, while ambiguous or conflicting content can produce silent and variable failures.

## When to use it

Use prompts to express tasks and context the model is suited to interpret. Put authorization, validation, calculations, state transitions, and irreversible business rules in deterministic code rather than relying on natural-language compliance.

## How it works

1. State the task, intended audience, relevant context, and definition of a successful output.
2. Separate instructions from untrusted content and include only evidence needed for the task.
3. Specify constraints and an output structure the application can validate.
4. Add representative examples only when they improve measured behavior.
5. Version the prompt and test it with normal, edge, multilingual, and adversarial inputs.

## A practical example

A support tool asks a model to draft a reply using approved policy excerpts. Its prompt identifies the task, marks customer text as untrusted, requires cited policy IDs and a structured response, and tells the model to return an escalation state when evidence is insufficient.

## Where it breaks

Prompt changes can have nonlocal and model-specific effects. Natural language remains ambiguous, long prompts consume context and cost, and instructions cannot reliably prevent prompt injection or guarantee truth. Provider updates can alter behavior without a prompt change.

## Common mistakes

- Embedding secrets, permissions, or critical business rules only in the prompt.
- Adding instructions repeatedly without measuring whether they improve target cases.
- Mixing trusted instructions and untrusted content without clear boundaries or downstream controls.
- Changing a production prompt without versioned regression evaluation.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/prompt/#visualization-prompt>)

## Sources

1. [Prompt Engineering](<https://developers.openai.com/api/docs/guides/prompt-engineering>) — OpenAI · Official documentation
2. [Introduction to Prompting](<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/introduction-prompt-design>) — Google Cloud · Official documentation

## Related topics

- [Prompt Engineering](<https://wiki.soroush.uk/topic/prompt-engineering/>)
- [System Prompt](<https://wiki.soroush.uk/topic/system-prompt/>)
- [Structured Output](<https://wiki.soroush.uk/topic/structured-output/>)
