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",
    tag="capital city",
)

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.

tag
string

An optional tag to categorize or label the test case (e.g., “general_knowledge”, “edge_cases”, “customer_query”).

conversation_turns
list[dict[str, str]]

A list of previous conversation turns, each a dictionary with “input” and “actual_output” keys. This is used for test cases designed for conversational AI. Example: [{"input": "What is the capital of France?", "actual_output": "Paris"}, {"input": "What is the population of that city?", "actual_output": "2M"}]