Prompt engineering

Also called prompt design, prompting

Writing and testing instructions for an AI model so it reliably gives you the result you want.

Prompt engineering is the practice of designing the text you give an AI model, and then checking whether it works. The word "engineering" is a stretch for a single chat message, but it fits once a prompt is reused hundreds of times inside a product, where small wording changes can shift accuracy, tone or cost.

Good prompt engineering is mostly clear writing. You state the task, give the context the model cannot guess, set constraints, describe the output format, and sometimes show examples. The second half is testing: running the prompt on varied inputs, spotting failures, and changing one thing at a time.

Techniques with names, such as few-shot prompting, chain-of-thought and role prompting, are tools within this practice, not the practice itself. As models improve, tricks matter less and clarity matters more. Many teams now talk about context engineering, which widens the focus from the wording of one prompt to everything the model sees.

Example

A support team's first prompt, "Answer the customer politely", gives vague replies. After testing on 50 real tickets they add the refund policy, a rule to answer in the first sentence, and two example replies. Accuracy on policy questions rises from about 60% to over 90%.

Common mistake

Changing several things at once, then judging the result on one or two inputs. You can not tell which change helped, and a prompt that works on two inputs often fails on the twentieth. Keep a small set of test inputs and rerun them after every edit.

Find a prompt for the task in front of you.

96 prompts in 8 categories. Copy one, fill in the blanks, paste it into any model.

Browse prompts

Promptlexity is a free library of 96 AI prompts and 8 downloadable AI skills across 8 categories, plus a glossary of 64 AI and prompting terms. Each prompt shows the exact text to paste, the variables to fill in, an example of what comes back, and why it works. Each glossary term has a plain-English definition, an example and a common mistake. 6 step-by-step guides cover the basics. No signup, works with ChatGPT, Claude, Gemini and other models.

Press Esc to close