📑 Table des matières

Le guide ultime du prompt engineering en 2025

Prompting 🟢 Débutant ⏱️ 11 min de lecture 📅 2026-02-24

Prompt engineering has become an essential skill in 2025. Whether you're using Claude, GPT-4 or an open-source model via OpenRouter, the quality of your results depends directly on the quality of your instructions. This guide gives you all the fundamentals to master the art of prompting.

🎯 What is Prompt Engineering?

Prompt engineering is the art of crafting clear and precise instructions to get exactly what you want from an artificial intelligence. It's not programming in the traditional sense — it's more of a form of structured communication with a machine.

In 2025, language models are incredibly powerful. Claude can write essays, analyze data, write code and much more. But even the most advanced model can't read your mind. That's where prompt engineering comes in.

Why It's Crucial

Imagine asking a human assistant: "Do something about marketing." You'd probably get something vague and unsuitable. Now imagine saying: "Write a 3-month marketing plan for a B2B SaaS startup with a budget of $5,000/month, targeting small and medium businesses." The difference is obvious.

With AI, it's exactly the same. A good prompt can multiply the quality of the response by 10.

The Evolution of Prompting

Period Approach Result
2022 Simple prompts, one line Generic responses
2023 Detailed instructions Better relevance
2024 Structured prompts + roles Professional responses
2025 Orchestrated multi-prompt systems Expert-level results

🧱 The 4 Pillars of a Good Prompt: RCTF

Every good prompt rests on four fundamental elements that we call the RCTF framework:

1. Role (R)

Assigning a role to the AI gives it a frame of reference. It's like telling an actor which character to play.

❌ Bad: "Explain SEO to me"

✅ Good: "You are an SEO expert with 15 years of experience in French e-commerce. Explain the fundamentals of technical SEO to me."

The role activates different "thinking modes" in the model. An "SEO expert" won't respond the same way as a "marketing professor for beginners."

Examples of effective roles:
- "You are a senior Python developer specializing in data science"
- "You are an SEO web copywriter for the French-speaking market"
- "You are a business strategy consultant for early-stage startups"

2. Context (C)

Context provides the necessary background information. Without context, the AI makes assumptions — often wrong ones.

❌ Without context:
"Write a follow-up email"

✅ With context:
"My company sells accounting software to small and medium businesses.
A prospect attended our webinar 2 weeks ago but hasn't responded
to our first email. He is the CFO of a 50-person company."

Context should include:
- Who you are (your company, your role)
- Who you're addressing (target audience)
- The situation (where you are in the process)
- Constraints (budget, timeline, format)

3. Task (T)

The task is the precise action you're requesting. It should be specific, measurable and clear.

Vague: "Help me with my website"Precise: "Analyze my homepage (URL: example.com)
and suggest 5 concrete improvements to increase the
conversion rate, focusing on copywriting and CTAs."

Tip: Use precise action verbs: "write," "analyze," "compare," "list," "create," "summarize" rather than "tell me about" or "help me with."

4. Format (F)

Specifying the output format avoids unpleasant surprises and makes the result immediately usable.

 With specified format:
"Present your answer as:
- A comparison table of the 3 options
- For each option: advantages (3 points), disadvantages (3 points), estimated cost
- A final recommendation in 2-3 sentences
- Markdown format"
Requested format Use case
Table Comparisons, structured data
Bullet list Recommendations, steps
Paragraphs Articles, explanations
Code Scripts, templates
JSON/YAML Structured data for integration

📝 Complete Before/After Examples

Let's look at concrete transformations from mediocre prompts to excellent ones.

Example 1: Content Writing

 BEFORE:
"Write an article about AI" AFTER:
"Role: You are a tech journalist specializing in artificial
intelligence, writing for a mainstream magazine.

Context: Your audience consists of non-technical professionals
(managers, entrepreneurs) who want to understand AI's impact
on their business.

Task: Write an 800-word article about 5 concrete applications
of generative AI that are transforming small businesses in 2025.

Format:
- Catchy title
- Introduction (100 words)
- 5 sections with subheadings
- For each application: description, concrete example of a
  real company, quantified benefit
- Conclusion with call-to-action
- Tone: professional but accessible, no jargon"

Example 2: Data Analysis

 BEFORE:
"Analyze these sales figures" AFTER:
"Role: You are a senior business analyst.

Context: Here are the quarterly sales figures for our
organic products e-commerce (in K$):
Q1: 120, Q2: 95, Q3: 145, Q4: 210
Previous year: Q1: 100, Q2: 110, Q3: 130, Q4: 180

Task: Analyze this data and identify:
1. Trends (growth, seasonality)
2. The problematic quarter and explanatory hypotheses
3. Forecasts for the next 2 quarters

Format: Summary table + bullet-point analysis + 3
actionable recommendations"

Example 3: Code

 BEFORE:
"Build me an API in Python"

 AFTER:
"Role: You are a senior Python backend developer.

Context: I'm building a REST API for a task management
application (todo app). Stack: Python 3.12, FastAPI,
SQLAlchemy, PostgreSQL. The API will be deployed on a
[Hostinger](/out?id=7) VPS.

Task: Create the complete CRUD endpoint for tasks with:
- Model: id, title, description, status (todo/in_progress/done),
  created_at, updated_at
- Pydantic validation
- Clean error handling
- Pagination on GET /tasks

Format: Complete, working Python code with explanatory comments.
Include a test example with pytest."

⚡ Essential Techniques for Beginners

The "Step by Step" Technique

Asking the AI to proceed step by step significantly improves response quality, especially for complex tasks.

"Solve this problem step by step:
[your problem]

Show your reasoning at each step before giving
the final answer."

The Example Technique (Basic Few-Shot)

Giving one or two examples of what you expect is often more effective than lengthy explanations.

"Transform these titles into SEO-friendly titles.

Example:
- Input: 'How AI changes everything'
- Output: 'Artificial Intelligence: 7 Concrete Transformations for Your Business in 2025'

Now transform:
- 'The basics of digital marketing'
- 'Why the cloud matters'"

The Negative Constraints Technique

Saying what you DON'T want is sometimes as important as saying what you do want.

"Write a sales presentation for our CRM software.

DO NOT:
- Use technical jargon
- Exceed 10 slides
- Include prices (they'll be discussed in meetings)
- Use superlatives ('the best', 'revolutionary')

DO:
- Focus on concrete benefits
- Include 3 case studies with numbers
- End with an open question"

🔄 The Iteration Cycle

Prompt engineering isn't a one-shot. It's an iterative process:

  1. Initial prompt → Approximate result
  2. Analysis → What's missing? What's too much?
  3. Refinement → Adjust the prompt
  4. Re-test → Evaluate the improvement
  5. Repeat until satisfied

Pro tip: Keep a history of your prompts and their results. When you find a prompt that works well, save it as a template (we'll explore this in detail in our article about prompt libraries).

Progressive Refinement in Practice

# Iteration 1 - Too vague
"Write a landing page"

# Iteration 2 - Better but lacks context
"Write the copy for a landing page for a SaaS tool"

# Iteration 3 - Good but format not specified
"You are an expert copywriter. Write the copy for a landing page
for a project management SaaS tool targeting web agencies
of 10-50 people."

# Iteration 4 - Complete ✅
"You are an expert B2B SaaS copywriter.
Write the copy for a landing page for a project management
tool targeting web agencies of 10-50 people.

Structure:
- Hero section (headline + subtitle + CTA)
- 3 benefit sections with icons
- Social proof section (3 realistic fictional testimonials)
- FAQ (5 questions)
- Final CTA

Tone: professional, dynamic, results-oriented.
The headline must contain a number.
Total length: ~1000 words."

🛠️ Tools That Make Prompt Engineering Easier

In 2025, several tools and platforms make prompt engineering work easier:

Tool Usage Advantage
Claude Advanced AI assistant Excellent long context understanding
OpenRouter Multi-model access Test the same prompt on different LLMs
OpenClaw AI automation Orchestrate prompt chains

Testing on Multiple Models

A prompt doesn't work the same way on all models. Use OpenRouter to test the same prompt on Claude, GPT-4, Llama and compare results. It's the best way to write robust prompts.

Automating with OpenClaw

OpenClaw lets you create workflows where multiple prompts chain together automatically. For example:
1. A first prompt analyzes a document
2. A second prompt generates a summary
3. A third prompt creates action items

Everything runs automatically, turning your prompts into real productivity tools. The source code is available on GitHub.

🎓 Classic Mistakes to Avoid

1. The Overly Long Prompt

More isn't always better. A 2,000-word prompt with contradictory instructions will produce worse results than a concise, structured 200-word prompt.

2. Ambiguous Instructions

❌ "Make something good" → Subjective, not measurable
✅ "Write a 500-word text, middle-school reading level,
    with at least 3 concrete examples" → Objective, verifiable

3. Forgetting the Output Format

If you don't specify the format, the AI will choose for you — and it won't always be what you wanted.

4. Not Iterating

The first prompt is rarely the right one. Prompting professionals go through 3-5 iterations on average before getting an optimal result.

5. Ignoring "Temperature"

Temperature controls the model's creativity:
- Low temperature (0-0.3): factual, consistent, predictable responses
- Medium temperature (0.4-0.7): good balance of creativity/consistency
- High temperature (0.8-1.0): creative, varied, sometimes surprising responses

Adapt the temperature to your task: low for code or analysis, high for brainstorming or creative work.

📊 The Perfect Prompt Checklist

Before sending your prompt, check these points:

  • [ ] Role clearly defined
  • [ ] Context sufficiently provided
  • [ ] Task specific and measurable
  • [ ] Format of output specified
  • [ ] Examples included if necessary
  • [ ] Constraints (length, tone, what not to do)
  • [ ] Quality criteria made explicit

🚀 Where to Start Concretely

  1. Choose a recurring use case: a typical email, a report format, an analysis you do often
  2. Write your first RCTF prompt following the framework
  3. Test and iterate: adjust based on results
  4. Save your best prompts for reuse
  5. Explore advanced techniques: Chain-of-Thought, Few-Shot, Tree-of-Thought (see our dedicated article)

Prompt engineering is a skill that improves with practice. Every interaction with a model like Claude is an opportunity to refine your technique. Start simple, stay structured, and iterate.

AI is an extraordinary tool — but like any tool, its power depends on the person using it. With the right prompting techniques, you're on track to get the most out of it.