← ← Back to glossary
Glossary Term

Prompt engineering

The practice of writing and refining instructions (prompts) to get better, more consistent responses from AI models, using well-defined context, examples and format.

Prompt engineering is the practice of crafting the instructions sent to an AI model to get the desired result. Since LLMs respond to what is written in the prompt (and are sensitive to how it is written), small changes in the instruction can turn a vague answer into a precise one in the right format.

The most common techniques include: providing context and a role ("you are a tax lawyer..."), giving examples of the expected output (few-shot), asking for step-by-step reasoning, defining the output format (table, JSON, list) and imposing constraints ("100 words max", "answer only based on the text below"). In products, prompts become versioned, tested templates, as much a part of the code as any other logic.

When to invest in it: whenever you use AI repeatedly: in day-to-day chat or embedded in a product. A concrete example: an e-commerce site replaces the prompt "write a product description" with a template including target audience, tone of voice, three approved examples and a character limit, and the share of descriptions usable without editing rises visibly.

Related tools

Categories

See also