FR, version française
Home / Blog / AI for marketing / Prompt engineering: how to write an effective AI prompt

Prompt engineering: how to write an effective AI prompt

Prompt engineering means writing and adjusting the instructions given to a generative AI to get a result that meets your requirements. This guide compares the recommendations of Anthropic, OpenAI and Google, where they agree and where they disagree. It offers an eight-step method for writing a prompt like a brief, with an illustrative example. It holds viral recipes, from expert roles to politeness and tips, up against the Wharton School’s tests. Finally, it covers checking outputs, the data you should never enter according to France’s CNIL, and the team prompt library.

Key points

Prompt engineering means writing and adjusting the instructions (prompts) given to a generative AI so that it reliably produces a result that meets your requirements. In marketing, an effective AI prompt is written like a brief: objective, context, sources, format and examples. The rest is settled by testing on your own cases.

  • Guides: Anthropic, OpenAI and Google agree on clarity, context, examples and iteration; they differ on the number of examples and on roles.
  • Viral recipes: in the Wharton School’s tests (2025), expert roles, tips and threats generally do not improve accuracy; the effect of politeness varies with the question.
  • Checking: every output is reviewed before use, and no personal or confidential data goes into a consumer service (CNIL, July 18, 2024).

What is prompt engineering?

Prompt engineering is the practice of writing, testing and adjusting the instructions given to a generative AI model. It is the core skill of AI marketing: every use, from email subject lines to product descriptions, goes through an instruction.

Definition

OpenAI defines prompt engineering as “the process of writing effective instructions for a model, such that it consistently generates content that meets your requirements” (OpenAI API documentation, accessed on October 19, 2026). Google uses the term “prompt design” and stresses that “prompt engineering is iterative” (Gemini API guide, updated on October 13, 2026).

The same prompt can give two different answers: OpenAI calls prompting “a mix of art and science”.

Writing a prompt is not the same as optimizing to be cited by ChatGPT: that work belongs to GEO, as does answer engine optimization. In GEO, a prompt panel serves a different purpose: measuring a brand’s visibility, with fixed questions recorded at set intervals, not working instructions.

What is an AI prompt?

An AI prompt is the question or instruction addressed to a model. It is often longer and more precise than a query typed into a search engine, and it can contain context, documents and examples.

The instruction is not limited to the message you type: OpenAI describes system instructions that set the identity, rules, examples and context in advance. Claude Projects (five on the free plan) and Gemini Gems store reusable instructions.

What do Anthropic, OpenAI and Google recommend?

The three vendors agree on the basics: a clear instruction, context, examples, a specified format and repeated testing. Anthropic’s golden rule: “Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they’d be confused, Claude will be too.” OpenAI compares a reasoning model to “a senior co-worker” you give a goal to, and a GPT model to “a junior coworker” who needs explicit instructions.

PointAnthropicOpenAIGoogle
ContextProvide it, with the reason behind the instructionsData and documents preferably at the end of the promptAdd it rather than assume the model already has it
FormatSay what to do rather than what to avoidMarkdown and XML tags to separate the partsSpecify length and format; one structure per prompt
Long documentsDocuments at the top, question at the endContext near the end of the promptGemini 3: context first, question at the very end
ExamplesDocumentation: 3 to 5 varied examples; article: start with just oneExamples of inputs and expected outputsAlways include some, without overdoing it (risk of overfitting)
RoleDocumentation: a role, even a single sentence, changes behavior; article: heavy role prompting and XML tags less necessaryIdentity at the top of the instructionsWorkspace: assign a role to encourage creativity

Pages accessed on October 19, 2026; Gemini API guide updated on October 13, 2026; Google Workspace guide from December 2025.

30%

Placing documents at the top of the prompt and the question at the end improves response quality by up to 30% in Anthropic’s tests, especially with multiple documents (protocol not published).

Anthropic, Prompting best practices, Claude documentation, accessed on October 19, 2026

Two disagreements stand out: the number of examples, and roles, on which Anthropic’s documentation and its best practices article contradict each other. We do not settle the question: each guide describes its own vendor’s models, at a given date.

How do you write an effective prompt for marketing?

Write your prompt like a brief for a contractor who knows neither your brand nor your customers: objective, context, audience, tone, constraints, allowed sources and things to avoid. This is the method Elev8 Lab recommends. The Google Workspace guide keeps four components, Persona, Task, Context and Format, without requiring you to use all of them.

  1. Outcome: describe a good output and how to judge it (Anthropic’s success criteria).
  2. Context: describe the audience using your persona sheet and paste the rules of your editorial line rather than a tone adjective. Say why each instruction matters.
  3. Task: phrase it with a verb (write, sort, summarize), which Google Workspace calls “the most important part of a prompt”.
  4. Sources: provide product sheets, notes or approved figures, and ask the model to stick to them.
  5. Format: set length and structure; write “write in paragraphs” rather than “no lists”.
  6. Example: add a piece of your brand’s content that has already been used.
  7. Uncertainty: allow the model to say it does not know.
  8. Iteration: rephrase, change the order of the elements or split a complex task into several chained prompts.

Example: from a vague request to a complete brief

Illustrative example, built for this article: it does not come from any real campaign and is not linked to any result. Square brackets mark the variables.

Vague version: Write email subject lines to follow up on abandoned carts.

Complete version, in six blocks to paste in order:

  • Objective: “Suggest 5 subject lines for an abandoned cart follow-up email. A good subject line makes people want to open the email without promising a discount.”
  • Context: “We sell [product type] to [description of the audience]. Our tone: [three rules from the editorial line]. The email goes out [delay] after the cart is abandoned.”
  • Constraints: “[Number] characters maximum per subject line. No discount is planned: do not promise one.”
  • Examples: “Here are two subject lines we have already sent, in our tone: [subject line 1]; [subject line 2].”
  • Format: “Return a table with three columns: subject line, angle chosen, character count.”
  • Missing information: “If you are missing any information needed to follow these instructions, ask me before you start writing.”

Each block settles a question the model would otherwise decide on its own. These subject lines then go into your email marketing campaign.

Which prompting techniques actually work?

Three families of techniques recur in the guides: zero-shot (an instruction with no example) or few-shot (a few examples), step-by-step reasoning, and roles. Tests with a published method put the last two into perspective.

TechniqueWhat the guides sayWhat the tests say
Zero-shot and few-shot (described for GPT-3 by Brown et al., 2020)Google: without examples, a prompt is likely less effective; number of examples debatedNo test found in our sources
Step-by-step reasoning (Wei et al., 2022; Kojima et al., 2022)Anthropic prefers built-in extended thinking when availableMarginal or no gain for reasoning models, at the cost of more time and tokens (Wharton, June 8, 2025)
Role: “You are an expert in…”Anthropic’s documentation and Google Workspace in favor; Anthropic’s article more cautiousNo accuracy gain in general (Wharton, December 5, 2025)

These tests, run by the Generative AI Labs at the Wharton School (University of Pennsylvania), use difficult multiple-choice questions (GPQA Diamond, MMLU-Pro). They measure accuracy, not the quality of a marketing text.

Should you give the AI an expert role?

Not to gain accuracy. Across six models tested, Prompting Science Report 4 (Basil et al., December 5, 2025) concludes that expert personas generally did not improve accuracy compared with a prompt without a role; only Gemini 2.0 Flash is an exception. A role outside the question’s domain sometimes degrades the answers, and a low-knowledge role (“young child”) often does.

Key takeaway

A role can help with tone, the authors note, and Anthropic’s article advises “being explicit about what perspective you want”. Rather than “you are a marketing expert”, write for example: “explain this to a sales director who does not know SEO”.

Politeness, tips, threats: do they work?

None has a guaranteed effect. Being polite to the model sometimes improves performance and sometimes lowers it, depending on the question (Prompting Science Report 1, March 4, 2025). Promising a tip or threatening the model generally has no significant effect (Prompting Science Report 3, August 1, 2025); this report tested a claim made by Sergey Brin in May 2025.

“Think step by step” helps models without built-in reasoning a little, on average, but makes answers more variable: some questions answered correctly without the phrase fail with it (Prompting Science Report 2, June 8, 2025).

Tip

No formula has universal value, conclude the authors of the first report. Instead, compare two versions of the same prompt on several real cases from your business.

How do you check what the AI produces?

Review every output, ground it in sources you provide and remove any claim the model cannot support. When the task is finding a source, measured errors are frequent.

over 60%

Eight AI search tools gave incorrect answers to more than 60% of 1,600 queries asking them to find the article, publisher and URL of a news excerpt, ranging from 37% (Perplexity) to 94% (Grok 3).

Tow Center for Digital Journalism, AI Search Has a Citation Problem, Columbia Journalism Review, March 6, 2025

Anthropic describes three techniques on its Reduce hallucinations page: allow the model to say “I don’t know”; extract exact quotes from a long document before answering; back each claim with a quote and remove the others, for example in a press release drawn from product sheets. These techniques reduce hallucinations without eliminating them.

For recent or little-known facts, Google recommends the Gemini API’s Grounding with Google Search. In France, the CNIL (the data protection authority) advises checking outputs for accuracy, plagiarism and stereotypes, and never reproducing an output as is; for Google Workspace, “the final output is yours”.

Warning

Do not publish any figure, name or source suggested by a model without checking it against the primary source. This is the rule Elev8 Lab recommends, for a product description as much as for an article.

Style needs reviewing too: OpenAI’s guide to the GPT-6 model (accessed on October 19, 2026) provides a prompt against stock phrases such as “delve” or “leverage”. For content meant for search, Google’s position is detailed in our guide to SEO writing with AI.

What data should you never put in a prompt?

Only enter information you are authorized to share. The CNIL recommends never entering personal data, or company data covered by secrecy such as trade secrets, into a consumer AI service (CNIL questions and answers, July 18, 2024).

Warning

Customer files, named customer quotes, unpublished revenue: none of this belongs in a consumer tool. In France, if staff misuse the tool, the organization using it is generally legally liable; the CNIL recommends training teams on authorized and prohibited uses.

A second risk: prompt injection, defined in our SEO and GEO glossary. OWASP ranks it first among the risks of large language model applications (LLM01:2025). In its indirect form, instructions hidden in a web page or a file read by the AI take effect, even when they are invisible to a human. OWASP’s countermeasures: flag untrusted external content, limit the tool’s permissions, require human approval for high-risk actions.

The broader legal framework (AI Act, GDPR) is covered in our AI marketing guide.

How do you build a prompt library for your team?

Start from the tasks your team repeats, write a template prompt for each, test it, then date it. The CNIL itself suggests that organizations provide “prompts types” (template prompts) for identified, proven tasks.

  1. Tasks: choose recurring requests (email subject lines, SEM ads, product descriptions).
  2. Record: note the objective, the variables in square brackets, an example of good output, and the date and model of the last test.
  3. Test: try the prompt on several real cases before sharing it.
  4. Sharing: save it in the instructions of a Claude Project (shared within the organization on Team and Enterprise plans) or in a Gemini Gem.
  5. Review: retest it whenever the model changes; according to OpenAI, two versions from the same model family can produce different results.

Model names change fast, and OpenAI recommends testing production prompts before every change, like code. For a marketing team, the equivalent we suggest: a dated record and a new test before any update.

Prompt engineer: career of the future or basic skill?

For a marketer, prompt engineering is a basic skill. The Google Workspace guide says so: “You don’t have to be a prompt engineer to use generative AI.”

Anthropic presents “context engineering” as “the natural progression of prompt engineering” (Effective context engineering for AI agents, September 29, 2025). The work becomes “less about finding the right words and phrases for your prompts” and more about choosing the whole set of information given to the model: instructions, history, documents, tools. This is especially true for AI agents.

To learn: Anthropic’s free interactive tutorial (written for Claude 3, to be supplemented with its current documentation) and the Marketing section of the Google Workspace guide. We found no primary source on salaries or on the number of prompt engineer job offers in France.

Frequently asked questions

What is a prompt?

A prompt is the question or instruction addressed to a generative AI. An AI prompt is often longer and more precise than a search engine query.

Is a longer prompt better?

Not necessarily. For Anthropic, a longer and more complex prompt is not always better; Google Workspace asks you to be concise but specific. Start simple, then add only what improves the result.

Should you write “you are an expert” in a prompt?

Not for accuracy: in the Wharton School’s tests of December 5, 2025, the expert role generally did not improve the answers of six models. It can change the tone. Describe the expected audience and point of view instead.

What are the most used prompts in marketing?

We found no public statistics with a stated method to rank them. The Google Workspace guide (December 2025) gives illustrative examples by role: keywords and long-tail keywords for SEM, audience research, marketing plan, inbound campaign.

How do you become a prompt engineer?

Start with the vendors’ free resources: Anthropic’s interactive tutorial and the Google Workspace guide. We found no reliable figures on salaries or job offers in France.

Which AI should you choose to write your marketing prompts?

No ranking holds for every use: choose the tool your prompts have been tested on, because the same prompt does not give the same result from one model to another (OpenAI). Our selection of AI tools and SEO tools lists prices collected on September 24, 2026. Prompt engineering is then refined tool by tool.

Sources

  1. OpenAI, Prompt engineering, API documentation, undated page. Accessed on October 19, 2026.
  2. Google AI for Developers, Prompt design strategies, Gemini API documentation, updated on October 13, 2026. Accessed on October 19, 2026.
  3. Anthropic, Prompting best practices, Claude documentation, undated page. Accessed on October 19, 2026.
  4. Anthropic, Prompt engineering overview, Claude documentation, undated page. Accessed on October 19, 2026.
  5. Anthropic, Best practices for prompt engineering for 2026, article, date not displayed. Accessed on October 19, 2026.
  6. Google Workspace, Prompting guide, 2nd edition (PDF), December 2025. Accessed on October 19, 2026.
  7. OpenAI, Using GPT-6, API documentation, undated page. Accessed on October 19, 2026.
  8. Claude Help Center, What are projects?, undated page. Accessed on October 19, 2026.
  9. Gemini Apps Help, Use Gems in Gemini Apps, undated page. Accessed on October 19, 2026.
  10. Lennart Meincke et al. (Wharton School), Prompting Science Report 1: Prompt Engineering is Complicated and Contingent, arXiv, March 4, 2025. Accessed on October 19, 2026.
  11. Lennart Meincke et al. (Wharton School), Prompting Science Report 2: The Decreasing Value of Chain of Thought in Prompting, arXiv, June 8, 2025. Accessed on October 19, 2026.
  12. Lennart Meincke et al. (Wharton School), Prompting Science Report 3: I’ll pay you or I’ll kill you — but will you care?, arXiv, August 1, 2025. Accessed on October 19, 2026.
  13. Basil, Shapiro, Shapiro, Mollick, Mollick, Meincke (Wharton School), Prompting Science Report 4: Playing Pretend: Expert Personas Don’t Improve Factual Accuracy, arXiv, December 5, 2025. Accessed on October 19, 2026.
  14. Tom B. Brown et al. (OpenAI), Language Models are Few-Shot Learners, arXiv, May 28, 2020. Accessed on October 19, 2026.
  15. Jason Wei et al. (Google), Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, arXiv, January 28, 2022. Accessed on October 19, 2026.
  16. Takeshi Kojima et al., Large Language Models are Zero-Shot Reasoners, arXiv, May 24, 2022. Accessed on October 19, 2026.
  17. Anthropic, Reduce hallucinations, Claude documentation, undated page. Accessed on October 19, 2026.
  18. Klaudia Jaźwińska and Aisvarya Chandrasekar (Tow Center), AI Search Has a Citation Problem, Columbia Journalism Review, March 6, 2025. Accessed on October 19, 2026.
  19. CNIL, Les questions-réponses de la CNIL sur l’utilisation d’un système d’IA générative (in French), July 18, 2024. Accessed on October 19, 2026.
  20. OWASP Gen AI Security Project, LLM01:2025 Prompt Injection, 2025. Accessed on October 19, 2026.
  21. Anthropic Engineering, Effective context engineering for AI agents, September 29, 2025. Accessed on October 19, 2026.
Baptiste Clair Avatar

Digital marketing, SEO and GEO consultant

More about the author

Article checked and updated by the author. Sources consulted on the date shown.

Cite this article

Clair, B. (2026, November 7). Prompt engineering: how to write an effective AI prompt. Elev8 Lab. https://elev8-lab.fr/en/ai-marketing/prompt-engineering/