Skip to content

Add a length / word-count scorer with min/max bounds #6

Description

@abhishekmanyam

Summary

Add a length scorer that passes when the output's length falls within min/max bounds (characters or words). Small, self-contained, genuinely useful for "don't ramble" / "must be non-empty" guards.

YAML sketch

scorers:
  - type: length
    unit: words      # or: chars
    min: 5
    max: 200

Acceptance

  • One file in crates/evalcore-scorers/, following the new-scorer skill.
  • Config schema in evalcore-config with sensible defaults (unit: chars, no bound = unbounded on that side).
  • Inline unit tests: under min, over max, in range, and both-bounds-omitted.
  • Docs line in the scorers reference.

Good first issue

This is the smallest possible end-to-end tour of the codebase — schema, scorer, factory, tests, docs. Great first PR. Comment to claim it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions