Nous.Eval.Evaluators.ExactMatch (nous v0.13.3)

View Source

Evaluator that requires exact string match.

Configuration

  • :normalize - Normalize strings before comparison (default: false)
  • :trim - Trim whitespace (default: true)
  • :case_insensitive - Ignore case (default: false)

Examples

# Basic exact match
TestCase.new(
  id: "exact",
  input: "What is 2+2?",
  expected: "4",
  eval_type: :exact_match
)

# Case insensitive
TestCase.new(
  id: "exact_ci",
  input: "What is the capital?",
  expected: "Paris",
  eval_type: :exact_match,
  eval_config: %{case_insensitive: true}
)