Validating the structure and length of text is essential for ensuring that generated content meets specific requirements and maintains a high standard of quality.

The following evals help ensure that text adheres to predefined length and structural requirements:


1. One Line

Definition:

Evaluates whether the input text consists of a single line. It checks if the text does not contain any newline characters, indicating that it is a single continuous line of text.

Calculation:

The evaluation process begins by configuring the input text to be assessed. The system counts the number of newline characters in the input text. If the count is zero, it confirms that the text is a single line.The final result is generated as a Pass/Fail outcome. If the input text is a single line, it passes; otherwise, it fails.

What to Do When One Line Evaluation Fails:

If the evaluation fails, examine the input text to identify the presence of newline characters. If the text contains multiple lines, consider revising it to ensure it meets the one-line requirement. Providing clearer instructions or constraints in the input can help prevent this issue in future evaluations.


2. Length Less Than

Definition:

Evaluates whether the length of the input text is below a specified maximum threshold. It checks if the character count of the text is less than the defined maximum length.

Calculation: The evaluation process begins by configuring the input text and the maximum length to be assessed. The system compares the length of the input text to the specified maximum length.The final result is generated as a Pass/Fail outcome. If the length of the input text is less than the maximum length, it passes; otherwise, it fails.

What to Do When Length Less Than Evaluation Fails: If the evaluation fails, check the length of the input text against the specified maximum. If the text exceeds the maximum length, consider revising it to fit within the limit. Providing clearer constraints in the input can help ensure compliance in future evaluations.


3. Length Greater Than

Definition:

Evaluates whether the length of the input text is greater than a specified minimum threshold. It checks if the character count of the text exceeds the defined minimum length.

Calculation:

The evaluation process begins by configuring the input text and the minimum length to be assessed. The system compares the length of the input text to the specified minimum length.The final result is generated as a Pass/Fail outcome. If the length of the input text is greater than the minimum length, it passes; otherwise, it fails.

What to Do When Length Greater Than Evaluation Fails

:If the evaluation fails, check the length of the input text against the specified minimum. If the text is shorter than the minimum length, consider revising it to meet the requirement. Providing clearer constraints in the input can help ensure compliance in future evaluations.


4. Length Between

Definition:

Evaluates whether the length of the input text falls within a specified range defined by minimum and maximum lengths. It checks if the character count of the text is between the defined limits.

Calculation:

The evaluation process begins by configuring the input text, minimum length, and maximum length to be assessed. The system verifies that the length of the input text is within the inclusive range defined by the minimum and maximum lengths.The final result is generated as a Pass/Fail outcome. If the length of the input text is between the specified minimum and maximum lengths, it passes; otherwise, it fails.

What to Do When Length Between Evaluation Fails:

If the evaluation fails, check the length of the input text against the specified minimum and maximum lengths. If the text is outside the defined range, consider revising it to fit within the limits. Providing clearer constraints in the input can help ensure compliance in future evaluations.