AI quality is a versioned measurement system, not a demo judgment. Store representative questions, expected evidence, allowed/refused behavior, tenant policy, evaluator versions, and human labels. Trace ingestion, retrieval, reranking, generation, validation, and tools separately. Release gates balance relevance, groundedness, authorization, safety, latency, availability, and cost while monitoring drift after deployment.
Evaluation has layers:
A single “quality score” hides failure causes.
Store immutable dataset versions, case IDs, tenant/policy fixtures, expected source/version IDs, run configuration, prompt/model/embedding/chunker/retrieval versions, candidate ranks/scores, output references, evaluator/human judgments, trace IDs, stage timings, tokens/cost units, and terminal errors. Restrict sensitive content and retain only what the evaluation purpose requires.
Metrics may include recall@k, MRR/NDCG where appropriate, no-answer/refusal correctness, grounded claim rate, citation precision/recall, unauthorized candidate/answer rate (target zero), tool success/denial correctness, p50/p95 latency, cost per successful task, and failure rate.
Automated model judges can scale review but have bias and drift. Version judge prompts/models, blind/randomize comparisons, calibrate against human labels, and never let a judge replace deterministic security tests.
Evaluation data belongs beside operational lineage so a regression can be traced to source, chunker, index, filter, prompt, model, or policy. PostgreSQL constraints and joins make configuration completeness and cross-run comparison auditable.
Create a fixed dataset containing exact, semantic, stale, unauthorized, ambiguous, adversarial, and no-answer cases. Run a baseline and candidate. A release passes only if zero authorization regressions occur and declared quality/latency/cost thresholds hold with reviewed variance. Replay a production trace without exposing tenant content.
Create a 30-case release rubric for SignalDesk RAG with at least five authorization/adversarial and five no-answer cases.
Acceptance criterion: the rubric separates layers, versions all inputs, uses zero-tolerance security gates, and defines candidate-versus-baseline rollout.