Create one or more test cases
Create one or more test cases for a prompt. Test cases can be used to validate prompt performance and ensure consistent output across different scenarios.Documentation Index
Fetch the complete documentation index at: https://docs.tela.com/llms.txt
Use this file to discover all available pages before exploring further.
| Field | Type | Required | Description |
|---|---|---|---|
promptId | string | Yes | UUID of the prompt to create test cases for |
title | string | No | Title of the test case |
messages | array | Yes | Array of message objects with role and content |
variables | object | No | Key-value pairs of variables used in the test case |
variablesRichContent | object | Yes | Key-value pairs of rich content variables |
files | array | No | Array of file objects to attach to the test case |
expectedOutput | string | No | Expected output for evaluation purposes |
promptApplicationId | string | No | UUID of the prompt application if applicable |
metadata | object | No | Metadata about the test case including source |
| Field | Type | Required | Description |
|---|---|---|---|
role | string | Yes | Role of the message sender (user, system, assistant, function, developer) |
content | string | Yes | Content of the message |
| Field | Type | Required | Description |
|---|---|---|---|
index | number | Yes | Index of the file in the array |
name | string | Yes | Name of the file |
mimeType | string | Yes | MIME type of the file |
vaultUrl | string | Yes | URL to the file in the vault |
variableName | string | Yes | Variable name associated with the file |
url | string | Yes | Public URL to the file |
Key-value pairs of rich content variables
UUID of the prompt to create test cases for
Array of message objects with role and content
Title of the test case
Expected output for evaluation purposes
UUID of the prompt application if applicable
Key-value pairs of variables used in the test case
Array of file objects to attach to the test case
Metadata about the test case
Test case(s) created successfully