Prompt Editor

The Latitude prompt editor allows you to define and structure your prompts with precision.

Model Configuration

At the top of the prompt editor you can specify the default provider and AI model to use in your prompt. You can modify it using the input or directly in the code.

To add a provider, you can check the Providers page.

For example:

---
provider: openai
model: gpt-4
temperature: 0.7
---

You can check Prompt config section to learn more details.

Defining Conversation Structure

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

  • System: Sets the overall context and behavior for the AI model.
  • User: Represents the input or questions from the end-user.
  • Assistant: Represents the AI model’s responses.

To learn more about how to use these roles effectively in your prompts, please visit our Roles in Prompt Editor page.

Advanced features

The Latitude prompt editor also offers advanced features to create more dynamic and complex prompts:

  • Parameters: Use {{parameter}} syntax to include dynamic values in your prompts.
  • Snippets: Reuse common prompt elements with the <prompt /> tag.
  • Chains and steps: Create multi-step prompts using the <response /> tag.
  • Logic: Implement conditional statements and loops in your prompts.

Example

---
provider: openai
model: gpt-4o
---

<user>
Hello, I'd like to know about {{topic}}.
</user>

<assistant>
Certainly! I'd be happy to provide information about {{topic}}. 
What specific aspect would you like to know?
</assistant>

<user>
Tell me about its history.
</user>

<assistant>
Of course! I'll give you an overview of the history of {{topic}}.

<prompt path="history_template" />

Is there anything specific about the history of {{topic}} you'd like me to elaborate on?
</assistant>```