Skip to main content

Returns

Returns a TestCase object for the given parameters.

Example

test_case = galtea.test_cases.create(
    test_id=test_id,
    input="What is the capital of France?",
    expected_output="Paris",
    context="Geography facts",
    variant="original",
)

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.
expected_tools
list[string]
The expected tools for the input given. This is the list of tools that the model should use to generate the expected output.
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
string
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
string
Reason for the user vote given.
confidence
float
Confidence for the test case.
confidence_reason
string
Reason for the confidence given.
goal
string
The user’s objective for scenario-based tests. Used when creating SCENARIOS test cases.
user_persona
string
Description of the user persona used to generate scenario-based test cases.
scenario
string
Description of the scenario context for scenario-based test cases.
initial_prompt
string
The initial message from the synthetic user for scenario-based tests.
stopping_criterias
list[string]
List of criteria to end the conversation in scenario-based simulations.