What Is Prompt Engineering?

Also called: Prompt design

Related problems: AI tools giving inconsistent or generic answers; Staff getting poor results from AI and giving up on it; AI output in the wrong format for our systems; Getting AI tools to follow our tone, format and rules

Prompt engineering is the practice of designing, writing and testing the instructions, examples and context given to an AI model to make its output more accurate, useful and consistent. A prompt can be a single question typed into a chat tool, or a detailed set of instructions inside a business application that tells a large language model (LLM) what role to play, what sources to use, what rules to follow and what format to return. Prompts shape a model’s behaviour but can’t by themselves make it dependable, so business business use also needs checks outside the model. Prompt engineering ranges from everyday skill in using AI assistants to structured, tested work by teams building AI features.

At a glance

  • A prompt is the input that steers an AI model: instructions, context, examples and the question itself.
  • Clear goals, relevant context, examples and a defined output format usually improve results.
  • In business applications, a hidden “system prompt” often sets rules the user may not see; models usually follow them but can’t be relied on to, so format, permission and policy checks also sit outside the model.
  • Prompts need testing and version control, because the same prompt can behave differently when the model changes.
  • Prompt engineering is legitimate design work; prompt injection is an attack that tries to subvert it.

What problem it solves

Generative AI models respond to whatever they are given. A vague request gets a generic answer; a request missing key facts gets a guess. Staff who try an AI tool with short, unclear prompts often get poor results and conclude the tool doesn’t work.

For organizations building AI into their processes, the stakes are higher. A customer service assistant must answer in a set tone, stick to approved policies and hand off when unsure. A document-processing step must return data in an exact format another system can read. Prompt engineering is how teams shape a general-purpose model’s behaviour for those jobs, often before spending money on fine-tuning or a different model. Prompts alone can’t make a model dependable or enforce policy, though. That takes controls outside the model: validating output against the required format, checking permissions in the systems the AI calls, filtering or reviewing outputs, testing against a set of evaluation cases, and fallback or handoff rules for when the model fails or is unsure.

How it works

Clear instructions. Good prompts state the task, the audience, the constraints and what a good answer looks like, for example “Summarize this contract for a finance manager in five bullet points, noting renewal dates and termination terms.”

Context. Supplying the relevant facts, such as a policy, a customer record or a set of documents, gives the model something to work from. Retrieval-augmented generation (RAG) automates this by looking up relevant content and inserting it into the prompt.

Examples. Showing the model one or more examples of the desired input and output (sometimes called few-shot prompting) helps it match a format or style.

Structure and roles. Many applications separate a system prompt, set by the builder, from the user’s message. The system prompt sets the role, rules and boundaries the model is asked to follow; anything that must be enforced, such as who may see which data, belongs in the application or the systems it connects to.

Testing and iteration. Teams build a set of test cases, compare outputs across prompt versions and models, and track changes. Instructing the model to say when it doesn’t know, or to cite its sources, can reduce AI hallucinations but does not remove them.

Security awareness. Because the model reads instructions and data in the same stream, untrusted content such as emails or web pages can contain hidden instructions. Prompt design can make this harder to exploit but is not a complete defence.

When it matters for buyers

  • When rolling out AI assistants. Short training on writing effective prompts often improves results more than switching tools; see AI assistant.
  • When building AI into a process. Customer-facing or automated uses need tested, versioned prompts plus controls outside the model: output validation, permission checks, evaluation and handoff to a person when needed.
  • When comparing vendors. Ask whether you can see and adjust the instructions behind a product’s AI features, or only the vendor can.
  • When models change. A provider’s model update can change how prompts behave; plan for re-testing.
  • When deploying agents. Agentic AI depends heavily on well-designed instructions, but what an agent can actually do should be limited by its permissions and approval steps, not by its prompt alone.

For help planning and sourcing AI tools, see our artificial intelligence overview.

Questions to ask vendors

  • Can we view and customize the system prompts or instructions behind your AI features?
  • How do you test prompt changes before releasing them, and will we be told when they change?
  • Do you provide prompt templates or a library for common tasks in our industry?
  • How do you guard against prompt injection from documents, emails or web content the AI reads, beyond the prompt itself?
  • What checks outside the model enforce output format, permissions and policy, and what happens when the model fails them?
  • Can we keep our own prompt versions and test results, and export them if we leave?
  • What training do you offer users on getting good results?

How it differs from prompt injection

Prompt engineering and prompt injection both work through the text a model reads, but they have opposite goals. Prompt engineering is done by the people building or using an AI tool, to make it more accurate and reliable. Prompt injection is an attack: someone plants instructions in a message, document or web page to make the model ignore its rules, leak data or take actions it shouldn’t. Careful prompt engineering, such as clearly separating instructions from untrusted content, can reduce the risk, but defending against injection also needs controls outside the prompt, such as limiting what the AI can access and do, filtering inputs and outputs, and requiring human approval for sensitive actions.

Frequently Asked Questions

Is prompt engineering the same as prompt injection?
No. Prompt engineering is the legitimate work of writing good instructions for an AI model. Prompt injection is an attack in which someone plants text that tries to override those instructions. Good prompt design can make injection harder, but it does not stop it on its own.
Do we need to hire a prompt engineer?
Usually not as a separate role. Most organizations build the skill into existing teams: developers and analysts who build AI features, and power users who write shared templates. Basic training for all users of AI tools often pays off more than one specialist.
Does prompt engineering stop AI from making things up?
It can reduce errors, for example by telling the model to answer only from supplied documents and to say when it doesn't know, but it can't eliminate them. Important outputs still need checking.
Will prompts that work today keep working?
Not necessarily. When the underlying model is updated or replaced, the same prompt can behave differently. Keep important prompts under version control and re-test them against example cases when models change.

You Don’t Need Another Sales Call. You Need an Answer.

30 minutes. No pitch. Just an honest conversation about where you are, what you need, and whether working together makes sense.

We use your details to set up and prepare for the call, and send the newsletter only if you ask for it. Privacy policy.