Skip to content

test

Test

Bases: BaseModel

A test case for an agent.

Attributes:

Name Type Description
name str

Name of the test.

steps list[str]

List of step to perform for the test.

expected_results list[str]

List of expected results for the test.

initial_prompt Optional[str]

Optional initial prompt.

max_turns int

Maximum number of turns allowed for the test.

hook Optional[str]

The module path to an evaluation hook.

Source code in src/agenteval/test.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Test(BaseModel, validate_assignment=True):
    """A test case for an agent.

    Attributes:
        name: Name of the test.
        steps: List of step to perform for the test.
        expected_results: List of expected results for the test.
        initial_prompt: Optional initial prompt.
        max_turns: Maximum number of turns allowed for the test.
        hook: The module path to an evaluation hook.
    """

    # do not collect as a test
    __test__ = False

    name: str
    steps: list[str]
    expected_results: list[str]
    initial_prompt: Optional[str] = None
    max_turns: int
    hook: Optional[str] = None