Class: Phronomy::Eval::EvalCase

Inherits:
Data
  • Object
show all
Defined in:
lib/phronomy/eval/eval_case.rb

Overview

Represents a single evaluation sample with an input, an expected output, and optional freeform metadata.

Examples:

EvalCase.new(input: "What is 2+2?", expected: "4")
EvalCase.new(input: "Hello", expected: "Hi", metadata: { difficulty: :easy })

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input:, expected:, metadata: {}) ⇒ EvalCase

Returns a new instance of EvalCase.



12
13
14
# File 'lib/phronomy/eval/eval_case.rb', line 12

def initialize(input:, expected:, metadata: {})
  super
end

Instance Attribute Details

#expectedObject (readonly)

Returns the value of attribute expected

Returns:

  • (Object)

    the current value of expected



11
12
13
# File 'lib/phronomy/eval/eval_case.rb', line 11

def expected
  @expected
end

#inputObject (readonly)

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



11
12
13
# File 'lib/phronomy/eval/eval_case.rb', line 11

def input
  @input
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



11
12
13
# File 'lib/phronomy/eval/eval_case.rb', line 11

def 
  @metadata
end