Skill 2.1.1
Create effective system and user prompts for generative AI models
Key Concepts
The system prompt, called instructions in the Foundry portal and the Responses API, applies to every turn. It defines the model's role and audience, the tone, what the model should and should not do, how to handle questions outside its scope, and the output format. The user prompt contains the specific request for one turn, such as a question, a document to summarize or data to classify. The model also sees earlier turns of the conversation when the application includes them.
Effective prompts are specific (state the task, length, audience and format), grounded (provide the facts the answer should be based on and tell the model to use only those facts), structured (separate instructions from content with delimiters such as triple quotes or headings), and illustrated with examples where format matters (few-shot prompting, as opposed to zero-shot prompting without examples). Complex tasks are broken into steps. Prompts are improved by iteration: test a prompt on representative inputs, inspect the failures and refine the instructions.