Class: ActionAgent::EvaluationRun
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ActionAgent::EvaluationRun
- Defined in:
- app/models/action_agent/evaluation_run.rb
Overview
One execution of an Evaluation over a sample of the agent's generations. scores: { criterion_key => { "score", "min", "max", "passed", "total" } }
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#average_score ⇒ Object
13 14 15 16 17 18 |
# File 'app/models/action_agent/evaluation_run.rb', line 13 def average_score values = scores.values.map { |s| s["score"] }.compact return nil if values.empty? (values.sum.to_f / values.size).round(3) end |