Skip to main content

Definition

The character length test allows you to define minimum and/or maximum bounds on the number of characters in a column. Length applies to string values and to structured object or array values. For objects and arrays, count characters in the JSON shown in the Output column, so the thresholds you set match what you see when you inspect a row. Empty values are skipped for min and max measurements, so a missing cell does not pull the minimum to 0.

Taxonomy

  • Task types: LLM, text classification.
  • Availability: and .

Why it matters

  • Extremely long or short text entries might be outliers or noise, such as corrupted data, spam, or non-relevant entries.
  • Models often have limitations on the length of input they can effectively process. Inputs longer than this limit may be truncated, potentially losing important information, while very short inputs might not provide enough context for accurate processing. Making sure that your data falls within these limits is important to ensure model performance.
  • If a model is trained on data with a certain length distribution, it might not perform well on texts of significantly different lengths.

Test configuration examples

If you are writing a tests.json, here are a few valid configurations for the character length test: