MORAIDICTIONNAIRE IA
Inférence & Prompting

Prompt Engineering (Prompt Engineering)

The craft of phrasing instructions to steer an AI model toward its best possible answer.

Prompt engineering is the art and science of crafting the instructions given to a language model in order to obtain the most relevant response. It is the equivalent of asking a good question: the same model can produce a mediocre or brilliant answer depending on how you speak to it. The prompt is the interface between human intent and the model's statistical power.

Why It Works

A model like GPT-4 does not "understand" in the human sense: it predicts the most probable next word from the supplied context. Formally, it samples from a distribution conditioned on the prompt:

$$P(\text{response} \mid \text{prompt}) = \prod_{t} P(w_t \mid w_{<t}, \text{prompt})$$

Changing the prompt shifts this distribution. Rich context, examples, and a clear role concentrate probability mass on the right answers.

Key Techniques

Approach Examples given Typical use
Zero-shot 0 Simple tasks
Few-shot 2 to 5 Precise format needed
Chain-of-thought variable Reasoning, calculation

A Transient Skill?

Recent models are less sensitive to exact wording, leading some to argue that prompt engineering will fade. Yet clearly structuring an intention will remain valuable.

A good prompt does not tame the AI: it reveals what it already knew how to do.

Explore the full AI dictionary →