Conversational Prompt
Last updated
Last updated
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, Conversational Prompting provides a seamless and intuitive way to interact with and assess the performance of language models in a conversational context.
To begin using the Conversational prompt feature:
Navigate to your .
Click the three-dots button located in a prompt of the Sandbox interface.
Choose your method:
Add conversation: Manually input a new conversation directly into the Sandbox.
Upload conversation file (.json): Upload a pre-defined conversation file in JSON format for testing.
Execute the conversation and observe how the language model performs, maintaining context and coherence across turns.
In general, 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 application.
Assistant: Represents the application’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.
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 (e.g., user or assistant).
Enter the content of the message in the provided text box.
Adding more conversations:
You can also add more conversation in this dialog. To add the conversation, simply hover to the text input, and the Add above and Add below buttons will appear. The differences between both buttons are:
When you click the Add above button, a new text input will appear above the current text input that you are hovering.
When you click the Add below button, a new text input will appear under the current text input that you are hovering.
You can also click the Delete button to remove the text input.
Reorder the conversation: You can also drag and drop the conversation input to reorder it based on your needs. This feature allows you to easily rearrange the sequence of messages to better simulate different conversational flows.
Attach files and URLs:
Please note that this capability is only available for the User role; the Assistant role cannot attach any files or URLs.
Each message in a conversation can have up to 5 attachments. For example, with 3 messages in a prompt, you can attach up to 15 files.
Structure:
The core structure is an array of objects:
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:
Maintains and understands the full history of the conversation.
Handles back-and-forth dialogue naturally.
Generates replies based on accumulated context.
Treats each input as an independent request.
Has no memory of previous interactions.
Generates replies based solely on the immediate input.
You can attach a file or URLs in the conversation input, but only for the User role. This capability is useful for simulating real-world scenarios where users might share documents or links. .