Conversational Prompt
Overview
Conversational Prompting brings the power of multi-turn conversations testing to LLM Labs. This feature allows users to simulate real-world conversational scenarios, ensuring that language models maintain context and coherence across multiple interactions. Designed to enhance the experimentation process, it provides a seamless and intuitive way to interact with and assess the performance of language models in a conversational context.
Get started
Navigate to your Sandbox.
Click the More menu (three-dots) in a prompt.
Choose your method:
Add conversation: Manually input a new conversation directly into the prompt. Learn more on how to write the conversation.
Upload conversation file (.json): Upload a pre-defined conversation file in JSON format for testing. Learn more about the JSON file format.
Execute the conversation and observe how the language model performs, maintaining context and coherence across turns.
Understanding roles
Roles are used to represent the conversational input from the user and the assistant.
User: Represents input from the user, such as a request or question sent to the model.
Assistant: Represents the model's response, either as a reply or part of the conversation history in a prompt.
You can manually change the roles via the dropdown when writing the conversational prompt to define the prompt input. This flexibility allows you to simulate various conversational dynamics and test how the model responds to different types of interactions.

Write conversation manually
In the Add conversation dialog:
Write the prompt to represent the input based on your needs, whether it is for the assistant or user roles.
Use the role dropdown to specify the role for each message (user or assistant).
Enter the content of the message in the provided text area.
Adding more conversations:
You can also add more conversation in this dialog. To add the conversation, hover to the text input, and there will be 3 buttons:
Add above: When clicked, a new text input will appear above the current text input that you are hovering.
Add below: When clicked, a new text input will appear under the current text input that you are hovering.
Delete: When clicked, it will delete the message.
Reorder the conversation: You can drag and drop each message to reorder the conversation.
Attach files and URLs:
You can attach files or URLs to messages with the User role. This capability is useful for simulating real-world scenarios where users might share documents or links. Learn more about file attachment.
{% hint style="info" %} Each message in a conversation can have up to 5 attachments. For example, with 3 messages in a prompt, you can have up to 15 attachments. {% endhint %}
Creating the JSON file format
Structure:
The core structure is an array of objects:
[
{
"content": "...",
"role": "..."
},
{
"content": "...",
"role": "..."
},
// ... more turns
]
Fields:
content
:This field holds the actual message or interaction data.
It can be a simple string for plain text messages.
Alternatively, it can be an array of objects to include attachments like URLs or images.
Important: This field cannot be empty. Every conversation turn must contain content.
role
:This field indicates the speaker's role in the conversation.
It can be either
"user"
or"assistant"
.
Attachments (URLs and files):
To include attachments, the content
field should be an array of objects. Each object within this array can represent text, a file URL, or a website URL.
Text:
Use
{"type": "text", "text": "Your text here"}
.
File URL:
Use
{"type": "image_url", "image_url": {"url": "<https://example.com/image.jpg>"}}
.
URL (Website Link):
Use
{"type": "image_url", "url": "<https://example.com>"}
.
Sample JSON file:
Key Differences: Conversational vs Basic Prompt

Conversational prompt
Maintains and understands the full history of the conversation.
Handles back-and-forth dialogue naturally.
Generates replies based on accumulated context.
Basic prompt
Treats each input as an independent request.
Has no memory of previous interactions.
Generates replies based solely on the immediate input.
Last updated