Skip to main content

Returns

Returns a TestCase object for the given parameters.

Example

test_case = galtea.test_cases.create(
    test_id="YOUR_TEST_ID",
    input="What is the capital of France?",
    expected_output="Paris",
    context="France is a country in Europe\nIt is known for its art, fashion, and culture\nThe capital of France is Paris\nParis is known for its cafe culture and landmarks like the Eiffel Tower",
    variant="geography_question",
)

Parameters

test_id
string
required
The ID of the test you want to create the test case for.
input
string
required
The input for the test case. This is the question or prompt you want to send to your model for a later evaluation.
expected_output
string
The expected output for the input given. This is the correct answer or response you want to evaluate against.
context
string
The context for the test case. This is the additional information that can help the model generate the expected output.
variant
string
An optional variant to categorize or label the test case (e.g., “original”, “paraphrased”).
reviewed_by_id
string
The ID of the user who has reviewed and validated this test case.
language
str
Language for the test case. Follow this list to know the supported ones:
user_score
int
User vote for the test case (1 for good quality, -1 for bad quality, 0 for unreviewed).
user_score_reason
str
Reason for the user vote given.
confidence
float
Confidence for the test case.
confidence_reason
str
Reason for the confidence given.
I