AI builder glossary
Prompt engineering
The practice of writing, testing, and refining the instructions and examples a model receives so a feature produces reliable, useful output at scale.
Prompt engineering is how you turn a vague request into instructions a model can follow consistently. For a product, that means stating the task, the audience, the constraints, the output format, and what to do when the input is unusual, then checking the results against real inputs rather than the three examples you happened to try.
The word engineering is earned when the work is systematic. You collect failing cases, form a hypothesis about why the model misread the instruction, change one thing, and rerun a test set to confirm the fix didn't break something else. Without that loop, prompt edits become guesswork that fixes one complaint and causes two more.
Much of what used to be prompt tricks has moved into API features. Structured outputs enforce formats better than pleading for JSON, effort settings replace many think-step-by-step incantations, and tool use replaces describing functions in prose. What remains is clear writing: explaining the job the way you would brief a capable new colleague, including why each rule exists.
Prompts also drift out of date as models change, so keep them in version control next to the evals that justify them.
A ticket classifier keeps mislabeling billing questions as account issues. Reading twenty failures shows the category definitions overlap, so the team rewrites them with one clear distinguishing rule each and confirms the fix on a labeled set of 200 tickets.
Learn more in the course
Related terms
Go from definitions to doing
Learn to build AI-powered apps in 132 practical lessons.