awbench 0.1.0__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.
awbench-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
awbench-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,190 @@
1
+ Metadata-Version: 2.4
2
+ Name: awbench
3
+ Version: 0.1.0
4
+ Summary: A hard-oracle benchmark for a served model -- no LLM judge, and no comparison across different item sets.
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/Aitherium/awbench
7
+ Project-URL: Documentation, https://github.com/Aitherium/awbench#readme
8
+ Project-URL: Repository, https://github.com/Aitherium/awbench.git
9
+ Project-URL: Issues, https://github.com/Aitherium/awbench/issues
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=7.0; extra == "dev"
15
+ Dynamic: license-file
16
+
17
+ # awbench
18
+
19
+ A hard-oracle benchmark for a served model. Every item is scored by an exact match, a set
20
+ membership or an order. There is no LLM judge anywhere, and two runs compare only when they
21
+ scored the same items.
22
+
23
+ This is AitherBench, the bench we use to decide whether a model can run an agent platform:
24
+ calibrate effort, route to the right model, order a plan by dependency, decline instead of
25
+ confabulating, and say "I could not check" instead of "it is fine". A model can top the
26
+ general leaderboards and fail all of that.
27
+
28
+ ## Install and run
29
+
30
+ Install from a checkout with `pip install -e .`; once the package is on PyPI it is
31
+ `pip install awbench`. Then:
32
+
33
+ ```bash
34
+ awbench run --model my-model --url http://localhost:8000 --json run.json
35
+ awbench compare baseline.json run.json
36
+ ```
37
+
38
+ `--url` takes a server root (`http://localhost:8000`), an OpenAI-style base that ends in
39
+ `/v1`, or the full `/v1/chat/completions` URL. Any OpenAI-compatible chat endpoint works:
40
+ vLLM, llama.cpp's server, a hosted API. Requests are text only, greedy (`temperature: 0`),
41
+ one item at a time. Python 3.10+, no dependencies.
42
+
43
+ A key never goes on the command line. Name the environment variable that holds it:
44
+
45
+ ```bash
46
+ export MY_PROVIDER_KEY=...
47
+ awbench run --model some-model --url https://api.example.com/v1 \
48
+ --api-key-env MY_PROVIDER_KEY --json run.json
49
+ ```
50
+
51
+ No key is sent unless you name one, and a URL carrying `user:key@` is refused. A private CA
52
+ goes in with `--ca-bundle ca.pem`; certificate checks are never turned off.
53
+
54
+ ## What the score means
55
+
56
+ ```bash
57
+ awbench items # the item set: dimensions, counts, fingerprint, content digest
58
+ ```
59
+
60
+ Today that prints 65 items over 15 dimensions. Trust the command, not this paragraph: the
61
+ dimension list is derived from the items, never typed by hand.
62
+
63
+ | dimension | what a pass means |
64
+ |---|---|
65
+ | effort | rates a task 1-10 against a stated ladder; a long prompt with a trivial ask is still trivial |
66
+ | routing_model | picks the one model that CAN do the job (vision, offline, cost), not the nearest name |
67
+ | planning | orders steps by real dependency, and names the step that is impossible |
68
+ | escalation | knows when a job exceeds it, and when it does not |
69
+ | workflow | follows a declared runbook, and flags a gap instead of filling it silently |
70
+ | long_horizon | names what remains of a long goal, not the last thing it did |
71
+ | context_mgmt | crystallises before the window forces it; drops finished work, never the goal |
72
+ | offload | uses what a bigger model returned instead of restating it |
73
+ | logic_traps | resists the answer pattern-matching supplies |
74
+ | knowledge | states a fact, or declines an unknowable one |
75
+ | doctrine | "the check examined nothing" is not a pass; a green healthcheck is not a working feature |
76
+ | repl | knows it is missing information, and names the query that gets it |
77
+ | search | looks up volatile facts and answers stable ones directly, both directions |
78
+ | multi_turn | carries numbers, corrections and standing instructions across turns |
79
+ | tool_reach | picks up the right instrument from a stated roster, and declines one it does not need |
80
+
81
+ The prompts state the platform facts they reason over (the model roster, the effort ladder,
82
+ the operating rules, the tool roster), so a dimension measures reasoning over what the model
83
+ was told, not whether it memorised our names. The rosters name one platform's models and
84
+ tools; if you score a different stack, read `routing_model` and `tool_reach` with that in mind.
85
+
86
+ How a number is made:
87
+
88
+ - **Per-dimension means, then the mean of those.** Dimensions have different item counts, and
89
+ a flat item average silently weights the biggest one.
90
+ - **Unjudged is not zero.** An empty reply, a reply cut off at `--max-tokens`, reasoning that
91
+ never reaches an answer, or a transport error takes the item OUT of the denominator and
92
+ lists it with the reason. A dead endpoint is indistinguishable from a stupid model once you
93
+ score the exception, so we do not.
94
+ - **More than 15% unjudged is not a measurement.** The run reports `comparable: false` and
95
+ `overall: null`.
96
+ - **The minimum detectable effect** is one item flipping on the smallest dimension:
97
+ `1 / items_in_smallest_dimension / dimensions`. A delta below it will reverse on the next run.
98
+ - **Reasoning is stripped before scoring.** A `<think>` block, or an untagged "Thinking
99
+ Process:" preamble, is deliberation, and scoring it punishes a model for considering the
100
+ wrong answer before rejecting it.
101
+
102
+ ## Compare two runs
103
+
104
+ ```bash
105
+ awbench compare baseline.json candidate.json # deltas are candidate - baseline
106
+ awbench compare base.json cand.json --trained planning # losses elsewhere are collateral
107
+ ```
108
+
109
+ Exit `0`: compared, nothing regressed beyond the MDE. Exit `1`: a dimension regressed.
110
+ Exit `2`: refused or incomplete. It refuses, in this order:
111
+
112
+ 1. **Different item sets.** Each run records a fingerprint over the ids it scored. A matching
113
+ count proves nothing, because swapping an item keeps the count; a matching fingerprint
114
+ means the same items. A result with no fingerprint is UNKNOWN and refused, not assumed.
115
+ 2. **Edited prompts under unchanged ids.** Each run also records a content digest over what
116
+ every item sends (system, prompt, follow-ups). Same ids with different content is a
117
+ different ruler.
118
+ 3. **A missing score.** A run that judged nothing, or too little, has no score, and a missing
119
+ score is never compared, not even as a zero.
120
+ 4. **A dimension only one run scored** is shown as NOT COMPARED, and then the overall is not
121
+ compared either.
122
+
123
+ The verdict is `PROMOTE`, `REJECT — regressions`, `REJECT — collateral damage` (a loss
124
+ outside `--trained`), `NO EFFECT` (every delta under the MDE) or `INCOMPLETE` (a dimension
125
+ only one run scored).
126
+
127
+ ## Trust: self-reported rows and re-run rows
128
+
129
+ A result file someone hands you is **self-reported**. It shows what their endpoint returned,
130
+ as their run recorded it. Nothing in the file can prove the endpoint served the model it
131
+ names, that the items were the published ones, or that the file was not edited afterwards.
132
+ It records the `model` field the endpoint sent back and warns when that differs from the
133
+ model asked for, which catches a gateway quietly answering with a stand-in. A server can
134
+ still say anything.
135
+
136
+ A row is **re-run** when you produce it yourself:
137
+
138
+ 1. `awbench items` on your install prints the same fingerprint and content digest the row
139
+ carries (`result.item_set.fingerprint`, `awbench.content_sha256`).
140
+ 2. You run the same model id with your own access: `awbench run --model <id> --url <yours>`.
141
+ 3. `awbench compare their.json yours.json`. `NO EFFECT` means the row reproduces within the
142
+ MDE. Anything else means it does not.
143
+
144
+ Rank self-reported rows and re-run rows as different kinds of evidence, and label which is
145
+ which. A table that mixes them without saying so is quoting claims as measurements.
146
+
147
+ ## From Python
148
+
149
+ ```python
150
+ from awbench import run, comparable_runs
151
+
152
+ def turn(messages): # [{"role": ..., "content": ...}] -> text or (text, finish)
153
+ return my_model(messages)
154
+
155
+ result = run(turn) # result["overall"], result["dimensions"], result["item_set"]
156
+ ok, reason = comparable_runs(result, other_result)
157
+ ```
158
+
159
+ `run(turn_fn)` takes the model as a callable, so the same items score a raw endpoint, an agent
160
+ harness or anything else that answers messages.
161
+
162
+ ## Self-test
163
+
164
+ ```bash
165
+ awbench --self-test
166
+ ```
167
+
168
+ Exit 0 only after it proves each guard can fail: a synthetic model answering from a key
169
+ scores 1.0 on every item (so no item is unpassable) while a constant "Yes." model does not; a
170
+ silent model and a dead transport judge nothing and carry no score; mismatched item sets, a
171
+ missing fingerprint, edited prompts and a missing score are all refused. It never touches the
172
+ network. `awbench doctor` reports what is installed beside it.
173
+
174
+ ## Where it comes from
175
+
176
+ This package is the public home of the AitherBench item set. The `aitherbench` toolpack in
177
+ awdk carries the same items today and will import this package instead of its own copy. A
178
+ result written by that toolpack's driver loads here and compares on the fingerprint rule.
179
+
180
+ ## Limits
181
+
182
+ - 65 items rank candidates. It is not a leaderboard-grade measurement of anything general.
183
+ - Text-only chat completions: no tool calls, no images.
184
+ - The fingerprint covers ids and the digest covers prompts. Neither covers the scorers, which
185
+ are code; pin the awbench version when you compare across time.
186
+ - It measures judgement for running an agent stack. It is not a safety evaluation.
187
+
188
+ ## License
189
+
190
+ Apache-2.0.
@@ -0,0 +1,174 @@
1
+ # awbench
2
+
3
+ A hard-oracle benchmark for a served model. Every item is scored by an exact match, a set
4
+ membership or an order. There is no LLM judge anywhere, and two runs compare only when they
5
+ scored the same items.
6
+
7
+ This is AitherBench, the bench we use to decide whether a model can run an agent platform:
8
+ calibrate effort, route to the right model, order a plan by dependency, decline instead of
9
+ confabulating, and say "I could not check" instead of "it is fine". A model can top the
10
+ general leaderboards and fail all of that.
11
+
12
+ ## Install and run
13
+
14
+ Install from a checkout with `pip install -e .`; once the package is on PyPI it is
15
+ `pip install awbench`. Then:
16
+
17
+ ```bash
18
+ awbench run --model my-model --url http://localhost:8000 --json run.json
19
+ awbench compare baseline.json run.json
20
+ ```
21
+
22
+ `--url` takes a server root (`http://localhost:8000`), an OpenAI-style base that ends in
23
+ `/v1`, or the full `/v1/chat/completions` URL. Any OpenAI-compatible chat endpoint works:
24
+ vLLM, llama.cpp's server, a hosted API. Requests are text only, greedy (`temperature: 0`),
25
+ one item at a time. Python 3.10+, no dependencies.
26
+
27
+ A key never goes on the command line. Name the environment variable that holds it:
28
+
29
+ ```bash
30
+ export MY_PROVIDER_KEY=...
31
+ awbench run --model some-model --url https://api.example.com/v1 \
32
+ --api-key-env MY_PROVIDER_KEY --json run.json
33
+ ```
34
+
35
+ No key is sent unless you name one, and a URL carrying `user:key@` is refused. A private CA
36
+ goes in with `--ca-bundle ca.pem`; certificate checks are never turned off.
37
+
38
+ ## What the score means
39
+
40
+ ```bash
41
+ awbench items # the item set: dimensions, counts, fingerprint, content digest
42
+ ```
43
+
44
+ Today that prints 65 items over 15 dimensions. Trust the command, not this paragraph: the
45
+ dimension list is derived from the items, never typed by hand.
46
+
47
+ | dimension | what a pass means |
48
+ |---|---|
49
+ | effort | rates a task 1-10 against a stated ladder; a long prompt with a trivial ask is still trivial |
50
+ | routing_model | picks the one model that CAN do the job (vision, offline, cost), not the nearest name |
51
+ | planning | orders steps by real dependency, and names the step that is impossible |
52
+ | escalation | knows when a job exceeds it, and when it does not |
53
+ | workflow | follows a declared runbook, and flags a gap instead of filling it silently |
54
+ | long_horizon | names what remains of a long goal, not the last thing it did |
55
+ | context_mgmt | crystallises before the window forces it; drops finished work, never the goal |
56
+ | offload | uses what a bigger model returned instead of restating it |
57
+ | logic_traps | resists the answer pattern-matching supplies |
58
+ | knowledge | states a fact, or declines an unknowable one |
59
+ | doctrine | "the check examined nothing" is not a pass; a green healthcheck is not a working feature |
60
+ | repl | knows it is missing information, and names the query that gets it |
61
+ | search | looks up volatile facts and answers stable ones directly, both directions |
62
+ | multi_turn | carries numbers, corrections and standing instructions across turns |
63
+ | tool_reach | picks up the right instrument from a stated roster, and declines one it does not need |
64
+
65
+ The prompts state the platform facts they reason over (the model roster, the effort ladder,
66
+ the operating rules, the tool roster), so a dimension measures reasoning over what the model
67
+ was told, not whether it memorised our names. The rosters name one platform's models and
68
+ tools; if you score a different stack, read `routing_model` and `tool_reach` with that in mind.
69
+
70
+ How a number is made:
71
+
72
+ - **Per-dimension means, then the mean of those.** Dimensions have different item counts, and
73
+ a flat item average silently weights the biggest one.
74
+ - **Unjudged is not zero.** An empty reply, a reply cut off at `--max-tokens`, reasoning that
75
+ never reaches an answer, or a transport error takes the item OUT of the denominator and
76
+ lists it with the reason. A dead endpoint is indistinguishable from a stupid model once you
77
+ score the exception, so we do not.
78
+ - **More than 15% unjudged is not a measurement.** The run reports `comparable: false` and
79
+ `overall: null`.
80
+ - **The minimum detectable effect** is one item flipping on the smallest dimension:
81
+ `1 / items_in_smallest_dimension / dimensions`. A delta below it will reverse on the next run.
82
+ - **Reasoning is stripped before scoring.** A `<think>` block, or an untagged "Thinking
83
+ Process:" preamble, is deliberation, and scoring it punishes a model for considering the
84
+ wrong answer before rejecting it.
85
+
86
+ ## Compare two runs
87
+
88
+ ```bash
89
+ awbench compare baseline.json candidate.json # deltas are candidate - baseline
90
+ awbench compare base.json cand.json --trained planning # losses elsewhere are collateral
91
+ ```
92
+
93
+ Exit `0`: compared, nothing regressed beyond the MDE. Exit `1`: a dimension regressed.
94
+ Exit `2`: refused or incomplete. It refuses, in this order:
95
+
96
+ 1. **Different item sets.** Each run records a fingerprint over the ids it scored. A matching
97
+ count proves nothing, because swapping an item keeps the count; a matching fingerprint
98
+ means the same items. A result with no fingerprint is UNKNOWN and refused, not assumed.
99
+ 2. **Edited prompts under unchanged ids.** Each run also records a content digest over what
100
+ every item sends (system, prompt, follow-ups). Same ids with different content is a
101
+ different ruler.
102
+ 3. **A missing score.** A run that judged nothing, or too little, has no score, and a missing
103
+ score is never compared, not even as a zero.
104
+ 4. **A dimension only one run scored** is shown as NOT COMPARED, and then the overall is not
105
+ compared either.
106
+
107
+ The verdict is `PROMOTE`, `REJECT — regressions`, `REJECT — collateral damage` (a loss
108
+ outside `--trained`), `NO EFFECT` (every delta under the MDE) or `INCOMPLETE` (a dimension
109
+ only one run scored).
110
+
111
+ ## Trust: self-reported rows and re-run rows
112
+
113
+ A result file someone hands you is **self-reported**. It shows what their endpoint returned,
114
+ as their run recorded it. Nothing in the file can prove the endpoint served the model it
115
+ names, that the items were the published ones, or that the file was not edited afterwards.
116
+ It records the `model` field the endpoint sent back and warns when that differs from the
117
+ model asked for, which catches a gateway quietly answering with a stand-in. A server can
118
+ still say anything.
119
+
120
+ A row is **re-run** when you produce it yourself:
121
+
122
+ 1. `awbench items` on your install prints the same fingerprint and content digest the row
123
+ carries (`result.item_set.fingerprint`, `awbench.content_sha256`).
124
+ 2. You run the same model id with your own access: `awbench run --model <id> --url <yours>`.
125
+ 3. `awbench compare their.json yours.json`. `NO EFFECT` means the row reproduces within the
126
+ MDE. Anything else means it does not.
127
+
128
+ Rank self-reported rows and re-run rows as different kinds of evidence, and label which is
129
+ which. A table that mixes them without saying so is quoting claims as measurements.
130
+
131
+ ## From Python
132
+
133
+ ```python
134
+ from awbench import run, comparable_runs
135
+
136
+ def turn(messages): # [{"role": ..., "content": ...}] -> text or (text, finish)
137
+ return my_model(messages)
138
+
139
+ result = run(turn) # result["overall"], result["dimensions"], result["item_set"]
140
+ ok, reason = comparable_runs(result, other_result)
141
+ ```
142
+
143
+ `run(turn_fn)` takes the model as a callable, so the same items score a raw endpoint, an agent
144
+ harness or anything else that answers messages.
145
+
146
+ ## Self-test
147
+
148
+ ```bash
149
+ awbench --self-test
150
+ ```
151
+
152
+ Exit 0 only after it proves each guard can fail: a synthetic model answering from a key
153
+ scores 1.0 on every item (so no item is unpassable) while a constant "Yes." model does not; a
154
+ silent model and a dead transport judge nothing and carry no score; mismatched item sets, a
155
+ missing fingerprint, edited prompts and a missing score are all refused. It never touches the
156
+ network. `awbench doctor` reports what is installed beside it.
157
+
158
+ ## Where it comes from
159
+
160
+ This package is the public home of the AitherBench item set. The `aitherbench` toolpack in
161
+ awdk carries the same items today and will import this package instead of its own copy. A
162
+ result written by that toolpack's driver loads here and compares on the fingerprint rule.
163
+
164
+ ## Limits
165
+
166
+ - 65 items rank candidates. It is not a leaderboard-grade measurement of anything general.
167
+ - Text-only chat completions: no tool calls, no images.
168
+ - The fingerprint covers ids and the digest covers prompts. Neither covers the scorers, which
169
+ are code; pin the awbench version when you compare across time.
170
+ - It measures judgement for running an agent stack. It is not a safety evaluation.
171
+
172
+ ## License
173
+
174
+ Apache-2.0.
@@ -0,0 +1,38 @@
1
+ """awbench -- a hard-oracle benchmark for a served model.
2
+
3
+ Every item is scored by exact match, set membership or an ordering predicate.
4
+ There is no LLM judge anywhere: a judge is a model, and a benchmark whose
5
+ verdict comes from a model cannot tell you the model is wrong.
6
+
7
+ Two results are comparable only when they scored the SAME items. A run records
8
+ an item-set fingerprint (over the scored item ids) and a content digest (over
9
+ what each item sends); `compare` refuses a pair whose fingerprints or digests
10
+ differ, and it never compares a run that has no score.
11
+
12
+ from awbench import ITEMS, DIMENSIONS, run, comparable_runs
13
+ result = run(turn_fn) # turn_fn(messages) -> text | (text, finish)
14
+ """
15
+
16
+ from awbench.bench import (
17
+ DIMENSIONS,
18
+ ITEMS,
19
+ BenchItem,
20
+ UnjudgeableError,
21
+ comparable_runs,
22
+ judge_response,
23
+ regression_report,
24
+ run,
25
+ )
26
+
27
+ __all__ = [
28
+ "DIMENSIONS",
29
+ "ITEMS",
30
+ "BenchItem",
31
+ "UnjudgeableError",
32
+ "comparable_runs",
33
+ "judge_response",
34
+ "regression_report",
35
+ "run",
36
+ ]
37
+
38
+ __version__ = "0.1.0"
@@ -0,0 +1,10 @@
1
+ """`python -m awbench` -- a way in that does not depend on the console shim.
2
+
3
+ A blocked or missing `awbench` script on PATH must not leave the tool
4
+ unreachable; this entry point exists before that outage, not after it.
5
+ """
6
+
7
+ from awbench.cli import main
8
+
9
+ if __name__ == "__main__":
10
+ raise SystemExit(main())