Artificial Intelligence

What Is Prompt Engineering? A Practical Guide With Examples

What prompt engineering is, the 6 parts of a strong prompt and before-and-after examples for common business tasks you can copy and adapt.

Quick answer

Prompt engineering is the practice of writing and refining instructions for AI models so they produce accurate, useful output. Good prompts state the task, audience, context, constraints and output format, and often include an example. For business tasks, the biggest gains come from adding real context and specifying exactly what a good answer looks like.

What Is Prompt Engineering? A Practical Guide With Examples

Photo: Unsplash

On this page

You ask an AI tool to “write a follow-up email to a client,” and you get something stiff, generic and too long. You try again and get a different, equally unhelpful version. The model is not the problem. The prompt is.

Prompt engineering is the skill of telling an AI model exactly what you need so it gets it right the first time, or close to it. It sounds technical, but most of it is clear writing. This guide explains what prompt engineering is, breaks a strong prompt into 6 parts and gives before-and-after examples for everyday business tasks you can copy and adapt.

Prompt engineering in plain English

A prompt is the input you give a language model: your question, instructions and any material you paste in. Prompt engineering is the process of designing and improving that input to get better results.

Google’s Gemini documentation describes prompt design as creating natural language requests that “elicit accurate, high quality responses” from a model. OpenAI, Anthropic and Google all publish prompting guides, and their advice overlaps heavily: be clear and specific, provide context, show examples, define the output format and break complex jobs into steps.

There are 2 levels to it:

  • Everyday prompting: what you type into ChatGPT, Gemini, Claude or Copilot to get a task done.
  • Prompt engineering for apps: writing the standing instructions, often called a system or developer prompt, that shape every response in a chatbot, custom assistant or automated workflow.

The principles are the same at both levels. The second just needs more testing.

The 6 parts of a strong prompt

You do not need all 6 every time, but the more of them you include, the less the model has to guess.

Part What it does Example
Task States exactly what to do “Draft a reply to this customer email”
Context Gives the background the model can’t know “We ship in 3–5 business days; this order was delayed by a carrier issue”
Audience and role Sets voice and level of detail “Write as our support lead to a frustrated first-time customer”
Constraints Sets limits and rules “Under 120 words. No discounts. Don’t blame the carrier by name”
Format Defines the shape of the output “Subject line, then 3 short paragraphs”
Example Shows what good looks like A past reply your team liked

Key takeaway: Most bad AI output comes from missing context, not a weak model. Before rewriting a prompt for the third time, ask what the model would need to know to answer like your best employee.

Before-and-after prompt examples

Each example below shows a typical first attempt and an improved version. Replace the bracketed parts with your details.

Customer email reply

Before: Write a reply to this angry customer.

After: ``` You are the customer support lead for [Company], a small online home goods store. Draft a reply to the customer email below.

Context: Their order shipped 4 days late because of a warehouse backlog. It is now in transit and should arrive by [date]. Our policy allows free return shipping but no automatic discounts.

Rules: Apologize once, explain briefly, give the new delivery date, and offer free return shipping if they no longer want the item. Under 120 words. Warm, plain English.

Format: Subject line, then the email body.

Customer email: “”” [paste email] “”” ```

The improved version supplies the facts, the policy limits and the tone, so the model does not invent a discount or a reason.

Meeting notes to action items

Before: Summarize these meeting notes.

After: ``` Turn the meeting notes below into a recap for the project team.

Format: 1. Decisions made (bullets) 2. Action items as a table: Task | Owner | Due date 3. Open questions (bullets)

Rules: Use only what is in the notes. If an owner or due date is missing, write “Not assigned” rather than guessing. Keep it under 200 words.

Notes: “”” [paste notes] “”” ```

Telling the model what to do with missing information is one of the most effective lines you can add.

Marketing copy with an example

Before: Write social posts for our new product.

After: ``` Write 3 LinkedIn posts announcing [product], a scheduling app for dental offices.

Audience: Practice managers at small dental offices in the US. Key benefit: Fewer no-shows through automatic text reminders. Tone: Practical and confident, no hype words, no emoji. Length: 60–90 words each, ending with a question to invite comments.

Here is a past post our audience liked, for style only: “”” [paste example post] “”” ```

Including 1 or 2 examples, known as few-shot prompting, is recommended in Google’s and OpenAI’s guides because the model picks up the pattern in tone, length and structure.

Pulling data from documents

Before: What are the important details in these invoices?

After: ``` Extract the following fields from each invoice below and return a table with these columns: Vendor | Invoice number | Invoice date | Due date | Total (USD).

Rules: Use the exact values shown. If a field is missing, leave the cell blank. Do not calculate or estimate anything. After the table, list any invoice that looks like a duplicate.

Invoices: “”” [paste text] “”” ```

Precise column names and a “do not estimate” rule make the output easy to paste into a spreadsheet and easy to check.

Policy question with a source

Before: Can employees work remotely from another state?

After: ``` Answer the employee question below using only the policy text provided.

Format: A 1–2 sentence answer, then the exact policy section that supports it. If the policy does not cover the question, say “The policy doesn’t address this” and suggest contacting HR.

Question: Can I work remotely from another state for 2 months?

Policy: “”” [paste remote work policy] “”” ```

Grounding the answer in supplied text and asking for the supporting quote cuts down on confident made-up answers. This idea, scaled up with search, is the basis of retrieval-augmented generation.

Techniques that consistently help

Beyond the 6 parts, a few techniques show up in every major vendor’s guidance:

  • Separate instructions from material. Use clear markers, like triple quotes, headings or XML-style tags, so the model knows where your instructions end and the pasted content begins.
  • Break big jobs into steps. Ask for an outline first, then each section, or run 1 prompt per step and feed each result into the next. Google’s guide calls this breaking down prompts; Anthropic’s calls it prompt chaining.
  • Start the output for it. Beginning the response, such as the first row of a table or an opening brace for JSON, nudges the model to follow the format.
  • Ask it to check its work. For analysis, ask the model to list its assumptions or verify each figure against the source before giving a final answer.
  • Match the model. OpenAI’s guide notes that reasoning models handle high-level goals well, while other models do best with precise, explicit instructions.
  • Iterate on purpose. Change 1 thing at a time and compare results, rather than rewriting everything.

When prompt engineering is not the answer

Anthropic’s documentation makes a useful point: before prompt engineering, define what success looks like and how you will test it. Not every problem is a prompt problem. Some are better solved by:

  • A different model, when you need lower cost or faster responses.
  • Better data access, when the model lacks facts. Connect it to your documents instead of pasting them every time.
  • A custom assistant, when the same instructions repeat daily. Our guide on how to build a custom GPT or AI assistant shows how to save them once.
  • Human review, when mistakes are costly. No prompt makes a model perfectly accurate.

Prompt safety basics

Prompts can also be attacked. The OWASP Top 10 for LLM Applications lists prompt injection as the number 1 risk in its 2025 edition. It happens when text the model reads, such as an email, web page or uploaded file, contains instructions that change the model’s behavior.

For everyday users:

  • Do not paste passwords, customer personal data or confidential contracts into tools your company has not approved.
  • Treat AI output that came from outside content, like a summarized email, with healthy suspicion.
  • For apps and agents, require human approval for actions such as sending, deleting or paying.

Where to start: build a team prompt library

The fastest way to improve AI results across a team is to stop everyone from starting from scratch:

  1. Collect. Ask each team member for the 3 prompts they use most.
  2. Improve. Rewrite each using the 6 parts above, and test it on 3 real examples.
  3. Store. Keep the best versions in a shared document or your AI platform’s saved prompts feature, with a note on when to use each one.
  4. Review. Revisit the library each quarter or when you change AI tools, since model updates can change results.

For more ways small teams put AI to work, see our guide to generative AI for small business, and for the fundamentals, read what generative AI is.

The bottom line

Prompt engineering is mostly clear communication. Tell the model the task, give it the context it can’t know, set the rules and format, and show an example when you can. Test prompts on real work, save the ones that perform and remember that some problems need better data or human review rather than a cleverer prompt.

Sources

Questions readers ask

Frequently asked questions

What is prompt engineering in simple terms?

Prompt engineering is writing clear, specific instructions for an AI model so it gives you useful results. It means stating the task, adding context the model cannot know, setting rules and length limits, defining the output format and often showing an example. It is less about tricks and more about communicating precisely, the way you would brief a capable new employee.

Is prompt engineering still worth learning in 2026?

Yes. Models are better at understanding vague requests, but clear context, constraints and format still produce noticeably better and more consistent output. The skill matters most for repeated tasks, custom assistants and automated workflows, where 1 well-tested prompt runs hundreds of times. It is also a core skill for anyone building AI features into products.

What is an example of a good prompt?

A good prompt reads like a short brief: "You are our support lead. Draft a reply to the customer email below. The order was delayed by a warehouse backlog and will arrive Friday. Apologize once, offer free return shipping, stay under 120 words and use a warm, plain tone." It states the role, task, facts, rules and length.

What is few-shot prompting?

Few-shot prompting means including a few examples of the input and the output you want inside the prompt. The model picks up the pattern, such as tone, length or table structure, and applies it to the new task. Google's and OpenAI's guides both recommend it. Keep examples consistent in format and use only a few, so the model does not copy them too closely.

Is prompt engineering a real job?

Some companies hire for prompt engineering, but it is more often a skill inside broader roles such as AI engineer, product manager, content strategist or support operations lead. People who design, test and maintain prompts for AI features usually also handle evaluation, data access and integration. Treat it as a valuable skill rather than a standalone career path.

How long should a prompt be?

A prompt should be as long as it needs to be to remove guesswork, and no longer. A quick question may need 1 sentence. A business task often needs a short paragraph of context plus rules and format. Standing instructions for a custom assistant can run several hundred words. Cut anything that does not change the output.

Can a prompt stop AI from making things up?

No prompt fully prevents errors, but you can reduce them a lot. Tell the model to answer only from the material you provide, to say when it doesn't know and to quote or cite the source for each claim. Then check important facts yourself. For recurring questions, connecting the model to approved documents works better than pasting text each time.

Reader reviews

Was this guide useful

No reviews yet. Share your experience and help other readers.

Write a review
Your rating
Never shown publicly

Reviews are checked before they appear. We never show your email. Please review only places or services you have used.

Manishdai
Written by

Manishdai

Manishdai writes about the technology that is reshaping every industry — from AI agents and cloud platforms to healthtech, fintech and the IT companies building it all across the United States.