WEBVTT

00:01.880 --> 00:09.440
Validators play a crucial role in ensuring the quality and integrity of parameters within the AI generated

00:09.440 --> 00:10.120
outputs.

00:11.120 --> 00:18.400
They serve as quality controllers for the schemas specified in our rail specs, verifying whether an

00:18.400 --> 00:21.760
output aligns with our predefined criteria.

00:22.560 --> 00:29.280
If an output fails to meet this criteria, validators initiate corrective actions as defined in the

00:29.280 --> 00:30.120
rails pack.

00:31.680 --> 00:38.760
Imagine validators as meticulous inspectors scrutinizing every output that flows through the system.

00:39.320 --> 00:45.720
When applied to a property in a schema, they evaluate the value against predefined criteria.

00:46.520 --> 00:51.200
A successful evaluation results in a pass result signaling compliance.

00:52.200 --> 00:59.240
However, if the evaluation fails, a failed result prompts the execution of corrective actions outlined

00:59.240 --> 01:00.360
in the rails pack.

01:02.280 --> 01:10.960
This example defines validator for a total cost field, ensuring it represents the total cost of services

01:11.120 --> 01:12.960
and is never below zero.

01:13.280 --> 01:21.640
If the cost is less than the minimum, the exception shall be raised.
