Module: Raif::Evals::ConsoleLine

Defined in:
lib/raif/evals/console_line.rb

Overview

Compact output and the text comparison report both put an expectation description on a single line. An LLM judge expectation's description is its entire criteria - hundreds of characters, repeated under every case that failed it - which untruncated buries the case ids and pass counts the line exists to show. The full text is still in the results JSON and --verbose.

Constant Summary collapse

MAX_DESCRIPTION_LENGTH =
100

Class Method Summary collapse

Class Method Details

.truncate_description(description, limit: MAX_DESCRIPTION_LENGTH) ⇒ Object



12
13
14
15
16
17
# File 'lib/raif/evals/console_line.rb', line 12

def self.truncate_description(description, limit: MAX_DESCRIPTION_LENGTH)
  text = description.to_s
  return text if text.length <= limit

  "#{text[0, limit].rstrip}..."
end