Prompt
A prompt is the input context supplied to a generative model to communicate a task, evidence, constraints, examples, or desired output.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/prompt/
01What 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.[1][2]
- Application instructionsIntended behavior, constraints, and tool boundaries
- Task evidenceRetrieved data, documents, state, and provenance
- DemonstrationsOptional examples that clarify desired behavior
- Conversation contextRelevant prior turns and tool results
- Current user inputImmediate request, content, and supplied constraints
Prompt layers may have different authority in a product, but no prompt guarantees truth, safety, or compliance; deterministic controls must enforce critical rules.
02Why 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.
03When 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.
04How it works
- State the task, intended audience, relevant context, and definition of a successful output.
- Separate instructions from untrusted content and include only evidence needed for the task.
- Specify constraints and an output structure the application can validate.
- Add representative examples only when they improve measured behavior.
- Version the prompt and test it with normal, edge, multilingual, and adversarial inputs.
05A 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.
06Where 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.
07Sources
- Prompt EngineeringOpenAI · Official documentationPrompt Engineering
- Introduction to PromptingGoogle Cloud · Official documentationIntroduction to Prompting