Overview

The Latitude prompt editor uses different roles to structure conversations and define the behavior of the AI model. The three main roles are:

System Role

The system role is used to set the overall context and behavior for the AI model. It’s typically used at the beginning of a prompt to give general instructions or set the tone for the conversation. Example:

<system>
You are a helpful assistant specializing in customer service for a tech company.
</system>

User Role

The user role represents the input or questions from the end-user. This is where you’d place the actual queries or statements that the AI model should respond to. Example:

<user>
What are the return policies for your products?
</user>

Assistant Role

The assistant role represents the AI model’s responses. You can use this to provide example responses or to structure multi-turn conversations. Example:

<assistant>
    Certainly! I'd be happy to explain our {{policy_type}} policies. 
    Is there anything specific you'd like to know?
</assistant>

Using Roles in Your Prompts

When creating prompts, you can use these roles to structure your conversations and guide the AI model’s behavior. Here’s a simple example:

<system>
    You are a {{assistant_type}} AI assistant for a {{business_type}}.
</system>

<user>
    Can you recommend a good {{product_type}}?
</user>

<assistant>
    Of course! I'd be happy to recommend a {{product_type}}. Could you tell me more about
    your preferences? This will help me tailor my recommendation to your tastes.
</assistant>

<user>
    {{user_message}}.
</user>