Prompt example extracted from Microsoft Prompt Engineering Guide.
Scenario-specific guidance The techniques in this section teach you strategies for increasing the accuracy and grounding of responses you generate with a large language model (LLM). However, it's important to remember that even when you use prompt engineering effectively, you still need to validate the responses the models generate. Just because a carefully crafted prompt worked well for a particular scenario doesn't necessarily mean it will generalize more broadly to certain use cases. Understanding the limitations of LLMs is just as important as understanding how to leverage their strengths. This guide doesn't go in-depth into the mechanics behind the message structure for Chat Completions. If you aren't familiar with interacting with Chat Completions models programmatically, we recommend reading our how-to guide on the Chat Completion API first . Note All of the examples in this section of the guide were tested against a base GPT-4 model in English. Some techniques may produce different results with newer models like gpt-4.1 , and gpt-4.5 . If you're reading a localized version of this article in another language, these responses represent a localized translation of the English results. To learn more about potential limitations depending on what language you're using to prompt a model, consult our