Skip to main content
The TrustTest client provides a powerful interface for persisting and retrieving evaluation artifacts. It allows you to save and load any scenario, test set, and evaluation results through a consistent API.

Client Implementations

TrustTest offers multiple client implementations:

NeuralTrustClient

The NeuralTrustClient connects to the NeuralTrust API service and provides the following methods:

Configuration

The token and target ID are defined in your app settings. You can either:
  • Pass them directly when initializing the client
  • Set them as environment variables: NEURALTRUST_TOKEN and NEURALTRUST_TARGET_ID

Evaluation Scenarios

Test Sets

Evaluation Results

Evaluators

Remote execution and metrics

After you have saved a scenario (and usually a test set), you can run it on the platform and poll status:
run_evaluation_scenario / run_evaluation_scenario_test_case return a RunResult. Metrics types are ScenarioMetrics and TargetMetrics.

FileSystemClient

The FileSystemClient stores the same artifacts as JSON under path (default trusttest_db).
get_overview() rolls up local red-team results by language, subcategory, and the framework tags attached by catalog builders (EU AI Act, OWASP, MITRE ATLAS, ISO/IEC 42001).

Key Capabilities

All TrustTest clients support these core operations:
  • Evaluation Scenarios: Save and retrieve evaluation scenario definitions
  • Test Sets: Manage test sets associated with evaluation scenarios
  • Evaluation Results: Persist and load evaluation run results
  • Evaluators: Store custom evaluator configurations

Example Workflow

Here’s how to use the client in a typical evaluation workflow:
The client abstraction ensures your evaluation artifacts are consistently stored and retrieved regardless of the underlying storage mechanism you choose.