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.