Prompt engineering is the practice of carefully wording instructions given to an AI model to get more accurate, useful, or consistent responses without changing the model itself.
What is prompt engineering?
Prompt engineering is the skill of crafting the input text, or prompt, sent to an AI model to steer its output. Because language models respond to the exact wording, structure, and examples in a prompt, small changes — adding context, specifying a format, or giving a worked example — can meaningfully change the quality of the response.
Common prompt engineering techniques
Few-shot prompting includes a handful of example input-output pairs so the model can infer the pattern it should follow. Chain-of-thought prompting asks the model to reason step by step before giving a final answer, which tends to improve accuracy on complex problems. Role prompting sets a persona or context, such as instructing the model to act as an expert reviewer, to shape its tone and focus.
Why prompt engineering matters
A well-written prompt can be the difference between a vague, generic response and a precise, usable one, all without any retraining. That makes prompt engineering the fastest and cheapest lever for improving an AI system's output, which is why it's often tried before more expensive options like fine-tuning.
Prompt engineering vs fine-tuning
Prompt engineering only changes the instructions given at request time and has no lasting effect on the model. Fine-tuning permanently adjusts the model's weights. Teams typically start with prompt engineering because it requires no training data or infrastructure, and reach for fine-tuning only when prompting alone can't achieve the needed consistency.