Class: LlmConductor::Eval::Result

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

Overview

Outcome of running ONE (input, model) pair through the engine.

Ported from the Rails prototype’s ModelRunner::Result struct, with the record_* fields renamed to input_* and the on-disk *_path fields generalized to *_ref (a Store handle — a filesystem path for FileStore, an opaque key for InMemory).

status is one of: ‘ok’, ‘parse_error’, ‘llm_error’, ‘exception’.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def error
  @error
end

#estimated_cost_usdObject

Returns the value of attribute estimated_cost_usd

Returns:

  • (Object)

    the current value of estimated_cost_usd



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def estimated_cost_usd
  @estimated_cost_usd
end

#extra_columnsObject

Returns the value of attribute extra_columns

Returns:

  • (Object)

    the current value of extra_columns



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def extra_columns
  @extra_columns
end

#input_idObject

Returns the value of attribute input_id

Returns:

  • (Object)

    the current value of input_id



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def input_id
  @input_id
end

#input_labelObject

Returns the value of attribute input_label

Returns:

  • (Object)

    the current value of input_label



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def input_label
  @input_label
end

#input_tokensObject

Returns the value of attribute input_tokens

Returns:

  • (Object)

    the current value of input_tokens



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def input_tokens
  @input_tokens
end

#latency_msObject

Returns the value of attribute latency_ms

Returns:

  • (Object)

    the current value of latency_ms



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def latency_ms
  @latency_ms
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def model
  @model
end

#output_tokensObject

Returns the value of attribute output_tokens

Returns:

  • (Object)

    the current value of output_tokens



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def output_tokens
  @output_tokens
end

#parsed_bucketObject

Returns the value of attribute parsed_bucket

Returns:

  • (Object)

    the current value of parsed_bucket



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def parsed_bucket
  @parsed_bucket
end

#parsed_output_refObject

Returns the value of attribute parsed_output_ref

Returns:

  • (Object)

    the current value of parsed_output_ref



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def parsed_output_ref
  @parsed_output_ref
end

#parsed_scoreObject

Returns the value of attribute parsed_score

Returns:

  • (Object)

    the current value of parsed_score



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def parsed_score
  @parsed_score
end

#raw_output_refObject

Returns the value of attribute raw_output_ref

Returns:

  • (Object)

    the current value of raw_output_ref



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def raw_output_ref
  @raw_output_ref
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def status
  @status
end

#total_tokensObject

Returns the value of attribute total_tokens

Returns:

  • (Object)

    the current value of total_tokens



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def total_tokens
  @total_tokens
end

#vendorObject

Returns the value of attribute vendor

Returns:

  • (Object)

    the current value of vendor



13
14
15
# File 'lib/llm_conductor/eval/result.rb', line 13

def vendor
  @vendor
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/llm_conductor/eval/result.rb', line 25

def ok?
  status == 'ok'
end

#to_hObject

String-keyed hash for JSON manifest persistence.



21
22
23
# File 'lib/llm_conductor/eval/result.rb', line 21

def to_h
  super.transform_keys(&:to_s)
end