completion-kit 0.28.36 → 0.28.38
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/app/assets/stylesheets/completion_kit/application.css +6 -49
- data/app/controllers/completion_kit/runs_controller.rb +1 -4
- data/app/services/completion_kit/mcp_tools/runs.rb +6 -4
- data/app/views/completion_kit/runs/_form.html.erb +0 -27
- data/app/views/completion_kit/runs/_run_config.html.erb +20 -16
- data/db/migrate/20260804000002_default_runs_to_no_temperature.rb +9 -0
- data/lib/completion_kit/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d1ac95215866b0de18d662ad0c690780a31b77cf163edd099a3a4b98d6e2f80
|
|
4
|
+
data.tar.gz: e016b642179a75138333d5d9bb5d1781e296349ed3952df828e8b154d4412518
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43f8b0575d21007a494f37dfc49e95dadfc140cc4d33e20137baba7deecbc6b81bdf03cee4ebbac80e1122d01a0b9b4c68d37e8e91f4aaf7e9c0437cc6fa20a0
|
|
7
|
+
data.tar.gz: f115a337c2b5b621755a421e1f2ddd1caacfd068db491872b728aa5f181beed9029e5d10b839169b822836025408854acbe20903ef869b33d15410f8f1da83bd
|
|
@@ -3247,11 +3247,15 @@ select.ck-input {
|
|
|
3247
3247
|
flex-wrap: wrap;
|
|
3248
3248
|
align-items: flex-start;
|
|
3249
3249
|
}
|
|
3250
|
+
/* The column is sized by the button, which never wraps, so min-content
|
|
3251
|
+
resolves to the button's own width and the note wraps underneath it. A
|
|
3252
|
+
fixed cap sized the column for the note instead, which let the wider
|
|
3253
|
+
button overflow and swallow the gap between the two actions. */
|
|
3250
3254
|
.ck-banner-action {
|
|
3251
3255
|
display: flex;
|
|
3252
3256
|
flex-direction: column;
|
|
3253
|
-
gap: 0.
|
|
3254
|
-
|
|
3257
|
+
gap: 0.4rem;
|
|
3258
|
+
width: min-content;
|
|
3255
3259
|
}
|
|
3256
3260
|
.ck-banner-action__note {
|
|
3257
3261
|
margin: 0;
|
|
@@ -4470,49 +4474,6 @@ table.ck-runs-table {
|
|
|
4470
4474
|
-webkit-line-clamp: unset;
|
|
4471
4475
|
}
|
|
4472
4476
|
|
|
4473
|
-
.ck-slider-row {
|
|
4474
|
-
display: flex;
|
|
4475
|
-
align-items: center;
|
|
4476
|
-
gap: 0.75rem;
|
|
4477
|
-
}
|
|
4478
|
-
|
|
4479
|
-
.ck-slider {
|
|
4480
|
-
flex: 1;
|
|
4481
|
-
-webkit-appearance: none;
|
|
4482
|
-
appearance: none;
|
|
4483
|
-
height: 4px;
|
|
4484
|
-
background: var(--ck-line-strong);
|
|
4485
|
-
border-radius: 2px;
|
|
4486
|
-
outline: none;
|
|
4487
|
-
}
|
|
4488
|
-
|
|
4489
|
-
.ck-slider::-webkit-slider-thumb {
|
|
4490
|
-
-webkit-appearance: none;
|
|
4491
|
-
appearance: none;
|
|
4492
|
-
width: 16px;
|
|
4493
|
-
height: 16px;
|
|
4494
|
-
border-radius: 50%;
|
|
4495
|
-
background: var(--ck-accent);
|
|
4496
|
-
cursor: pointer;
|
|
4497
|
-
border: 2px solid var(--ck-bg);
|
|
4498
|
-
}
|
|
4499
|
-
|
|
4500
|
-
.ck-slider::-moz-range-thumb {
|
|
4501
|
-
width: 16px;
|
|
4502
|
-
height: 16px;
|
|
4503
|
-
border-radius: 50%;
|
|
4504
|
-
background: var(--ck-accent);
|
|
4505
|
-
cursor: pointer;
|
|
4506
|
-
border: 2px solid var(--ck-bg);
|
|
4507
|
-
}
|
|
4508
|
-
|
|
4509
|
-
.ck-slider-value {
|
|
4510
|
-
font-family: var(--ck-mono);
|
|
4511
|
-
font-size: 0.85rem;
|
|
4512
|
-
color: var(--ck-text);
|
|
4513
|
-
min-width: 2rem;
|
|
4514
|
-
text-align: right;
|
|
4515
|
-
}
|
|
4516
4477
|
|
|
4517
4478
|
.ck-info-toggle {
|
|
4518
4479
|
display: inline-flex;
|
|
@@ -6609,10 +6570,6 @@ a.tag-mark {
|
|
|
6609
6570
|
margin-right: 0.2rem;
|
|
6610
6571
|
}
|
|
6611
6572
|
|
|
6612
|
-
.ck-slider:focus-visible {
|
|
6613
|
-
outline: 2px solid var(--ck-accent);
|
|
6614
|
-
outline-offset: 4px;
|
|
6615
|
-
}
|
|
6616
6573
|
.ck-select__option:focus-visible {
|
|
6617
6574
|
box-shadow: inset 0 0 0 2px var(--ck-accent);
|
|
6618
6575
|
}
|
|
@@ -223,10 +223,7 @@ module CompletionKit
|
|
|
223
223
|
end
|
|
224
224
|
|
|
225
225
|
def run_params
|
|
226
|
-
|
|
227
|
-
omit = permitted.delete(:omit_temperature)
|
|
228
|
-
permitted[:temperature] = nil if omit == "1"
|
|
229
|
-
permitted
|
|
226
|
+
params.require(:run).permit(:name, :prompt_id, :dataset_id, :judge_model, :temperature, :max_tokens, :judge_temperature, :output_column, :expected_column, metric_ids: [], tag_names: [])
|
|
230
227
|
end
|
|
231
228
|
|
|
232
229
|
# Editing a run that already has results forks a new run — but only when a
|
|
@@ -3,10 +3,12 @@ module CompletionKit
|
|
|
3
3
|
module Runs
|
|
4
4
|
extend Base
|
|
5
5
|
|
|
6
|
-
TEMPERATURE_DESCRIPTION = "Sampling temperature for generation, 0 to 1.
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
6
|
+
TEMPERATURE_DESCRIPTION = "Sampling temperature for generation, 0 to 1. Leave it unset, which is the " \
|
|
7
|
+
"default, and no temperature is sent at all, so the model applies its own. " \
|
|
8
|
+
"Most current frontier models refuse the parameter outright; set it only when " \
|
|
9
|
+
"you are targeting a model that honours it, such as anything served locally " \
|
|
10
|
+
"through Ollama. A refused value is re-sent without one and the run is " \
|
|
11
|
+
"flagged temperature_ignored.".freeze
|
|
10
12
|
|
|
11
13
|
MAX_TOKENS_DESCRIPTION = "Cap on generated tokens per row. Leave unset to use the provider client's default, " \
|
|
12
14
|
"which is what silently truncates long outputs and makes the judge score malformed " \
|
|
@@ -83,25 +83,6 @@
|
|
|
83
83
|
<p class="ck-field-hint" id="expected-column-warn"></p>
|
|
84
84
|
</div>
|
|
85
85
|
|
|
86
|
-
<div class="ck-field">
|
|
87
|
-
<label class="ck-label" for="run_temperature" style="position: relative;">
|
|
88
|
-
Temperature<span class="ck-info-toggle" tabindex="0">?</span><span class="ck-info-popup">Controls how random the model's output is. Lower values are more focused and deterministic, so the model picks the most likely words. Higher values are more varied and creative, with more risk of odd phrasing. Most LLMs default to 1.0; for evaluation, try a few values and see how your prompt holds up. Newer reasoning models (Claude Opus 4.7, GPT-5 family, etc.) refuse temperature outright. CompletionKit detects that and re-sends without the parameter, and flags the run so you know the value was never applied. Tick the box below to skip sending it in the first place.</span>
|
|
89
|
-
</label>
|
|
90
|
-
<div class="ck-slider-row">
|
|
91
|
-
<%= form.range_field :temperature, min: 0, max: 1, step: 0.1, class: "ck-slider", id: "run_temperature", disabled: run.temperature.nil?, oninput: "document.getElementById('temp-value').textContent = this.value" %>
|
|
92
|
-
<span class="ck-slider-value" id="temp-value"><%= run.temperature.nil? ? "off" : run.temperature %></span>
|
|
93
|
-
</div>
|
|
94
|
-
<label class="ck-checkbox-label">
|
|
95
|
-
<%= check_box_tag "run[omit_temperature]", "1", run.temperature.nil?, id: "run_omit_temperature", class: "ck-checkbox",
|
|
96
|
-
onchange: "document.getElementById('run_temperature').disabled = this.checked; document.getElementById('temp-value').textContent = this.checked ? 'off' : document.getElementById('run_temperature').value;" %>
|
|
97
|
-
<span class="ck-checkbox-label__box" aria-hidden="true"></span>
|
|
98
|
-
<span class="ck-checkbox-label__body">
|
|
99
|
-
<span class="ck-checkbox-label__text">Send no temperature</span>
|
|
100
|
-
<span class="ck-checkbox-label__hint">The model applies its own default. Required by models that refuse the parameter, which most current frontier models do.</span>
|
|
101
|
-
</span>
|
|
102
|
-
</label>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
86
|
<div class="ck-field">
|
|
106
87
|
<label class="ck-label" for="run_max_tokens" style="position: relative;">
|
|
107
88
|
Max tokens<span class="ck-info-toggle" tabindex="0">?</span><span class="ck-info-popup">The ceiling on how many tokens the model may generate per row. Leave it blank to use the provider's default. Set it when your prompt produces long output: if generation hits the cap the response is cut off mid-sentence, and the judge scores the truncation rather than the prompt. Match whatever your production caller uses so the evaluation reflects reality.</span>
|
|
@@ -135,14 +116,6 @@
|
|
|
135
116
|
<% end %>
|
|
136
117
|
</div>
|
|
137
118
|
|
|
138
|
-
<div class="ck-field" id="judge-temperature-field">
|
|
139
|
-
<label class="ck-label" for="run_judge_temperature" style="position: relative;">
|
|
140
|
-
Judge temperature<span class="ck-info-toggle" tabindex="0">?</span><span class="ck-info-popup">How random the judge is when it scores. This is separate from the generation temperature above. Keep it at 0 so re-judging the same output gives the same score, which is what makes one run comparable to another. Raise it only when you are deliberately measuring how much the judge disagrees with itself.</span>
|
|
141
|
-
</label>
|
|
142
|
-
<%= form.number_field :judge_temperature, in: 0..1, step: 0.1, class: "ck-input", id: "run_judge_temperature", **ck_field_aria(form, :judge_temperature) %>
|
|
143
|
-
<%= ck_field_error(form, :judge_temperature) %>
|
|
144
|
-
<p class="ck-field-hint" id="judge-temperature-hint">0 is deterministic and recommended. Above 0, the same output can score differently on a re-judge.</p>
|
|
145
|
-
</div>
|
|
146
119
|
|
|
147
120
|
<div class="ck-field" id="metrics-field">
|
|
148
121
|
<p class="ck-label" id="run_metrics_label">Metrics</p>
|
|
@@ -30,24 +30,28 @@
|
|
|
30
30
|
<span><%= run.metrics.map { |m| link_to(m.name, metric_path(m), class: "ck-link") }.join(", ").html_safe %></span>
|
|
31
31
|
</div>
|
|
32
32
|
<% end %>
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
<% if run.temperature.present? %>
|
|
34
|
+
<div class="ck-run-config__row">
|
|
35
|
+
<span class="ck-run-config__key">Temperature</span>
|
|
36
|
+
<span><%= run.temperature %></span>
|
|
37
|
+
<% if run.temperature_ignored? %>
|
|
38
|
+
<span class="ck-run-config__warn" style="color: var(--ck-dim);" title="The model rejected the temperature parameter, so CompletionKit re-sent the request without it.">ignored by model</span>
|
|
39
|
+
<% end %>
|
|
40
|
+
</div>
|
|
41
|
+
<% end %>
|
|
40
42
|
<div class="ck-run-config__row">
|
|
41
43
|
<span class="ck-run-config__key">Max tokens</span>
|
|
42
44
|
<span><%= run.max_tokens || "Provider default" %></span>
|
|
43
45
|
</div>
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
<% if run.nondeterministic_judge? %>
|
|
47
|
+
<div class="ck-run-config__row">
|
|
48
|
+
<span class="ck-run-config__key">Judge temperature</span>
|
|
49
|
+
<span><%= run.judge_temperature %></span>
|
|
50
|
+
<% if run.judge_temperature_ignored? %>
|
|
51
|
+
<span class="ck-run-config__warn" style="color: var(--ck-warning);" title="The judge model refused the temperature parameter, so CompletionKit re-sent the request without it and the provider applied its own default. The scores are not reproducible despite the setting above.">refused by judge, not reproducible</span>
|
|
52
|
+
<% else %>
|
|
53
|
+
<span class="ck-run-config__warn" style="color: var(--ck-warning);" title="Judging above temperature 0 makes scores irreproducible. The same output can get a different score on a re-judge.">scores not reproducible</span>
|
|
54
|
+
<% end %>
|
|
55
|
+
</div>
|
|
56
|
+
<% end %>
|
|
53
57
|
</div>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: completion-kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.28.
|
|
4
|
+
version: 0.28.38
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Damien Bastin
|
|
@@ -449,6 +449,7 @@ files:
|
|
|
449
449
|
- db/migrate/20260730000001_add_judge_temperature_to_completion_kit_runs.rb
|
|
450
450
|
- db/migrate/20260730000002_create_completion_kit_prompt_serves.rb
|
|
451
451
|
- db/migrate/20260804000001_add_judge_temperature_ignored_to_runs.rb
|
|
452
|
+
- db/migrate/20260804000002_default_runs_to_no_temperature.rb
|
|
452
453
|
- lib/completion-kit.rb
|
|
453
454
|
- lib/completion_kit.rb
|
|
454
455
|
- lib/completion_kit/concurrency_check.rb
|