Messages, roles and parameters
Every chat app you've used sends the same simple thing to the model, a list of messages with roles. Get the roles and a few parameters right and half of "the model ignored my instructions" bugs disappear.
In this lesson you'll learn to
- Explain the system, user and assistant roles and build a multi-turn request correctly.
- Describe how a chat template turns messages into one token sequence, and why that matters for open-weight models.
- Use max_tokens and stop sequences, and read the stop reason to know why a reply ended.
- Choose request parameters on purpose, and know which ones current models fix or reject.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.