AI glossary · Beginner · Language models
Prompt engineering
Prompt engineering is the work of designing and refining questions or instructions (prompts) so that an AI model produces the desired answer. It is a way to improve results by changing only the input text, without retraining the model.
About this term
- Level
- Beginner · Core ideas for first-time readers
- Category
- Basics
- Fields
- Language models
- Added
- 2026-10-08
How it works
An LLM continues writing what comes next based on the input text, so the answer can change a lot depending on how the input is written. Common techniques include assigning a role, stating goals and conditions clearly, showing a few examples of the desired answer, and asking the model to think step by step (CoT). Specifying the answer format (table, list, JSON, etc.) is also part of it. The key is the loop of looking at the results, revising the instructions and testing again.
Why it matters
Retraining a model, as in fine-tuning, takes a lot of data and money, but a prompt only requires editing text, so it is fast and cheap. Even with the same model, a good prompt can noticeably improve accuracy and consistency. That is why it has become a useful skill not only for developers building AI services but also for everyday users.
Things to know
As models become smarter, tricks based on memorizing specific phrases are becoming less effective. Instead, interest is broadening to context engineering, which designs what information and tools to give the model and when. Also, a prompt that works well with one model may not work well with another. So when you change a prompt, it is a good idea to check whether it actually improved things using evaluations such as Evals.
Example
Suppose a company is building a meeting-minutes summary feature. If you write only "Summarize this," the length and format differ every time. If you change it to "Organize it as a list in three items: decisions, owners and deadlines, and do not write anything that is not in the minutes," and add one example of a good summary, the results become much more consistent and useful.