Class: LlmConductor::Eval::Verdict

Inherits:
Struct
  • Object
show all
Defined in:
lib/llm_conductor/eval/verdict.rb

Overview

The LLM-as-judge’s verdict for one candidate (input, model) output. Ported verbatim from the prototype’s Judge::Verdict struct.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dimensionsObject

Returns the value of attribute dimensions

Returns:

  • (Object)

    the current value of dimensions



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def dimensions
  @dimensions
end

#issuesObject

Returns the value of attribute issues

Returns:

  • (Object)

    the current value of issues



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def issues
  @issues
end

#judge_errorObject

Returns the value of attribute judge_error

Returns:

  • (Object)

    the current value of judge_error



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def judge_error
  @judge_error
end

#judge_estimated_cost_usdObject

Returns the value of attribute judge_estimated_cost_usd

Returns:

  • (Object)

    the current value of judge_estimated_cost_usd



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def judge_estimated_cost_usd
  @judge_estimated_cost_usd
end

#judge_input_tokensObject

Returns the value of attribute judge_input_tokens

Returns:

  • (Object)

    the current value of judge_input_tokens



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def judge_input_tokens
  @judge_input_tokens
end

#judge_latency_msObject

Returns the value of attribute judge_latency_ms

Returns:

  • (Object)

    the current value of judge_latency_ms



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def judge_latency_ms
  @judge_latency_ms
end

#judge_modelObject

Returns the value of attribute judge_model

Returns:

  • (Object)

    the current value of judge_model



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def judge_model
  @judge_model
end

#judge_output_tokensObject

Returns the value of attribute judge_output_tokens

Returns:

  • (Object)

    the current value of judge_output_tokens



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def judge_output_tokens
  @judge_output_tokens
end

#quality_scoreObject

Returns the value of attribute quality_score

Returns:

  • (Object)

    the current value of quality_score



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def quality_score
  @quality_score
end

#verdict_one_lineObject

Returns the value of attribute verdict_one_line

Returns:

  • (Object)

    the current value of verdict_one_line



11
12
13
# File 'lib/llm_conductor/eval/verdict.rb', line 11

def verdict_one_line
  @verdict_one_line
end

Class Method Details

.borderline?(score) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/llm_conductor/eval/verdict.rb', line 26

def self.borderline?(score)
  score.is_a?(Numeric) && BORDERLINE_RANGE.cover?(score)
end

Instance Method Details

#borderline?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/llm_conductor/eval/verdict.rb', line 22

def borderline?
  Verdict.borderline?(quality_score)
end

#to_hObject

String-keyed hash for JSON manifest persistence.



18
19
20
# File 'lib/llm_conductor/eval/verdict.rb', line 18

def to_h
  super.transform_keys(&:to_s)
end