Structure
Learn about the general structure of a PromptL prompt
Overview
A PromptL prompt is divided into two sections: The config section, and the messages.
Config Section
The prompt configuration can be defined in an optional section, which must be defined at the beginning of the prompt. Here, you can configure all option parameters that define how the prompt will be generated, such as the model
, temperature
, and more.
This section is enclosed in three dashes (---
) at the beginning and end of the section. The config section is a YAML object and can contain any number of key-value pairs.
PromptL will not modify the config section in any way, so you can define any configuration that your LLM supports.
Learn more about the configuration section.
Messages
The rest of the prompt is defined by a series of messages, in a chat based format. Each message can be of type system
, user
, assistant
or tool
. By default, all plain text will be included as system
messages.
In this example, the prompt will contain two messages: a system
message and a user
message. The system
message will be displayed first, followed by the user
message.