Welcome to this first module dedicated to the fundamentals of prompt engineering. The objective is to provide you with a solid understanding of what this discipline is, its growing importance, and the central role it plays in our interaction with generative artificial intelligences.
Prompt engineering is the art and science of designing and optimizing instructions, called "prompts," to guide language models (LLMs) toward generating precise, relevant, and useful responses. It's a discipline that sits at the intersection of linguistics, computer science, and creativity.
Prompt engineering, also called "query engineering," is a technique that consists of providing detailed instructions to natural language processing (NLP) models in order to improve their performance. [1]
In essence, a prompt engineer acts as a translator or mediator between human intention and machine logic. Rather than simply asking a question, it involves formulating it in the most effective way possible so that the model understands not only the explicit request, but also the context, the desired output format, and the constraints to be respected.
The emergence of this discipline is directly linked to the advent of large language models like GPT-3 and its successors. As these models became increasingly powerful, it became evident that the quality of their results depended crucially on the quality of the instructions provided. Prompt engineering was thus born from the necessity to fully exploit the potential of these technologies.
The prompt engineer is a new profession whose contours are rapidly taking shape. Their main role is to ensure that the company gets the most out of the generative artificial intelligences it uses. This translates into several key missions.
| Mission | Description |
|---|---|
| Prompt Design and Writing | Create clear, precise, and effective queries to generate content (text, image, code, etc.) that meets a specific need. |
| Optimization and Iteration | Test, analyze, and refine prompts iteratively to improve the quality, reliability, and consistency of AI responses. |
| Training and Model Improvement | Participate in the continuous improvement of AI models by identifying their biases, limitations, and creating datasets for their training. |
| Training and Documentation | Write best practice guides, train other employees in the use of AI tools, and document the most effective prompts. |
To fulfill these missions, the prompt engineer must possess a varied set of skills, both technical and human.
Technical Skills:
Human Skills (Soft Skills):
Large language models are the engine of generative AI and the main tool of the prompt engineer. Understanding their functioning is essential for interacting effectively with them.
An LLM is a type of artificial neural network trained on very large amounts of textual data. The most common architecture today is the Transformer, introduced in 2017. This architecture allows the model to handle long-range dependencies in text and pay particular attention to certain words based on context (the "attention" mechanism).
The training process is generally done in two stages:
There is now a great variety of LLMs, developed by different companies and organizations. Here are some of the best known:
| Model | Developer | Notable Characteristics |
|---|---|---|
| GPT (Generative Pre-trained Transformer) | OpenAI | One of the most advanced and popular model families, known for its excellent text generation and reasoning capabilities. |
| Llama (Large Language Model Meta AI) | Meta | An open-source model family that has quickly gained popularity, fostering innovation and community research. |
| Gemini | A family of native multimodal models, capable of processing and understanding text, images, audio, and video simultaneously. | |
| Claude | Anthropic | Known for its emphasis on safety and ethics, with a "constitution" that guides its responses to be helpful, harmless, and honest. |
Each model has its own strengths, weaknesses, and "personality." Part of the prompt engineer's job is to understand these nuances to choose the right tool for the right task and adapt their prompts accordingly.
Now that we've laid the foundations of what prompt engineering is, it's time to dive into the heart of practice. This module is dedicated to the fundamental elements that constitute an effective prompt. Mastering these basics is the sine qua non condition for being able to then approach more complex techniques.
An effective prompt is not simply a question thrown at the model. It's a carefully constructed instruction that can contain several elements, each playing a specific role. While not all elements are necessary for every prompt, knowing them allows you to structure your thinking and build more robust queries.
A prompt can be broken down into four main components:
| Component | Role | Example |
|---|---|---|
| Role (Persona) | Instruct the model on the "personality" or expertise it should adopt. | "Act as a digital marketing expert..." |
| Instruction (Task) | Define the specific task the model must accomplish. | "...write a newsletter for the launch of a new product." |
| Context | Provide background information, constraints, or data necessary to perform the task. | "The product is a meditation app for overworked professionals. The tone should be soothing but professional." |
| Output Format | Specify the structure or format of the expected response. | "The newsletter should contain a catchy title, three paragraphs, and a call to action. All in Markdown format." |
By combining these elements, you go from a simple question like "write a newsletter" to a much richer and more directive prompt, which significantly increases the chances of getting a satisfactory result on the first try.
Beyond structure, the way the prompt is written has a major impact. Here are some of the recognized best practices, derived from the documentation of major AI labs and community experience.
1. Be Specific and Clear: Language models don't read minds. Ambiguity is their worst enemy. You must avoid vague descriptions and provide precise details about what you expect. For example, instead of saying "summarize this text," prefer "summarize this text in three key points, focusing on the financial implications."
2. Use Delimiters: To help the model clearly distinguish the different parts of your prompt (particularly to separate instructions from context or data), it's very effective to use delimiters. Triple quotes ('''), triple quotation marks ("""), or XML tags () are common choices.
'''{insert text to summarize here}'''
Summarize the text above in three sentences.
3. Give the Model Time to "Think": For complex tasks that require reasoning, forcing the model to give an immediate response can lead to errors. An effective technique is to ask it to detail its reasoning step by step before giving its final conclusion. This is the basis of the Chain-of-Thought technique that we'll see in more detail in the next module.
The instruction "Let's think step by step" added at the end of a prompt has proven remarkably effective at improving model performance on reasoning problems. [2]
4. Provide Examples (Few-Shot Prompting): If the task is new or complex, showing the model exactly what you expect through one or more examples (the "shots") is one of the most powerful techniques. This allows the model to understand the format, style, and level of detail expected.
The best way to learn is to practice. Here are some simple exercises to start applying the principles seen above. We encourage you to try them on the LLM of your choice.
Exercise 1: Simple Text Generation
Exercise 2: Question-Answering
Exercise 3: Document Summary
Task: Summarize a news article.
Improved prompt:
"You are an analyst tasked with creating a synthesis for your very busy manager.
Summarize the news article below in 3 key points, in bullet point format.
Focus only on the most important information and key figures.
'''{paste article here}'''"
By training with these exercises, you'll start to develop an intuition about how to formulate your requests to get the best possible results. It's this intuition, combined with structured knowledge of techniques, that makes a good prompt engineer.
After mastering the fundamentals, we'll now explore more sophisticated techniques. These methods allow you to unlock the true potential of LLMs, particularly for complex tasks that require reasoning, logic, or great precision. This module will give you the tools to transform average responses into exceptional results.
These two techniques are fundamental and describe the number of examples provided to the model in the prompt.
Zero-Shot Prompting: This is the simplest form of prompting. You ask the model to perform a task without providing any prior examples. This relies entirely on the knowledge and capabilities acquired by the model during its training. The exercises in module 2 were primarily examples of zero-shot prompting.
Few-Shot Prompting: This technique involves including a few examples (the "shots") in the prompt to show the model the type of response expected. It's a form of "in-context learning" where the model learns from these examples for the duration of the query. This is extremely powerful for tasks that are new to the model or that require a very specific output format.
Few-shot prompting can be used as a technique to enable in-context learning where we provide demonstrations in the prompt to steer the model to better performance. The demonstrations serve as conditioning for subsequent examples where we would like the model to generate a response. [3]
Example of Few-Shot Prompting (Sentiment Analysis):
Decide if the sentiment of the tweet is Positive, Negative, or Neutral.
Tweet: "I'm over the moon, I got a promotion!"
Sentiment: Positive
Tweet: "The traffic this morning was absolutely horrible."
Sentiment: Negative
Tweet: "I'm watching the football game."
Sentiment: Neutral
Tweet: "Wow, this new restaurant is incredible, the food is delicious!"
Sentiment:
By providing three clear examples, the model no longer has to guess what we mean by "sentiment" and can produce the response "Positive" with much greater confidence.
Chain-of-Thought (CoT) prompting is a major advancement that has considerably improved the ability of LLMs to solve problems requiring multi-step reasoning (mathematical problems, logic, common sense, etc.).
The central idea is simple: instead of directly asking for the final answer, we ask the model to break down its reasoning, to make explicit the steps that lead it to the conclusion. This decomposition forces the model to follow a logical process, which reduces careless errors and allows verification of the validity of the reasoning.
Introduced by Wei et al. (2022), chain-of-thought (CoT) prompting enables complex reasoning capabilities through intermediate reasoning steps. You can combine it with few-shot prompting to get better results on more complex tasks that require reasoning before responding. [4]
Example of CoT Prompting (Mathematical Problem):
Standard Prompt (incorrect):
Prompt with Chain-of-Thought (correct):
An even simpler and often very effective variant is Zero-Shot CoT, which simply consists of adding the phrase "Let's think step by step" at the end of your question. [2]
Prompt engineering is a constantly evolving field. Here's an overview of other powerful techniques you can explore.
| Technique | Description | Typical Use Case |
|---|---|---|
| Self-Consistency | Generate multiple responses with a chain of thought (by increasing the model's "temperature" for more diversity), then select the most frequent or most coherent response. | Improve response reliability for reasoning tasks. |
| Generate Knowledge Prompting | Before answering the question, ask the model to generate some facts or knowledge on the subject. This "primes" the model with relevant information. | Questions on little-known subjects or requiring specific knowledge. |
| Prompt Chaining | Break down a complex task into a series of simpler prompts, where the output of one prompt becomes the input of the next. | Automation of complex workflows (e.g., summarize an article, then extract key entities, then write a tweet). |
| Tree of Thoughts (ToT) | The model explores multiple reasoning paths (tree branches) in parallel, evaluates their relevance, and chooses the best path. | Solving very complex problems where multiple strategies are possible. |
| Retrieval-Augmented Generation (RAG) | Couple the LLM to an external database (e.g., a company document base). Before responding, the model searches for the most relevant information in this base and uses it to construct its response. | Creating specialized chatbots on proprietary knowledge, reducing "hallucinations." |
Mastering these advanced techniques will allow you to go from the status of occasional user to that of true architect of AI interaction.
A good craftsman must know their tools. For the prompt engineer, this means mastering the interfaces, platforms, and APIs that allow interaction with language models. This module presents the ecosystem of tools you'll use daily.
The prompt engineer's toolset can be classified into several categories, each responding to specific needs.
1. Playgrounds and Chat Interfaces:
These are the most direct entry points for interacting with LLMs. They're perfect for rapid experimentation, prompt prototyping, and learning.
2. Prompt Management and Orchestration Tools:
When prompts become more complex and integrate into applications, more structured tools are needed to manage, version, and chain them.
3. Practice and Evaluation Platforms:
These platforms are designed to sharpen your skills by offering challenges and allowing you to evaluate your prompt performance.
To integrate the power of LLMs into an application, website, or automated workflow, it's essential to go through an API (Application Programming Interface).
An API allows two computer programs to communicate with each other. In our case, your script (for example in Python) will send a request to the LLM provider's API (like OpenAI), containing your prompt and parameters. The API will process the request, submit it to the model, and return the generated response, which your script can then use.
Example of simple API call with Python (pseudo-code):
import openai
# API key configuration
openai.api_key = 'YOUR_API_KEY'
# Model call
response = openai.Completion.create(
engine="text-davinci-003",
prompt="Explain gravity as if you were talking to a 5-year-old child.",
max_tokens=50
)
# Display response
print(response.choices[0].text.strip())
Mastering APIs opens the door to automation and creating personalized tools, multiplying your efficiency as a prompt engineer.
Prompt engineering is a field that evolves at breakneck speed. Technological watch and continuing education are therefore absolutely essential. Fortunately, many high-quality resources, often free, are available.
| Resource | Type | Description |
|---|---|---|
| Prompt Engineering Guide | Online guide | A very comprehensive textual resource, covering all basic and advanced techniques. Ideal as a reference. |
| Learn Prompting | Online course | An open-source and community course, very well structured for progressive learning. |
| DeepLearning.AI | Online course (MOOC) | Offers short and specialized courses, often created in partnership with AI labs themselves (e.g., "ChatGPT Prompt Engineering for Developers"). |
| Online Communities | Forums, Discord, Reddit | Places to exchange questions, share discoveries, and stay up to date with the latest news (e.g., the r/PromptEngineering subreddit). |
| Blogs and Research Publications | Articles, papers | For cutting-edge watch, it's useful to follow the blogs of major AI labs (OpenAI, Google AI, etc.) and consult new publications on sites like arXiv. |
By combining practical use of tools, programming via APIs, and rigorous continuing education, you'll equip yourself with all the skills necessary to excel in this field.
Theory and techniques are only useful if they're applied to concrete problems. This module is entirely dedicated to practice. Through three guided projects, you'll apply everything you've learned to build functional solutions and solve real challenges. Each project is designed to be completed with an LLM of your choice.
Objective: Develop a series of prompts to assist a marketing team in creating content for the launch of a new product.
Context: You work for a startup launching "Zenith," a new AI-based task management mobile app that helps users prioritize their day based on their energy level. Your mission is to create prompts to generate different types of marketing content.
Task 1: Slogan Generation
Task 2: Blog Article Writing
Task 3: Social Media Post Creation
Objective: Design a prompt workflow to sort and respond to incoming customer service emails.
Context: You're responsible for automation for an e-commerce company that sells electronic equipment. You want to use an LLM to pre-process customer emails.
Task 1: Email Classification
Task 2: Information Extraction
{"customer_name": "...", "order_number": "..."}.Task 3: Standard Response Generation
Objective: Use an LLM to analyze a set of customer reviews and extract actionable information.
Context: You're a product manager for video editing software. You've collected 500 user reviews from an online platform and want to analyze them quickly.
Task 1: Granular Sentiment Analysis
Task 2: Problem and Suggestion Synthesis
Task 3: Summary Report Generation
Congratulations, you've reached the final module of this course. You now have a solid understanding of the principles, techniques, and tools of prompt engineering. This last part is dedicated to transforming these skills into a successful career and how to navigate this constantly evolving field.
In a field as new and practical as prompt engineering, a solid portfolio is often worth more than a degree. It's tangible proof of your skills and your ability to achieve concrete results with LLMs. The projects you completed in module 5 are an excellent starting point.
What to include in your portfolio?
Where to host your portfolio?
The prompt engineer profession is exploding. Initially concentrated in tech companies, it's now spreading to all sectors.
Sectors that are hiring:
Preparing for interviews:
Prompt engineering is a young field and its future is being written. Several trends are emerging:
One certainty is that the ability to communicate effectively with intelligent machines will be an increasingly valuable skill. By mastering prompt engineering, you're not just learning a new profession, you're preparing for the future of work.
The key to long-term success will be your ability to learn, adapt, and stay curious. Continue to experiment, build, and share your knowledge.
We've reached the end of this complete journey on prompt engineering. Starting from basic definitions, we've explored fundamental and advanced techniques, discovered ecosystem tools, put our knowledge into practice through concrete projects, and finally, projected ourselves into the career perspectives of this fascinating field.
You now hold a map and compass to navigate the fascinating world of large language models. The journey is just beginning. The next step belongs to you: practice, experiment, fail, learn, and finally, innovate. The future of human-machine interaction is being written, and you now have all the keys in hand to be one of its architects.
[1] Salesforce. (n.d.). What is Prompt engineering: definition, applications and limits. Retrieved September 24, 2025, from https://www.salesforce.com/fr/resources/definition/prompt-engineering/
[2] Kojima, T., et al. (2022). Large Language Models are Zero-Shot Reasoners. arXiv. https://arxiv.org/abs/2205.11916
[3] Prompt Engineering Guide. (n.d.). Few-Shot Prompting. Retrieved September 24, 2025, from https://www.promptingguide.ai/techniques/fewshot
[4] Prompt Engineering Guide. (n.d.). Chain-of-Thought Prompting. Retrieved September 24, 2025, from https://www.promptingguide.ai/techniques/cot