Prompt engineering is the practice of deliberately designing and optimizing inputs (prompts) for generative AI models so they produce the desired outputs. Through carefully crafted instructions, context and examples, the model is guided toward the user's intent — without changing the model's weights.
Common techniques include precise task descriptions, specifying roles and formats, providing examples (few-shot prompting) and guiding step-by-step reasoning (chain-of-thought). Prompt engineering is an iterative, test-driven process: prompts are drafted, the result is reviewed and the wording is refined.
Because the model only "sees" the text in its context window, prompt quality largely determines the relevance, accuracy and format of the answer. Prompt engineering is often the fastest and cheapest way to improve a model's performance, in contrast to the more effortful fine-tuning.