StudyToCert

All certifications / Azure AI Engineer / Lessons

Microsoft Certified: Azure AI Engineer Associate AI-102 · Domain 2: Implement generative AI solutions

Chat completions: system, user and assistant messages, and calling a deployment with the Azure OpenAI SDK

▶ Watch the overview video

Last reviewed September 25, 2026 · Leer en español

Most generative AI apps use the chat completions API. You send a list of messages, and the model returns the next assistant message. Each message has a role. The system message (in newer models sometimes called the developer message) sets the model's behavior: persona, tone, rules, what topics to stay within, what to do when unsure and the output format. User messages are what the person typed. Assistant messages are the model's earlier replies. You can also include tool messages that return the results of function calls.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 5 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Azure AI Engineer for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Azure AI Engineer study plan