Skip to content

Prompt

A prompt is input provided to an AI model that supplies instructions, context, examples, source material, or other information used to guide its response.

A prompt is input provided to an AI model to guide the task, context, constraints, or output it should produce.

Prompts can include more than a single question.

OpenAI describes prompting as the process of providing input to a model and recommends treating production prompts as part of the application itself. OpenAI prompting guide

What a Prompt Can Contain

A prompt may include:

  • Instructions
  • User input
  • Background context
  • Examples
  • Source material
  • Output requirements
  • Constraints
  • Formatting rules
  • Retrieved information
  • Tool descriptions

In an application, several of these pieces may be assembled dynamically.

Prompt vs. User Message

The text a user types may be only one part of the complete prompt.

For example:

Application instructions
+
Retrieved company policies
+
User question
+
Output-format requirements
=
Model input

The user may only see the question.

The application supplies the rest.

Prompt Engineering

Prompt engineering is the process of designing and refining prompts so model behaviour is more consistent with the desired task.

Useful techniques can include:

  • Clear instructions
  • Relevant context
  • Examples
  • Defined output formats
  • Explicit constraints

But Prompt Engineering does not eliminate Hallucinations, fix poor source data, or replace AI Evaluation.

Why It Matters

Prompt changes can materially affect application behaviour.

For production systems, prompts should therefore be treated more like configuration or code than informal text typed once into a chatbot.

They may benefit from:

Common Problems

Common problems include:

  • Instructions are vague
  • Prompt contains irrelevant context
  • Examples contradict instructions
  • Important information placed outside the Context Window
  • Prompt grows indefinitely
  • Behaviour depends on undocumented wording
  • Prompt changes made without testing

How to Improve

Keep prompts focused on the actual task.

Separate:

  • Stable system behaviour
  • Dynamic business context
  • User input
  • Retrieved information

Then evaluate changes against representative examples.