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. Evaluation using Interface
  • input:
    • text: The content column to check.
  • output:
    • result: Passed or Failed
Evaluation using SDK
Click here to learn how to setup evaluation using SDK.
Input TypeParameterTypeDescriptionUI Component
Required InputstextstringThe content column to check.Column Select
result = evaluator.evaluate(
    eval_templates="one_line",
    inputs={
        "text": '''This is a sentence
                  that spans two lines.'''
      },
    model_name="turing_flash"
)

print(result.eval_results[0].output)
print(result.eval_results[0].reason)
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.