April 2026
Intermediate
395 pages
13h 22m
English
In Section 3.2, you took your first steps in using LLMs. You invoked the model objects, sent a simple message, and received a response. In a more realistic chat, multiple types of messages will arise. Each message has a specific role and content. We’ll look at the most common message types: user, system, and assistant.
This message type relates to the human message and represents the user input. The effectiveness of an LLM response depends on the clarity of the user message. Chapter 4 on prompt engineering basically deals with optimizing the user message.
Alongside the user input, a system message can be defined that specifies how the model should behave and work, like in a role-play.
For example, ...
Read now
Unlock full access