---
title: "Prompt engineering"
description: "Prompt engineering is writing and testing instructions so an AI model gives accurate, useful answers. Techniques that work, mistakes, and a worked example."
url: https://ursy.com/wiki/prompt-engineering/
updated: 2026-11-24T23:41:40+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/prompt-engineering/
---

# Prompt engineering

> Prompt engineering is writing and testing instructions so an AI model gives accurate, useful answers. Techniques that work, mistakes, and a worked example.

**Prompt engineering is the craft of writing and testing the instructions you give an AI model so that its answers are accurate, useful and in the shape you need, time after time.** OpenAI’s guide calls it the process of writing effective instructions for a model. For a small business it is less about clever tricks and more about clear briefs, good examples and checking the output.

## What is prompt engineering? {#what-is-prompt-engineering}

A [prompt](https://ursy.com/wiki/prompt/) is the text you send to a [large language model](https://ursy.com/wiki/large-language-model/): the task, any background and any rules. Prompt engineering is improving that text on purpose, then testing whether the change helped. [Google](https://ursy.com/wiki/google/)’s [prompt design strategies](https://aistudio.google.com/docs/prompting-strategies) page describes prompt design as creating natural language requests that lead to accurate, high-quality responses. Anthropic’s [prompt engineering overview](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview) adds a step people skip: before you tune a prompt, define what success looks like and have a way to test against it.

## Why does it matter? {#why-does-it-matter}

The same model can give a sharp answer or a vague one depending on what you ask. OpenAI’s [prompt engineering guide](https://developers.openai.com/api/docs/guides/prompt-engineering) notes that model output is non-deterministic, so the same prompt can return different text each time. Good prompts narrow that spread. For a business that uses AI to draft product copy, answer emails or sort search data, that means less rework and fewer wrong facts.

## What does it mean for search? {#what-does-it-mean-for-search}

Many teams now use AI to draft pages. Google’s guidance on [using generative AI content](https://developers.google.com/search/docs/fundamentals/using-gen-ai-content) says AI can help with research and with structuring original content. It also warns that using AI to generate many pages without adding value for users may break its [scaled content abuse](https://ursy.com/wiki/scaled-content-abuse/) policy. The same page says to fact-check AI output and to review titles, meta descriptions, structured data and [alt text](https://ursy.com/wiki/alt-text/) before publishing. So the prompt is only step 1. A human edit, real facts and your own experience are what make the page [helpful content](https://ursy.com/wiki/helpful-content/) rather than [AI slop](https://ursy.com/wiki/ai-slop/). See [AI-generated content](https://ursy.com/wiki/ai-generated-content/) and [E-E-A-T](https://ursy.com/wiki/e-e-a-t/).

## What does it mean for AI answers? {#what-does-it-mean-for-ai-answers}

Turn it around. The people asking [ChatGPT](https://ursy.com/wiki/chatgpt/), Gemini or Claude about your trade are writing prompts too. Knowing how prompts work tells you what those assistants are trying to do: break the question down, look for sources and give a clear answer. Pages that state facts plainly, near the top, are easier to use. Writing for that reader is what [answer engine optimisation](https://ursy.com/wiki/answer-engine-optimisation/) means in practice. Studying the prompts your customers type is called [prompt research](https://ursy.com/wiki/prompt-research/).

## Which techniques work? {#which-techniques-work}

The 3 big model companies give similar advice in their own docs:

- **Be clear and direct.**  Anthropic’s [prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) suggest treating the model like a capable new colleague who knows nothing about your business. If a person would be confused by the prompt, the model will be too.
- **Explain why.**  The same page says giving the reason behind an instruction helps the model aim its answer.
- **Show examples.**  Google calls prompts with no examples zero-shot and prompts with a few examples few-shot, and recommends including examples. Anthropic suggests 3 to 5 varied examples. Keep their format identical.
- **Separate the parts.**  OpenAI and Anthropic both suggest Markdown headings or XML tags to keep instructions, context and examples apart.
- **Set a role.**  A short line in the [system prompt](https://ursy.com/wiki/system-prompt/), such as “You are an editor for a UK garden centre”, shapes tone and focus.
- **Give the source material.**  Paste the facts you want used. This is [grounding](https://ursy.com/wiki/grounding/), and it cuts [hallucination](https://ursy.com/wiki/ai-hallucination/). Anthropic advises putting long documents near the top, above the question.
- **Break big jobs down.**  Google suggests chaining prompts, where each step’s output feeds the next.
- **Say the format.**  A table, 5 bullets, under 60 words, British spelling.

## What can prompts not fix? {#what-can-prompts-not-fix}

A prompt cannot add facts the model does not have, past its [knowledge cutoff](https://ursy.com/wiki/knowledge-cutoff/), unless you supply them. Anthropic notes that some problems, such as cost or speed, are easier to solve by choosing a different model. For deep, repeated tasks, [fine-tuning](https://ursy.com/wiki/fine-tuning/) or [retrieval-augmented generation](https://ursy.com/wiki/retrieval-augmented-generation/) may be the better tool. Newer [reasoning models](https://ursy.com/wiki/reasoning-models/) also need less step-by-step hand-holding; OpenAI says they handle high-level goals well.

## Common mistakes {#common-mistakes}

- **No success test.**  Changing words with no way to tell if output improved.
- **Too little context.**  “Write a product description” with no product facts invites made-up details.
- **Too much at once.**  12 tasks in one prompt. Split them.
- **Trusting one good run.**  Output varies, so try the prompt on several inputs.
- **Publishing unchecked.**  Every fact, price and claim still needs a human check.
- **Pasting untrusted text as instructions.**  Web pages and emails can hide commands. See [prompt injection](https://ursy.com/wiki/prompt-injection/) and [AI guardrails](https://ursy.com/wiki/ai-guardrails/).

## A worked example {#a-worked-example}

A shop wants a meta description for a ceramic vase page.

| Version | Prompt | Typical result |
| --- | --- | --- |
| 1 | “Write a meta description for a vase.” | Generic, invents a size and a material |
| 2 | Adds the facts: 30 cm tall, stoneware, made in Stoke, hand glazed, £34 | Accurate but too long |
| 3 | Adds rules: under 155 characters, British spelling, no “best”, end with the price, plus 2 example descriptions from the shop | On-brand, right length, ready to check |

Version 3 is still a draft. Someone reads it against the product before it goes live. See [meta description](https://ursy.com/wiki/meta-description/) and [content brief](https://ursy.com/wiki/content-brief/).

## How to check it {#how-to-check-it}

1. Draft a structured prompt with our [Prompt Builder](https://ursy.com/webmaster-tools/prompt-builder/), then tighten it with the [Prompt Improver](https://ursy.com/webmaster-tools/prompt-improver/).
2. Estimate the size of long prompts with the [AI Token Cost Estimator](https://ursy.com/webmaster-tools/ai-token-cost-estimator/). See [AI tokens](https://ursy.com/wiki/ai-tokens/) and [context window](https://ursy.com/wiki/context-window/).
3. Check AI drafts with the [AI Writing Checker](https://ursy.com/webmaster-tools/ai-writing-checker/) and the [Readability Checker](https://ursy.com/readability-checker/) before you edit.
4. Before feeding a web page into a prompt, scan it with the [Prompt Injection Checker](https://ursy.com/prompt-injection-checker/).
5. In URSY Pro, the [Content brief builder](https://ursy.com/pro/content-brief-builder/) (Pro) and [Prompt injection guard](https://ursy.com/pro/prompt-injection-guard/) (Pro) are being built.

## Questions {#questions}

### Do I need to learn code? {#do-i-need-to-learn-code}

No. Most prompting is plain writing. Code helps only when you call a model from your own scripts.

### Is a longer prompt always better? {#is-a-longer-prompt-always-better}

No. Add what the model needs: facts, rules and examples. Cut repetition.

### Will Google penalise AI-written pages? {#will-google-penalise-ai-written-pages}

Google judges the page, not the tool. Mass pages with no added value can break its spam policies; reviewed, original pages are treated like any other.

## Related words {#related-words}

- [Prompt](https://ursy.com/wiki/prompt/)
- [System prompt](https://ursy.com/wiki/system-prompt/)
- [Prompt injection](https://ursy.com/wiki/prompt-injection/)
- [Grounding](https://ursy.com/wiki/grounding/)
- [Generative AI](https://ursy.com/wiki/generative-ai/)

## Sources {#sources}

- [OpenAI: Prompt engineering guide](https://developers.openai.com/api/docs/guides/prompt-engineering), checked 24 November 2026
- [Anthropic: Prompt engineering overview](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview), checked 24 November 2026
- [Anthropic: Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices), checked 24 November 2026
- [Google AI Studio: Prompt design strategies](https://aistudio.google.com/docs/prompting-strategies), checked 24 November 2026
- [Google Search Central: Guidance on using generative AI content](https://developers.google.com/search/docs/fundamentals/using-gen-ai-content), checked 24 November 2026

*Updated 24 November 2026 by URSY.*
