rubric_llm 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/rubric_llm/report.rb +12 -1
- data/lib/rubric_llm/result.rb +13 -1
- data/lib/rubric_llm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4afa554e2e9ae10520d0cc605f55d59cdc6330c7ba65f38c4d3e933fb11519a4
|
|
4
|
+
data.tar.gz: e371eaaf0ab368c46d930e352434664bca19315bfc45865601686b0a5525ca5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f635136ea65b903555493b377a14d5902b2be949ef7bc77b036450ac25d8ead70429039c5f47ffdc36c2216470e39409ceb50f35c609df8f4e5648b64569fa38
|
|
7
|
+
data.tar.gz: a66697e131141d27ff0c406fdd60b6ef103c4c69cce3b85a3c5cf481cbdf55cc489983b10e94ffe7557ab0a637a8c09530e9cd0f317e16e092496862574fed1c
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2026-07-11
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `Result#pass?` now returns `false` when any metric errored during evaluation (fail-closed for CI gating)
|
|
13
|
+
- `Report#worst` now ranks results with no valid scores as worst instead of best
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `Result#errors` and `Result#valid?` expose per-metric judge failures
|
|
18
|
+
- `Result#to_h` and report JSON exports include metric error information
|
|
19
|
+
- Report summaries show a metric error count line when evaluation errors occurred
|
|
20
|
+
|
|
8
21
|
## [0.2.0] - 2026-07-11
|
|
9
22
|
|
|
10
23
|
### Changed
|
data/lib/rubric_llm/report.rb
CHANGED
|
@@ -16,7 +16,7 @@ module RubricLLM
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def worst(n)
|
|
19
|
-
results.sort_by { |r| r.overall || Float::INFINITY }.first(n)
|
|
19
|
+
results.sort_by { |r| r.overall || -Float::INFINITY }.first(n)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def failures(threshold: 0.8)
|
|
@@ -34,6 +34,10 @@ module RubricLLM
|
|
|
34
34
|
metric, stats[:mean], stats[:std], stats[:min], stats[:max], stats[:count])
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
error_count = error_counts.values.sum
|
|
38
|
+
affected_samples = results.count { |r| r.errors.any? }
|
|
39
|
+
lines << "Errors: #{error_count} metric errors across #{affected_samples} samples" if error_count.positive?
|
|
40
|
+
|
|
37
41
|
lines.join("\n")
|
|
38
42
|
end
|
|
39
43
|
|
|
@@ -72,6 +76,7 @@ module RubricLLM
|
|
|
72
76
|
{
|
|
73
77
|
summary: metric_stats,
|
|
74
78
|
duration:,
|
|
79
|
+
errors: error_counts,
|
|
75
80
|
results: results.map(&:to_h)
|
|
76
81
|
}
|
|
77
82
|
end
|
|
@@ -80,6 +85,12 @@ module RubricLLM
|
|
|
80
85
|
results.flat_map { |r| r.scores.keys }.uniq
|
|
81
86
|
end
|
|
82
87
|
|
|
88
|
+
def error_counts
|
|
89
|
+
counts = Hash.new(0)
|
|
90
|
+
results.each { |r| r.errors.each_key { |name| counts[name] += 1 } }
|
|
91
|
+
counts
|
|
92
|
+
end
|
|
93
|
+
|
|
83
94
|
def compute_stats
|
|
84
95
|
all_metric_names.each_with_object({}) do |metric, stats|
|
|
85
96
|
values = results.filter_map { |r| r.scores[metric] }
|
data/lib/rubric_llm/result.rb
CHANGED
|
@@ -18,14 +18,26 @@ module RubricLLM
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def pass?(threshold: 0.8)
|
|
21
|
+
return false unless valid?
|
|
22
|
+
|
|
21
23
|
score = overall
|
|
22
24
|
return false if score.nil?
|
|
23
25
|
|
|
24
26
|
score >= threshold
|
|
25
27
|
end
|
|
26
28
|
|
|
29
|
+
def errors
|
|
30
|
+
details.each_with_object({}) do |(name, detail), acc|
|
|
31
|
+
acc[name] = detail[:error] if detail.is_a?(Hash) && detail.key?(:error)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def valid?
|
|
36
|
+
errors.empty?
|
|
37
|
+
end
|
|
38
|
+
|
|
27
39
|
def to_h
|
|
28
|
-
{ scores:, details:, overall: overall }
|
|
40
|
+
{ scores:, details:, overall: overall, errors: }
|
|
29
41
|
end
|
|
30
42
|
|
|
31
43
|
private
|
data/lib/rubric_llm/version.rb
CHANGED