> ## Documentation Index
> Fetch the complete documentation index at: https://futureagi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Length Evals - One Line

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

<CodeGroup>
  ```python Python theme={null}
  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)
  ```

  ```typescript JS/TS theme={null}
  import { Evaluator, Templates } from "@future-agi/ai-evaluation";

  const evaluator = new Evaluator();

  const result = await evaluator.evaluate(
    "one_line",
    {
      text: `This is a sentence
             that spans two lines.`
    },
    {
      modelName: "turing_flash",
    }
  );

  console.log(result);
  ```
</CodeGroup>

| **Input** |                    |          |                                              |
| --------- | ------------------ | -------- | -------------------------------------------- |
|           | **Required Input** | **Type** | **Description**                              |
|           | `text`             | `string` | Text to be evaluated if it is a single line. |

| **Output** |            |                                                                                    |
| ---------- | ---------- | ---------------------------------------------------------------------------------- |
|            | **Field**  | **Description**                                                                    |
|            | **Result** | Returns Passed if the text is a single line, or Failed if it contains line breaks. |
|            | **Reason** | Provides a detailed explanation of the evaluation.                                 |

***

**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.

***
