Skip to main content

Module annotation

Module annotation 

Source
Available on crate feature eval only.
Expand description

Human annotation workflow via JSONL export/import.

Provides JSONL-based file format for exporting evaluation cases for human review and importing human verdicts back into the system.

§Format

Each line in the JSONL file is a JSON object representing an AnnotationRecord. On export, the verdict field is null; on import, annotators fill it in.

§Example

use adk_eval::annotation::{AnnotationStore, AnnotationRecord};
use adk_eval::schema::EvalCase;
use adk_eval::report::EvaluationResult;
use std::collections::HashSet;

// Export cases for human review
AnnotationStore::export(&cases, &results, "annotations.jsonl")?;

// Import annotated verdicts
let valid_ids: HashSet<String> = cases.iter().map(|c| c.eval_id.clone()).collect();
let (records, warnings) = AnnotationStore::import("annotations.jsonl", &valid_ids)?;

Structs§

AnnotationRecord
A single annotation record for human review.
AnnotationStore
Manages JSONL export and import for human annotation.
HumanVerdict
Human-provided verdict for an evaluation case.