AI-901

Introduction to Prompt Engineering

Writing effective system and user prompts, and techniques such as grounding, delimiters, few-shot examples and output formats that make responses accurate and consistent.

  • 2 lessons
  • Module quiz

Prompts are the main way to control what a generative model does. The system prompt sets the model's role and the rules that apply to every turn, and the user prompt carries each request. Small changes in how a prompt is written can change the quality and consistency of the response considerably.

Prompt engineering uses techniques that make responses more accurate and predictable: grounding the model in supplied information, separating content from instructions with delimiters, showing examples of the expected output, specifying the output format, and improving the prompt through testing.

What the exam expects

Questions test the roles of system and user prompts, choosing a technique for a goal, such as few-shot examples to show an exact format, the fact that system prompt instructions guide behaviour but do not enforce it, and telling the model what to do when it does not know the answer.

How this module is organized

Separating System Prompts from User Prompts explains the two kinds of prompt, and Improving Prompts with Proven Techniques and Iteration explains the techniques and how prompts are improved.

  1. Separating System Prompts from User Prompts Lesson 1
  2. Improving Prompts with Proven Techniques and Iteration Lesson 2
  3. Practise and review
  4. Test your knowledge 5 questions