Glossary / AI and Machine Learning

Prompt Engineering

The art and science of writing instructions that get reliable, useful outputs from AI systems.

Definition

Prompt engineering is the practice of designing and refining the instructions given to large language models to get reliable, accurate, and useful outputs. It involves techniques such as providing examples (few-shot prompting), specifying output formats, setting constraints, and breaking complex tasks into smaller steps to guide AI behaviour in production systems.

Why prompt engineering matters

The same AI model can give wildly different results depending on how you ask. A vague prompt gets a vague answer. A well-engineered prompt gets a consistent, reliable, production-quality output every time. For businesses using AI in customer-facing systems, the difference between a good prompt and a bad one is the difference between a useful tool and a liability.

Key prompt engineering techniques

TechniqueWhat it doesWhen to use itExample
Zero-shotAsk the AI directly with no examplesSimple, well-known tasks"Summarise this email in one sentence"
Few-shotProvide 2 to 5 examples of desired outputWhen you need a specific format or style"Here are 3 examples of how we respond to refund requests..."
Chain of thoughtAsk the AI to reason step by stepComplex decisions, multi-step logic"Think through this step by step before answering"
Role assignmentTell the AI to act as a specific personaCustomer service, expert advice"You are a customer service agent for a property company"
Output formattingSpecify the exact format of the responseStructured data, JSON, tables"Respond in JSON with fields: name, category, priority"
Constraint settingDefine what the AI should NOT doSafety, accuracy, brand protection"Never make up information. If unsure, say you don't know"

Prompt engineering vs coding

FactorTraditional codingPrompt engineering
PrecisionExact, deterministic outputProbabilistic, needs guardrails
Skill requiredProgramming language knowledgeClear writing, domain expertise
Iteration speedWrite, compile, testWrite, run, refine in minutes
MaintenanceCode updatesPrompt updates (faster)
Edge casesMust be explicitly handledAI can handle novel situations but less predictably

What does prompt engineering cost?

ScopeCost rangeWhat you get
Single use case£500 to £1,500Optimised prompts for one workflow (e.g. lead qualification, email triage)
Full system£1,500 to £5,000Complete prompt library for a chatbot or AI agent with testing and documentation
Ongoing optimisation£500 to £1,000/monthMonthly prompt refinement based on real usage data and edge cases

When NOT to rely on prompt engineering alone

  • When accuracy is critical: For tasks where wrong answers have serious consequences, combine prompt engineering with RAG (grounding in real data) and human review
  • When you need consistency at scale: Prompts can produce slightly different outputs each time. For production systems handling thousands of interactions, add structured output validation
  • When domain knowledge is specialised: If the AI needs to know your specific products, policies, or processes, prompt engineering alone is not enough. Add RAG or fine-tuning.

Related Terms

  • AI Agent - Software that acts on your behalf, making decisions and completing multi-step tasks without constant human oversight.
  • Agentic AI - AI systems that act autonomously to achieve goals, making decisions and executing multi-step plans.
  • AI Chatbot - An AI-powered conversational interface that handles customer questions and qualifies leads around the clock.
  • RAG (Retrieval Augmented Generation) - The technique that makes AI accurate by grounding it in your specific business data.

Ready to put AI to work in your business?

Book a free 30-minute discovery call. We will review your AI use cases, assess whether better prompts could improve your results, and recommend the right approach for your specific needs.

Frequently Asked Questions

Common questions about prompt engineering.

Do I need to learn prompt engineering to use AI in my business?

Not if you work with an agency that builds AI systems. The prompt engineering is done during development and baked into the system. Your team just uses the finished product. However, understanding the basics helps you communicate what you want and evaluate whether the AI is performing well.

Can prompt engineering make free AI tools work like expensive custom solutions?

To a point. Good prompts can dramatically improve results from any AI model. But for production business use, you also need consistent output formatting, error handling, system integrations, and monitoring, none of which prompt engineering alone provides. Think of prompts as the steering wheel, but you still need the rest of the car.

How often do prompts need updating?

In production systems, prompts should be reviewed monthly based on real usage data. Look at cases where the AI gave unexpected responses, identify patterns, and refine the prompts accordingly. When AI models are updated (which happens regularly), prompts may also need adjustment as the model's behaviour can change.