rubric_llm 0.6.0.rc1 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d32ed4cba47a2fac15973d05bbf531317fa8d80f4c42b277dae5c302884ae57
4
- data.tar.gz: a4bfbbc318593df77c33d36d41eda2e3d2f1b0cd4d0485fe9b8a61e72ee1519b
3
+ metadata.gz: 3f75b6e37c79f540f62929562809323154ab17055a6e1f6b74c918605dd3f4c0
4
+ data.tar.gz: 9a4a7752bf87c1e16e4d75ff190d5a45f9c368276cb47a7c148be2c873de9e35
5
5
  SHA512:
6
- metadata.gz: a63b324d6f721297415feb55f6232b2771d58a7ca86a4a2ff0903abffec3c5fc5ad638c3d32632ed27bbf6cafea666a8247dcfa418d3454df61e3856c6c83b0a
7
- data.tar.gz: 424912623b5f7f8157c91c10310c4e8ebe34e7406fcc146a3c146bd4e9de0cbe9b0100acc4b7a9a98174153f53178961f9c8233b120b3d3d23c11a5bf29bb360
6
+ metadata.gz: 3606120936454d38b72f5441ef3329a645a3dd725148728fe3e3b45e595c76028d02aeab176767ec93bacae330709ec9ad1bdff57f06ac4942ddda89a518ad5b
7
+ data.tar.gz: 667739e0ee4e4568faf3f438b9b3b4455fcd9d7fb0815e2575f172d8e91abb33c7a03fe9f4b436f14cc0a35614c9ce604d23c1d509befaf62e0a023b81aa107c
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.7.0] - 2026-09-22
9
+
10
+ ### Added
11
+
12
+ - Optional `thinking_effort` configuration and `RUBRIC_THINKING_EFFORT` environment variable for judge reasoning models, passed to RubyLLM's `with_thinking(effort: ...)`. The default leaves thinking controls unchanged; explicit `nil` ignores the environment variable
13
+
14
+ ## [0.6.0] - 2026-09-18
15
+
16
+ ### Changed
17
+
18
+ - Support stable RubyLLM 2.x with the `~> 2.0` dependency requirement, replacing the exact release-candidate pin
19
+ - Retain the RubyLLM 2 migration behavior introduced in 0.6.0.rc1, including optional temperature and provider protocol configuration
20
+
8
21
  ## [0.6.0.rc1] - 2026-09-08
9
22
 
10
23
  This prerelease targets RubyLLM `2.0.0.rc1` and supports RubyLLM 2 only. Applications that use RubyLLM 1.x should stay on RubricLLM `0.5.x`. Stable `0.6.0` waits for the final RubyLLM 2.0 release and the complete Ruby 3.4 and 4.0 test matrix.
data/README.md CHANGED
@@ -8,15 +8,15 @@ Lightweight LLM evaluation framework for Ruby, inspired by [DeepEval](https://gi
8
8
 
9
9
  Provider-agnostic evaluation with pluggable metrics, statistical A/B comparison, and test framework integration: no Rails, no ActiveRecord, no UI. Works anywhere Ruby runs.
10
10
 
11
- `0.6.0.rc1` is a prerelease for RubyLLM `2.0.0.rc1`. It supports RubyLLM 2 only. Applications that use RubyLLM 1.x should stay on RubricLLM `0.5.x`. Stable `0.6.0` waits for the final RubyLLM 2.0 release and the complete Ruby 3.4 and 4.0 test matrix.
11
+ RubricLLM `0.7.0` supports RubyLLM `~> 2.0` and Ruby 3.4 or later. Applications that use RubyLLM 1.x should stay on RubricLLM `0.5.x`.
12
12
 
13
13
  ## Installation
14
14
 
15
- Install the release candidate with both exact prerelease constraints in the same Gemfile change:
15
+ Update both gem constraints together:
16
16
 
17
17
  ```ruby
18
- gem "rubric_llm", "0.6.0.rc1"
19
- gem "ruby_llm", "2.0.0.rc1"
18
+ gem "rubric_llm", "~> 0.7.0"
19
+ gem "ruby_llm", "~> 2.0"
20
20
  ```
21
21
 
22
22
  Then resolve both gems together:
@@ -25,12 +25,12 @@ Then resolve both gems together:
25
25
  bundle update rubric_llm ruby_llm
26
26
  ```
27
27
 
28
- RubyLLM's upstream prerelease pin command is `bundle add ruby_llm --version 2.0.0.rc1`. If the application still has a RubyLLM 1.x constraint, update both constraints before running Bundler.
28
+ If the application still has a RubyLLM 1.x constraint, update both constraints before running Bundler.
29
29
 
30
30
  Or install directly:
31
31
 
32
32
  ```bash
33
- gem install rubric_llm --version 0.6.0.rc1 --pre
33
+ gem install rubric_llm --version 0.7.0
34
34
  ```
35
35
 
36
36
  ## Quick Start
@@ -92,6 +92,28 @@ end
92
92
 
93
93
  Structured output support depends on the selected provider and model. RubricLLM sends its schema when RubyLLM reports structured output support. Otherwise it requests JSON text and validates the response object and score locally. Check the target provider's support before relying on a schema or a specific protocol. See RubyLLM's [2.0 upgrade guide](https://rubyllm.com/next/upgrading/), [request control guide](https://rubyllm.com/next/chat-request-control/), and [structured output support](https://rubyllm.com/next/structured-output/).
94
94
 
95
+ ### Judge Thinking Effort
96
+
97
+ Set `thinking_effort` when using a reasoning model to control the trade-off between judge quality, latency, and cost:
98
+
99
+ ```ruby
100
+ RubricLLM.configure do |c|
101
+ c.judge_model = "gpt-6-astra"
102
+ c.judge_provider = :openai
103
+ c.temperature = nil
104
+ c.thinking_effort = :high
105
+ end
106
+
107
+ # Or configure an individual evaluation:
108
+ config = RubricLLM::Config.new(judge_model: "gpt-6-astra", temperature: nil, thinking_effort: "high")
109
+ ```
110
+
111
+ RubricLLM passes the value to RubyLLM's [`with_thinking(effort: ...)`](https://rubyllm.com/thinking/). Strings and symbols are accepted. Supported values depend on the model and provider; RubricLLM does not translate values or silently ignore unsupported settings. Request errors are reported as judge errors.
112
+
113
+ The default is `nil`: RubricLLM does not call `with_thinking`, so existing RubyLLM and provider behavior is unchanged. This does **not** disable reasoning. An omitted setting reads `RUBRIC_THINKING_EFFORT`; an explicit `thinking_effort: nil` ignores that environment variable. Use `:none` only when the selected model supports it.
114
+
115
+ Higher effort does not guarantee better scores. Compare results on your evaluation dataset. For providers that count reasoning tokens toward the output limit, increase `max_tokens` if the default 4,096 tokens leaves too little room for the JSON response.
116
+
95
117
  ### Environment Variables
96
118
 
97
119
  All config fields can be set via environment variables:
@@ -101,6 +123,7 @@ All config fields can be set via environment variables:
101
123
  | `RUBRIC_JUDGE_MODEL` | `gpt-4o` | Judge LLM model name |
102
124
  | `RUBRIC_JUDGE_PROVIDER` | `openai` | RubyLLM provider |
103
125
  | `RUBRIC_TEMPERATURE` | `0.0` | Judge temperature |
126
+ | `RUBRIC_THINKING_EFFORT` | unset | Model-specific reasoning effort, such as `high` |
104
127
  | `RUBRIC_MAX_TOKENS` | `4096` | Max response tokens |
105
128
  | `RUBRIC_MAX_RETRIES` | `2` | Max retries on transient failures |
106
129
  | `RUBRIC_RETRY_BASE_DELAY` | `1.0` | Base delay (seconds) for exponential backoff |
@@ -403,7 +426,7 @@ Deep dives live in the [project wiki](https://github.com/dpaluy/rubric_llm/wiki)
403
426
  ## Requirements
404
427
 
405
428
  - Ruby >= 3.4
406
- - [ruby_llm](https://github.com/crmne/ruby_llm) = 2.0.0.rc1 for RubricLLM 0.6.0.rc1
429
+ - [ruby_llm](https://github.com/crmne/ruby_llm) ~> 2.0 for RubricLLM 0.7.0
407
430
  - An API key for your chosen LLM provider (set via RubyLLM configuration)
408
431
 
409
432
  ## Contributing
@@ -3,14 +3,16 @@
3
3
  module RubricLLM
4
4
  class Config
5
5
  attr_accessor :judge_model, :judge_provider, :temperature, :max_tokens, :custom_prompt,
6
- :max_retries, :retry_base_delay, :concurrency
6
+ :max_retries, :retry_base_delay, :concurrency, :thinking_effort
7
7
 
8
8
  def initialize(judge_model: nil, judge_provider: nil, # rubocop:disable Metrics/ParameterLists
9
9
  temperature: Float(ENV.fetch("RUBRIC_TEMPERATURE", "0.0")), max_tokens: nil,
10
- custom_prompt: nil, max_retries: nil, retry_base_delay: nil, concurrency: nil, validate: false)
10
+ custom_prompt: nil, max_retries: nil, retry_base_delay: nil, concurrency: nil, validate: false,
11
+ thinking_effort: ENV.fetch("RUBRIC_THINKING_EFFORT", nil))
11
12
  @judge_model = judge_model || ENV.fetch("RUBRIC_JUDGE_MODEL", "gpt-4o")
12
13
  @judge_provider = (judge_provider || ENV.fetch("RUBRIC_JUDGE_PROVIDER", "openai")).to_sym
13
14
  @temperature = temperature
15
+ @thinking_effort = thinking_effort
14
16
  @max_tokens = max_tokens || Integer(ENV.fetch("RUBRIC_MAX_TOKENS", "4096"))
15
17
  @custom_prompt = custom_prompt
16
18
  @max_retries = max_retries || Integer(ENV.fetch("RUBRIC_MAX_RETRIES", "2"))
@@ -27,6 +29,7 @@ module RubricLLM
27
29
  validate_judge_model
28
30
  validate_judge_provider
29
31
  validate_temperature
32
+ validate_thinking_effort
30
33
  validate_max_tokens
31
34
  validate_max_retries
32
35
  validate_retry_base_delay
@@ -39,6 +42,7 @@ module RubricLLM
39
42
  judge_model:,
40
43
  judge_provider:,
41
44
  temperature:,
45
+ thinking_effort:,
42
46
  max_tokens:,
43
47
  custom_prompt:,
44
48
  max_retries:,
@@ -67,6 +71,13 @@ module RubricLLM
67
71
  raise ConfigurationError, "temperature must be nil or between 0.0 and 2.0"
68
72
  end
69
73
 
74
+ def validate_thinking_effort
75
+ return if thinking_effort.nil?
76
+ return if (thinking_effort.is_a?(String) || thinking_effort.is_a?(Symbol)) && !thinking_effort.to_s.strip.empty?
77
+
78
+ raise ConfigurationError, "thinking_effort must be nil or a non-empty string or symbol"
79
+ end
80
+
70
81
  def validate_max_tokens
71
82
  return if max_tokens.is_a?(Integer) && max_tokens.positive?
72
83
 
@@ -52,6 +52,7 @@ module RubricLLM
52
52
  chat = RubyLLM.chat(model: config.judge_model, provider: config.judge_provider)
53
53
  chat.with_temperature(config.temperature)
54
54
  chat.with_max_output_tokens(config.max_tokens)
55
+ chat.with_thinking(effort: config.thinking_effort) unless config.thinking_effort.nil?
55
56
  apply_response_schema(chat)
56
57
 
57
58
  full_system_prompt = build_system_prompt(system_prompt)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubricLLM
4
- VERSION = "0.6.0.rc1"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubric_llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.rc1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Paluy
@@ -27,16 +27,16 @@ dependencies:
27
27
  name: ruby_llm
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - '='
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 2.0.0.rc1
32
+ version: '2.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - '='
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 2.0.0.rc1
39
+ version: '2.0'
40
40
  description: Provider-agnostic LLM evaluation with pluggable metrics, statistical
41
41
  A/B comparison, and test framework integration. Ragas for Ruby, powered by RubyLLM.
42
42
  email: