Skip to main content

Module test_generator

Module test_generator 

Source
Available on crate feature eval only.
Expand description

LLM-driven test case generation.

Generates evaluation test cases from natural language descriptions (via LLM) or from production event logs (direct extraction). Produced cases follow the standard [TestFile] JSON format and include generation metadata.

§Example

use adk_eval::test_generator::{TestGenerator, GeneratorConfig};
use std::sync::Arc;

let generator = TestGenerator::with_config(model, GeneratorConfig {
    cases_per_description: 3,
    include_tool_expectations: true,
});

let cases = generator
    .generate_from_description("A weather assistant that can look up forecasts")
    .await?;

Structs§

EvalCaseMetadata
Metadata for generated eval cases.
GeneratorConfig
Configuration for test case generation.
TestGenerator
Generates evaluation test cases from descriptions or event logs.