valueproof 0.6.1__tar.gz → 0.6.2__tar.gz
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.
- {valueproof-0.6.1/src/valueproof.egg-info → valueproof-0.6.2}/PKG-INFO +15 -13
- {valueproof-0.6.1 → valueproof-0.6.2}/README.md +14 -12
- {valueproof-0.6.1 → valueproof-0.6.2}/pyproject.toml +1 -1
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/__init__.py +1 -1
- {valueproof-0.6.1 → valueproof-0.6.2/src/valueproof.egg-info}/PKG-INFO +15 -13
- {valueproof-0.6.1 → valueproof-0.6.2}/LICENSE-CODE +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/setup.cfg +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/mixed_model_cost/__init__.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/claude.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/cli.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/gemini.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/lever_runner.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/openai.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/pipeline.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/scout_rescue.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof/starter.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof.egg-info/SOURCES.txt +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof.egg-info/dependency_links.txt +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof.egg-info/entry_points.txt +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof.egg-info/requires.txt +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/src/valueproof.egg-info/top_level.txt +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/tests/test_adapters.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/tests/test_core.py +0 -0
- {valueproof-0.6.1 → valueproof-0.6.2}/tests/test_runner_cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: valueproof
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Prove an AI cost cut on your own traffic before you ship it: cheap and strong models working together (Scout & Rescue), measured by cost per outcome with a blind quality review.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/AndyJakob78/valueproof
|
|
@@ -32,13 +32,15 @@ Dynamic: license-file
|
|
|
32
32
|
|
|
33
33
|
## Cheapest isn't the win
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**Same cheap model, different check: 4 of 20 good replies with code rules, 13 of 20 with the PM's acceptance criteria, still about 70% cheaper.**
|
|
36
|
+
|
|
37
|
+
The same cheap model answered 40 support tickets twice, with two different eval checks. A top-tier model stepped in whenever the check failed. Then a person compared 20 of the replies blind with the top-tier model's own replies.
|
|
36
38
|
|
|
37
39
|
| | Eval check: rules in code only | Eval check: the PM's acceptance criteria, in plain language |
|
|
38
40
|
|---|---|---|
|
|
39
|
-
| **Replies as good as the
|
|
41
|
+
| **Replies as good as the top-tier model's** (blind human review, 20 tickets) | ❌ **4 of 20** | ✅ **13 of 20** |
|
|
40
42
|
| **Serious mistakes that reached the customer** | 3 of 20 | 2 of 20 |
|
|
41
|
-
| **Cost vs. the
|
|
43
|
+
| **Cost vs. the top-tier model alone** | 82–92% cheaper | 69–73% cheaper |
|
|
42
44
|
| **Verdict** | Biggest saving, worse outcomes: less value | **Higher value, for a somewhat smaller saving** |
|
|
43
45
|
|
|
44
46
|
Claude Haiku 5.5 answers first, Claude Opus 5.5 steps in; compared with Opus 5.5 alone. The check in plain language is one more call, so replies were 10–35% slower than Opus alone; a mid-size model as the rescuer made it as fast as Opus again (one run). **So choose the eval check first, then the model.**
|
|
@@ -58,7 +60,7 @@ The two sides often work apart. Engineering and FinOps bring token cost down; pr
|
|
|
58
60
|
|
|
59
61
|
**Today:** the PM writes acceptance criteria → engineering builds → a user acceptance test checks a sample, late → failures go back to engineering, who guess what "right" means.
|
|
60
62
|
|
|
61
|
-
**With an eval check:** the PM writes the acceptance criteria once, with the source that defines "right" → they run on every answer at runtime; an answer that fails goes to the
|
|
63
|
+
**With an eval check:** the PM writes the acceptance criteria once, with the source that defines "right" → they run on every answer at runtime; an answer that fails goes to the top-tier model before the user sees it → before shipping, a blind review measures how good the check is.
|
|
62
64
|
|
|
63
65
|
Each acceptance criterion becomes two kinds of check, and most tasks need both:
|
|
64
66
|
|
|
@@ -71,14 +73,14 @@ Each acceptance criterion becomes two kinds of check, and most tasks need both:
|
|
|
71
73
|
|
|
72
74
|
Two things to know:
|
|
73
75
|
|
|
74
|
-
- **The check in plain language has a price:** one more call on every answer, so about twice the cost of rules in code and 10–35% slower than the
|
|
76
|
+
- **The check in plain language has a price:** one more call on every answer, so about twice the cost of rules in code and 10–35% slower than the top-tier model alone. A mid-size rescuer, or checking only the topics the PM marks as high-risk, won the speed back in our test.
|
|
75
77
|
- **The blind review doesn't go away; its job changes.** It now tests the check. Ours found a mistake the check had missed twice. Where a wrong answer can hurt someone, such as a vehicle warning or a medical or legal answer, don't let a model write it at all: show fixed, approved text.
|
|
76
78
|
|
|
77
79
|
## What Valueproof is
|
|
78
80
|
|
|
79
81
|
A playbook and a small open-source Python package:
|
|
80
82
|
|
|
81
|
-
- **An LLM cascade.** A cheap model answers first; a
|
|
83
|
+
- **An LLM cascade.** A cheap model answers first; a top-tier model steps in only when the answer fails an eval check. The technique is not new ([FrugalGPT](https://github.com/stanford-futuredata/FrugalGPT)); this repo calls it *Scout & Rescue*.
|
|
82
84
|
- **A test before you ship:** your current setup against the cheaper one, on a fixed set of your own real requests (taken from your logs), with a blind review by an LLM judge or a person.
|
|
83
85
|
- **A measure of the check itself:** what it caught, what it missed, how many false alarms, what it cost.
|
|
84
86
|
- **Cost per usable outcome,** with failed and rescued attempts counted.
|
|
@@ -93,7 +95,7 @@ A playbook and a small open-source Python package:
|
|
|
93
95
|
| + an eval check in plain language | ✅ 13 of 20 | caught the one in its run; 2 of 20 got past it in the human review | 3.5–4.9% lower | 69–73% cheaper | 10–35% slower |
|
|
94
96
|
| + a mid-size model as the rescuer (one run) | not checked by a person | none occurred in that run | 5% lower | 87% cheaper | about as fast |
|
|
95
97
|
|
|
96
|
-
- **The LLM judge looked kinder than the person.** "2–6% lower" sounded close; a person preferred the
|
|
98
|
+
- **The LLM judge looked kinder than the person.** "2–6% lower" sounded close; a person preferred the top-tier model almost every time. The judge and the person agreed on only one of the three real mistakes the person found with rules in code alone. Check the judge too.
|
|
97
99
|
- **The mistake that got past the check twice:** offering a carrier trace for a parcel that had already arrived. That is the next line for the PM to add to the check.
|
|
98
100
|
|
|
99
101
|
→ [Full support test](https://github.com/AndyJakob78/valueproof/blob/main/docs/support-test.md), with the lever ledger, check ratings and raw data.
|
|
@@ -129,7 +131,7 @@ def check(reply):
|
|
|
129
131
|
out = scout_and_rescue(
|
|
130
132
|
f"Reply to this support ticket, following this policy:\n{POLICY}\n\nTicket: {ticket}",
|
|
131
133
|
scout=claude("claude-haiku-5-5"), # the cheap model answers first
|
|
132
|
-
rescue=claude("claude-opus-5-5"), # the
|
|
134
|
+
rescue=claude("claude-opus-5-5"), # the top-tier model runs only if the check fails
|
|
133
135
|
check=check,
|
|
134
136
|
)
|
|
135
137
|
print(out.path, out.cost_usd) # "scout" or "rescue", and what the answers cost
|
|
@@ -148,7 +150,7 @@ valueproof compare my_test.py --live --max-spend 5 # the full test; stops start
|
|
|
148
150
|
|
|
149
151
|
`compare` runs every setup on every request in the same moment and prints:
|
|
150
152
|
|
|
151
|
-
- **cost per usable outcome**, average and median cost, time, and how often the
|
|
153
|
+
- **cost per usable outcome**, average and median cost, time, and how often the top-tier model ran
|
|
152
154
|
- **blind-review quality**, with hard failures counted separately so no average can hide them
|
|
153
155
|
- **check quality:** how many of the judge's hard failures each eval check caught, missed, and how many false alarms it raised
|
|
154
156
|
- **the lever ledger:** each change against the setup it changes, your estimate written down before the test, and a keep-or-drop verdict
|
|
@@ -161,9 +163,9 @@ To rate a new eval check on replies you already paid for, without running the mo
|
|
|
161
163
|
|
|
162
164
|
## When it fits
|
|
163
165
|
|
|
164
|
-
It fits when your product sends many requests to a
|
|
166
|
+
It fits when your product sends many requests to a top-tier model, most of them routine, and you can say what a usable answer is: support replies, data extraction, document summaries, search and research assistants, code review, code migration (does it compile, do the tests pass).
|
|
165
167
|
|
|
166
|
-
Be careful where a wrong answer carries legal, money or safety risk. Measure your eval check against a blind review first, or keep that step on the
|
|
168
|
+
Be careful where a wrong answer carries legal, money or safety risk. Measure your eval check against a blind review first, or keep that step on the top-tier model until the check catches the mistakes that matter.
|
|
167
169
|
|
|
168
170
|
## How this differs from other tools
|
|
169
171
|
|
|
@@ -190,7 +192,7 @@ The old package name `ai-mixed-model-cost-optimization` still installs and pulls
|
|
|
190
192
|
|
|
191
193
|
## Terms
|
|
192
194
|
|
|
193
|
-
- **LLM cascade / Scout & Rescue:** a cheap model (the scout) answers first; a
|
|
195
|
+
- **LLM cascade / Scout & Rescue:** a cheap model (the scout) answers first; a top-tier model (the rescuer) runs only when the answer fails an eval check.
|
|
194
196
|
- **Eval check:** judges one answer at runtime and decides whether the rescuer runs. A rule in code, or a cheap model asked in plain language with a reference.
|
|
195
197
|
- **Eval:** the fixed test before shipping: real requests, the eval checks, and a blind review, run the same way for every change.
|
|
196
198
|
- **Blind review:** answers scored on a fixed rubric without knowing which setup wrote them, by an LLM judge or a person.
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
## Cheapest isn't the win
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Same cheap model, different check: 4 of 20 good replies with code rules, 13 of 20 with the PM's acceptance criteria, still about 70% cheaper.**
|
|
8
|
+
|
|
9
|
+
The same cheap model answered 40 support tickets twice, with two different eval checks. A top-tier model stepped in whenever the check failed. Then a person compared 20 of the replies blind with the top-tier model's own replies.
|
|
8
10
|
|
|
9
11
|
| | Eval check: rules in code only | Eval check: the PM's acceptance criteria, in plain language |
|
|
10
12
|
|---|---|---|
|
|
11
|
-
| **Replies as good as the
|
|
13
|
+
| **Replies as good as the top-tier model's** (blind human review, 20 tickets) | ❌ **4 of 20** | ✅ **13 of 20** |
|
|
12
14
|
| **Serious mistakes that reached the customer** | 3 of 20 | 2 of 20 |
|
|
13
|
-
| **Cost vs. the
|
|
15
|
+
| **Cost vs. the top-tier model alone** | 82–92% cheaper | 69–73% cheaper |
|
|
14
16
|
| **Verdict** | Biggest saving, worse outcomes: less value | **Higher value, for a somewhat smaller saving** |
|
|
15
17
|
|
|
16
18
|
Claude Haiku 5.5 answers first, Claude Opus 5.5 steps in; compared with Opus 5.5 alone. The check in plain language is one more call, so replies were 10–35% slower than Opus alone; a mid-size model as the rescuer made it as fast as Opus again (one run). **So choose the eval check first, then the model.**
|
|
@@ -30,7 +32,7 @@ The two sides often work apart. Engineering and FinOps bring token cost down; pr
|
|
|
30
32
|
|
|
31
33
|
**Today:** the PM writes acceptance criteria → engineering builds → a user acceptance test checks a sample, late → failures go back to engineering, who guess what "right" means.
|
|
32
34
|
|
|
33
|
-
**With an eval check:** the PM writes the acceptance criteria once, with the source that defines "right" → they run on every answer at runtime; an answer that fails goes to the
|
|
35
|
+
**With an eval check:** the PM writes the acceptance criteria once, with the source that defines "right" → they run on every answer at runtime; an answer that fails goes to the top-tier model before the user sees it → before shipping, a blind review measures how good the check is.
|
|
34
36
|
|
|
35
37
|
Each acceptance criterion becomes two kinds of check, and most tasks need both:
|
|
36
38
|
|
|
@@ -43,14 +45,14 @@ Each acceptance criterion becomes two kinds of check, and most tasks need both:
|
|
|
43
45
|
|
|
44
46
|
Two things to know:
|
|
45
47
|
|
|
46
|
-
- **The check in plain language has a price:** one more call on every answer, so about twice the cost of rules in code and 10–35% slower than the
|
|
48
|
+
- **The check in plain language has a price:** one more call on every answer, so about twice the cost of rules in code and 10–35% slower than the top-tier model alone. A mid-size rescuer, or checking only the topics the PM marks as high-risk, won the speed back in our test.
|
|
47
49
|
- **The blind review doesn't go away; its job changes.** It now tests the check. Ours found a mistake the check had missed twice. Where a wrong answer can hurt someone, such as a vehicle warning or a medical or legal answer, don't let a model write it at all: show fixed, approved text.
|
|
48
50
|
|
|
49
51
|
## What Valueproof is
|
|
50
52
|
|
|
51
53
|
A playbook and a small open-source Python package:
|
|
52
54
|
|
|
53
|
-
- **An LLM cascade.** A cheap model answers first; a
|
|
55
|
+
- **An LLM cascade.** A cheap model answers first; a top-tier model steps in only when the answer fails an eval check. The technique is not new ([FrugalGPT](https://github.com/stanford-futuredata/FrugalGPT)); this repo calls it *Scout & Rescue*.
|
|
54
56
|
- **A test before you ship:** your current setup against the cheaper one, on a fixed set of your own real requests (taken from your logs), with a blind review by an LLM judge or a person.
|
|
55
57
|
- **A measure of the check itself:** what it caught, what it missed, how many false alarms, what it cost.
|
|
56
58
|
- **Cost per usable outcome,** with failed and rescued attempts counted.
|
|
@@ -65,7 +67,7 @@ A playbook and a small open-source Python package:
|
|
|
65
67
|
| + an eval check in plain language | ✅ 13 of 20 | caught the one in its run; 2 of 20 got past it in the human review | 3.5–4.9% lower | 69–73% cheaper | 10–35% slower |
|
|
66
68
|
| + a mid-size model as the rescuer (one run) | not checked by a person | none occurred in that run | 5% lower | 87% cheaper | about as fast |
|
|
67
69
|
|
|
68
|
-
- **The LLM judge looked kinder than the person.** "2–6% lower" sounded close; a person preferred the
|
|
70
|
+
- **The LLM judge looked kinder than the person.** "2–6% lower" sounded close; a person preferred the top-tier model almost every time. The judge and the person agreed on only one of the three real mistakes the person found with rules in code alone. Check the judge too.
|
|
69
71
|
- **The mistake that got past the check twice:** offering a carrier trace for a parcel that had already arrived. That is the next line for the PM to add to the check.
|
|
70
72
|
|
|
71
73
|
→ [Full support test](https://github.com/AndyJakob78/valueproof/blob/main/docs/support-test.md), with the lever ledger, check ratings and raw data.
|
|
@@ -101,7 +103,7 @@ def check(reply):
|
|
|
101
103
|
out = scout_and_rescue(
|
|
102
104
|
f"Reply to this support ticket, following this policy:\n{POLICY}\n\nTicket: {ticket}",
|
|
103
105
|
scout=claude("claude-haiku-5-5"), # the cheap model answers first
|
|
104
|
-
rescue=claude("claude-opus-5-5"), # the
|
|
106
|
+
rescue=claude("claude-opus-5-5"), # the top-tier model runs only if the check fails
|
|
105
107
|
check=check,
|
|
106
108
|
)
|
|
107
109
|
print(out.path, out.cost_usd) # "scout" or "rescue", and what the answers cost
|
|
@@ -120,7 +122,7 @@ valueproof compare my_test.py --live --max-spend 5 # the full test; stops start
|
|
|
120
122
|
|
|
121
123
|
`compare` runs every setup on every request in the same moment and prints:
|
|
122
124
|
|
|
123
|
-
- **cost per usable outcome**, average and median cost, time, and how often the
|
|
125
|
+
- **cost per usable outcome**, average and median cost, time, and how often the top-tier model ran
|
|
124
126
|
- **blind-review quality**, with hard failures counted separately so no average can hide them
|
|
125
127
|
- **check quality:** how many of the judge's hard failures each eval check caught, missed, and how many false alarms it raised
|
|
126
128
|
- **the lever ledger:** each change against the setup it changes, your estimate written down before the test, and a keep-or-drop verdict
|
|
@@ -133,9 +135,9 @@ To rate a new eval check on replies you already paid for, without running the mo
|
|
|
133
135
|
|
|
134
136
|
## When it fits
|
|
135
137
|
|
|
136
|
-
It fits when your product sends many requests to a
|
|
138
|
+
It fits when your product sends many requests to a top-tier model, most of them routine, and you can say what a usable answer is: support replies, data extraction, document summaries, search and research assistants, code review, code migration (does it compile, do the tests pass).
|
|
137
139
|
|
|
138
|
-
Be careful where a wrong answer carries legal, money or safety risk. Measure your eval check against a blind review first, or keep that step on the
|
|
140
|
+
Be careful where a wrong answer carries legal, money or safety risk. Measure your eval check against a blind review first, or keep that step on the top-tier model until the check catches the mistakes that matter.
|
|
139
141
|
|
|
140
142
|
## How this differs from other tools
|
|
141
143
|
|
|
@@ -162,7 +164,7 @@ The old package name `ai-mixed-model-cost-optimization` still installs and pulls
|
|
|
162
164
|
|
|
163
165
|
## Terms
|
|
164
166
|
|
|
165
|
-
- **LLM cascade / Scout & Rescue:** a cheap model (the scout) answers first; a
|
|
167
|
+
- **LLM cascade / Scout & Rescue:** a cheap model (the scout) answers first; a top-tier model (the rescuer) runs only when the answer fails an eval check.
|
|
166
168
|
- **Eval check:** judges one answer at runtime and decides whether the rescuer runs. A rule in code, or a cheap model asked in plain language with a reference.
|
|
167
169
|
- **Eval:** the fixed test before shipping: real requests, the eval checks, and a blind review, run the same way for every change.
|
|
168
170
|
- **Blind review:** answers scored on a fixed rubric without knowing which setup wrote them, by an LLM judge or a person.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "valueproof"
|
|
7
|
-
version = "0.6.
|
|
7
|
+
version = "0.6.2"
|
|
8
8
|
description = "Prove an AI cost cut on your own traffic before you ship it: cheap and strong models working together (Scout & Rescue), measured by cost per outcome with a blind quality review."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -15,7 +15,7 @@ from .lever_runner import (Report, Run, Score, check_quality, estimate, is_outco
|
|
|
15
15
|
from .pipeline import RunResult, Step, StepLog, run_pipeline
|
|
16
16
|
from .scout_rescue import Check, Model, ModelResult, Outcome, handoff_prompt, scout_and_rescue
|
|
17
17
|
|
|
18
|
-
__version__ = "0.6.
|
|
18
|
+
__version__ = "0.6.2"
|
|
19
19
|
|
|
20
20
|
__all__ = [
|
|
21
21
|
"Check", "Model", "ModelResult", "Outcome", "handoff_prompt", "scout_and_rescue",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: valueproof
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Prove an AI cost cut on your own traffic before you ship it: cheap and strong models working together (Scout & Rescue), measured by cost per outcome with a blind quality review.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/AndyJakob78/valueproof
|
|
@@ -32,13 +32,15 @@ Dynamic: license-file
|
|
|
32
32
|
|
|
33
33
|
## Cheapest isn't the win
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**Same cheap model, different check: 4 of 20 good replies with code rules, 13 of 20 with the PM's acceptance criteria, still about 70% cheaper.**
|
|
36
|
+
|
|
37
|
+
The same cheap model answered 40 support tickets twice, with two different eval checks. A top-tier model stepped in whenever the check failed. Then a person compared 20 of the replies blind with the top-tier model's own replies.
|
|
36
38
|
|
|
37
39
|
| | Eval check: rules in code only | Eval check: the PM's acceptance criteria, in plain language |
|
|
38
40
|
|---|---|---|
|
|
39
|
-
| **Replies as good as the
|
|
41
|
+
| **Replies as good as the top-tier model's** (blind human review, 20 tickets) | ❌ **4 of 20** | ✅ **13 of 20** |
|
|
40
42
|
| **Serious mistakes that reached the customer** | 3 of 20 | 2 of 20 |
|
|
41
|
-
| **Cost vs. the
|
|
43
|
+
| **Cost vs. the top-tier model alone** | 82–92% cheaper | 69–73% cheaper |
|
|
42
44
|
| **Verdict** | Biggest saving, worse outcomes: less value | **Higher value, for a somewhat smaller saving** |
|
|
43
45
|
|
|
44
46
|
Claude Haiku 5.5 answers first, Claude Opus 5.5 steps in; compared with Opus 5.5 alone. The check in plain language is one more call, so replies were 10–35% slower than Opus alone; a mid-size model as the rescuer made it as fast as Opus again (one run). **So choose the eval check first, then the model.**
|
|
@@ -58,7 +60,7 @@ The two sides often work apart. Engineering and FinOps bring token cost down; pr
|
|
|
58
60
|
|
|
59
61
|
**Today:** the PM writes acceptance criteria → engineering builds → a user acceptance test checks a sample, late → failures go back to engineering, who guess what "right" means.
|
|
60
62
|
|
|
61
|
-
**With an eval check:** the PM writes the acceptance criteria once, with the source that defines "right" → they run on every answer at runtime; an answer that fails goes to the
|
|
63
|
+
**With an eval check:** the PM writes the acceptance criteria once, with the source that defines "right" → they run on every answer at runtime; an answer that fails goes to the top-tier model before the user sees it → before shipping, a blind review measures how good the check is.
|
|
62
64
|
|
|
63
65
|
Each acceptance criterion becomes two kinds of check, and most tasks need both:
|
|
64
66
|
|
|
@@ -71,14 +73,14 @@ Each acceptance criterion becomes two kinds of check, and most tasks need both:
|
|
|
71
73
|
|
|
72
74
|
Two things to know:
|
|
73
75
|
|
|
74
|
-
- **The check in plain language has a price:** one more call on every answer, so about twice the cost of rules in code and 10–35% slower than the
|
|
76
|
+
- **The check in plain language has a price:** one more call on every answer, so about twice the cost of rules in code and 10–35% slower than the top-tier model alone. A mid-size rescuer, or checking only the topics the PM marks as high-risk, won the speed back in our test.
|
|
75
77
|
- **The blind review doesn't go away; its job changes.** It now tests the check. Ours found a mistake the check had missed twice. Where a wrong answer can hurt someone, such as a vehicle warning or a medical or legal answer, don't let a model write it at all: show fixed, approved text.
|
|
76
78
|
|
|
77
79
|
## What Valueproof is
|
|
78
80
|
|
|
79
81
|
A playbook and a small open-source Python package:
|
|
80
82
|
|
|
81
|
-
- **An LLM cascade.** A cheap model answers first; a
|
|
83
|
+
- **An LLM cascade.** A cheap model answers first; a top-tier model steps in only when the answer fails an eval check. The technique is not new ([FrugalGPT](https://github.com/stanford-futuredata/FrugalGPT)); this repo calls it *Scout & Rescue*.
|
|
82
84
|
- **A test before you ship:** your current setup against the cheaper one, on a fixed set of your own real requests (taken from your logs), with a blind review by an LLM judge or a person.
|
|
83
85
|
- **A measure of the check itself:** what it caught, what it missed, how many false alarms, what it cost.
|
|
84
86
|
- **Cost per usable outcome,** with failed and rescued attempts counted.
|
|
@@ -93,7 +95,7 @@ A playbook and a small open-source Python package:
|
|
|
93
95
|
| + an eval check in plain language | ✅ 13 of 20 | caught the one in its run; 2 of 20 got past it in the human review | 3.5–4.9% lower | 69–73% cheaper | 10–35% slower |
|
|
94
96
|
| + a mid-size model as the rescuer (one run) | not checked by a person | none occurred in that run | 5% lower | 87% cheaper | about as fast |
|
|
95
97
|
|
|
96
|
-
- **The LLM judge looked kinder than the person.** "2–6% lower" sounded close; a person preferred the
|
|
98
|
+
- **The LLM judge looked kinder than the person.** "2–6% lower" sounded close; a person preferred the top-tier model almost every time. The judge and the person agreed on only one of the three real mistakes the person found with rules in code alone. Check the judge too.
|
|
97
99
|
- **The mistake that got past the check twice:** offering a carrier trace for a parcel that had already arrived. That is the next line for the PM to add to the check.
|
|
98
100
|
|
|
99
101
|
→ [Full support test](https://github.com/AndyJakob78/valueproof/blob/main/docs/support-test.md), with the lever ledger, check ratings and raw data.
|
|
@@ -129,7 +131,7 @@ def check(reply):
|
|
|
129
131
|
out = scout_and_rescue(
|
|
130
132
|
f"Reply to this support ticket, following this policy:\n{POLICY}\n\nTicket: {ticket}",
|
|
131
133
|
scout=claude("claude-haiku-5-5"), # the cheap model answers first
|
|
132
|
-
rescue=claude("claude-opus-5-5"), # the
|
|
134
|
+
rescue=claude("claude-opus-5-5"), # the top-tier model runs only if the check fails
|
|
133
135
|
check=check,
|
|
134
136
|
)
|
|
135
137
|
print(out.path, out.cost_usd) # "scout" or "rescue", and what the answers cost
|
|
@@ -148,7 +150,7 @@ valueproof compare my_test.py --live --max-spend 5 # the full test; stops start
|
|
|
148
150
|
|
|
149
151
|
`compare` runs every setup on every request in the same moment and prints:
|
|
150
152
|
|
|
151
|
-
- **cost per usable outcome**, average and median cost, time, and how often the
|
|
153
|
+
- **cost per usable outcome**, average and median cost, time, and how often the top-tier model ran
|
|
152
154
|
- **blind-review quality**, with hard failures counted separately so no average can hide them
|
|
153
155
|
- **check quality:** how many of the judge's hard failures each eval check caught, missed, and how many false alarms it raised
|
|
154
156
|
- **the lever ledger:** each change against the setup it changes, your estimate written down before the test, and a keep-or-drop verdict
|
|
@@ -161,9 +163,9 @@ To rate a new eval check on replies you already paid for, without running the mo
|
|
|
161
163
|
|
|
162
164
|
## When it fits
|
|
163
165
|
|
|
164
|
-
It fits when your product sends many requests to a
|
|
166
|
+
It fits when your product sends many requests to a top-tier model, most of them routine, and you can say what a usable answer is: support replies, data extraction, document summaries, search and research assistants, code review, code migration (does it compile, do the tests pass).
|
|
165
167
|
|
|
166
|
-
Be careful where a wrong answer carries legal, money or safety risk. Measure your eval check against a blind review first, or keep that step on the
|
|
168
|
+
Be careful where a wrong answer carries legal, money or safety risk. Measure your eval check against a blind review first, or keep that step on the top-tier model until the check catches the mistakes that matter.
|
|
167
169
|
|
|
168
170
|
## How this differs from other tools
|
|
169
171
|
|
|
@@ -190,7 +192,7 @@ The old package name `ai-mixed-model-cost-optimization` still installs and pulls
|
|
|
190
192
|
|
|
191
193
|
## Terms
|
|
192
194
|
|
|
193
|
-
- **LLM cascade / Scout & Rescue:** a cheap model (the scout) answers first; a
|
|
195
|
+
- **LLM cascade / Scout & Rescue:** a cheap model (the scout) answers first; a top-tier model (the rescuer) runs only when the answer fails an eval check.
|
|
194
196
|
- **Eval check:** judges one answer at runtime and decides whether the rescuer runs. A rule in code, or a cheap model asked in plain language with a reference.
|
|
195
197
|
- **Eval:** the fixed test before shipping: real requests, the eval checks, and a blind review, run the same way for every change.
|
|
196
198
|
- **Blind review:** answers scored on a fixed rubric without knowing which setup wrote them, by an LLM judge or a person.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|