Prompt engineering is often presented as a magic recipe — a few well-placed keywords and the model suddenly turns brilliant. Reality is more nuanced, and this module aims to replace recipes with a method: how to formulate a robust prompt, how to diagnose a failing prompt, and how to avoid the pitfalls that burn hours in sterile iterations.
We first cover the building blocks of a structured prompt: context, role, task, output format, examples. Each block is illustrated with a real case (entity extraction, summarization, classification) and its degraded variants — because learning to prompt is as much about building as it is about spotting what is wrong in a prompt that performs poorly. The module pays particular attention to two frequent traps: over-specification, which constrains the model, and under-specification, which leaves it to its own devices.
The module’s second axis is reproducibility. A prompt is not a disposable incantation: it must be versionable, testable on multiple inputs, and evaluated against quantifiable criteria. We introduce the notions of sample-based evaluation, prompt A/B testing, and templating with variables — practices that become essential as soon as you move from a POC to even modest production usage.