PathwayTestResults

Aggregate and summarize the outcomes of a autotest_pathways() run.

Usage

Source

PathwayTestResults()

After autotest_pathways() exercises every pathway with the configured test strategies, it wraps the individual PathwayTestResult records and the test configuration into a PathwayTestResults object. Use this object to inspect pass rates, adherence scores, state coverage, and per-strategy breakdowns.

Parameters

test_results: List[PathwayTestResult]

List of PathwayTestResult objects, one per individual test execution.

test_config: Dict[str, Any]
Dictionary describing how the test run was configured (pathway count, strategies, model, etc.).

Examples

Run pathway tests and inspect results (requires an LLM provider):

import talk_box as tb

pathways = tb.Pathways(title="Demo", desc="A demo pathway")
# ... define states ...

results = tb.autotest_pathways(pathways, model="openai")
results.summary["completion_rate"]

Methods

Name Description
__iter__() Iterate over test results.
__len__() Return number of test results.
__repr__() Return a developer-friendly representation.
get_adherence_distribution() Get distribution of adherence scores.
get_problem_summary() Get summary of problems and issues found during testing.

__iter__()

Iterate over test results.

Usage

Source

__iter__()

__len__()

Return number of test results.

Usage

Source

__len__()

__repr__()

Return a developer-friendly representation.

Usage

Source

__repr__()

get_adherence_distribution()

Get distribution of adherence scores.

Usage

Source

get_adherence_distribution()

get_problem_summary()

Get summary of problems and issues found during testing.

Usage

Source

get_problem_summary()