Prompt engineering is the practice of designing and refining the input given to a language model so that it reliably produces accurate, relevant, well-formatted responses. Because a model’s output depends heavily on how a request is phrased and what context accompanies it, careful construction of the prompt is a powerful lever on quality.
It encompasses many techniques: writing clear instructions, providing examples of the desired output, specifying format and tone, breaking complex tasks into steps, and supplying the right context. In retrieval-augmented systems, prompt engineering also governs how retrieved chunks are presented to the model — how they are introduced, ordered, and combined with the user’s question — which strongly affects whether the model uses them correctly.
Prompt engineering sits alongside retrieval and context engineering as part of getting good results from language models. Even with excellent retrieval, a poorly constructed prompt can produce vague or incorrect answers, while a well-crafted one helps the model ground its response in the supplied evidence and respond in the form the application needs.