agent-comparability 0.5.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.
- agent_comparability-0.5.2/LICENSE +202 -0
- agent_comparability-0.5.2/NOTICE +10 -0
- agent_comparability-0.5.2/PKG-INFO +351 -0
- agent_comparability-0.5.2/README.md +333 -0
- agent_comparability-0.5.2/pyproject.toml +23 -0
- agent_comparability-0.5.2/setup.cfg +4 -0
- agent_comparability-0.5.2/src/agent_comparability/__init__.py +3 -0
- agent_comparability-0.5.2/src/agent_comparability/core.py +113 -0
- agent_comparability-0.5.2/src/agent_comparability/data/SPEC.md +115 -0
- agent_comparability-0.5.2/src/agent_comparability/data/boundary-cases.json +38 -0
- agent_comparability-0.5.2/src/agent_comparability/data/cdr.schema.json +89 -0
- agent_comparability-0.5.2/src/agent_comparability/data/frozen-cases-a.json +51 -0
- agent_comparability-0.5.2/src/agent_comparability/py.typed +0 -0
- agent_comparability-0.5.2/src/agent_comparability.egg-info/PKG-INFO +351 -0
- agent_comparability-0.5.2/src/agent_comparability.egg-info/SOURCES.txt +19 -0
- agent_comparability-0.5.2/src/agent_comparability.egg-info/dependency_links.txt +1 -0
- agent_comparability-0.5.2/src/agent_comparability.egg-info/requires.txt +10 -0
- agent_comparability-0.5.2/src/agent_comparability.egg-info/top_level.txt +1 -0
- agent_comparability-0.5.2/tests/test_gate_regressions.py +172 -0
- agent_comparability-0.5.2/tests/test_properties.py +46 -0
- agent_comparability-0.5.2/tests/test_smoke.py +11 -0
|
@@ -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.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Agent Comparability
|
|
2
|
+
Copyright 2026 Agent Comparability contributors
|
|
3
|
+
|
|
4
|
+
This product includes software developed as part of the Agent Comparability
|
|
5
|
+
project (specification cmp/0.3.1 and reference implementation).
|
|
6
|
+
|
|
7
|
+
This distribution bundles no third-party code. Optional integrations
|
|
8
|
+
(inspect-ai, pydantic-evals — both MIT) are user-installed and NOT bundled.
|
|
9
|
+
Conformance case data is original to this project.
|
|
10
|
+
This distribution contains NO CC BY-NC licensed data.
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-comparability
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: Agent evaluation comparability semantics: spec + conformance suite + thin reference implementation
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: NOTICE
|
|
10
|
+
Provides-Extra: suite
|
|
11
|
+
Requires-Dist: pyyaml; extra == "suite"
|
|
12
|
+
Requires-Dist: jsonschema; extra == "suite"
|
|
13
|
+
Provides-Extra: inspect
|
|
14
|
+
Requires-Dist: inspect-ai; extra == "inspect"
|
|
15
|
+
Provides-Extra: pydantic
|
|
16
|
+
Requires-Dist: pydantic-evals; extra == "pydantic"
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
<div align="center">
|
|
20
|
+
|
|
21
|
+
# Agent Comparability
|
|
22
|
+
|
|
23
|
+
**Experimental Specification & Conformance Suite** for AI agent evaluation comparability
|
|
24
|
+
|
|
25
|
+
[](https://github.com/Rethymus/agent-comparability/actions/workflows/ci.yml)
|
|
26
|
+
[](LICENSE)
|
|
27
|
+
[](pyproject.toml)
|
|
28
|
+
|
|
29
|
+
**English** | [简体中文](README.zh-CN.md)
|
|
30
|
+
|
|
31
|
+
*When can you compare AI agent evaluation results — and what claims do they support?*
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
> [!IMPORTANT]
|
|
38
|
+
> This project adjudicates **comparability of evaluation records** — it does **not** run
|
|
39
|
+
> agents, score benchmarks, or certify any agent's reliability. Passing the conformance
|
|
40
|
+
> suite means *specification* conformance, nothing more.
|
|
41
|
+
|
|
42
|
+
**The 30-second path**: [Install](#6-installation) → [Quickstart](#7-quickstart) →
|
|
43
|
+
[Real input/output](#8-inputoutput-example-actual-output).
|
|
44
|
+
|
|
45
|
+
<details open>
|
|
46
|
+
<summary><b>Table of Contents</b></summary>
|
|
47
|
+
|
|
48
|
+
1. [Project Overview](#1-project-overview)
|
|
49
|
+
2. [Problem & Motivation](#2-problem--motivation)
|
|
50
|
+
3. [What Agent Comparability Does](#3-what-agent-comparability-does)
|
|
51
|
+
4. [What It Does Not Do](#4-what-it-does-not-do)
|
|
52
|
+
5. [Main Features](#5-main-features)
|
|
53
|
+
6. [Installation](#6-installation)
|
|
54
|
+
7. [Quickstart](#7-quickstart)
|
|
55
|
+
8. [Input/Output Example (actual output)](#8-inputoutput-example-actual-output)
|
|
56
|
+
9. [Architecture](#9-architecture)
|
|
57
|
+
10. [Conformance Suite](#10-conformance-suite)
|
|
58
|
+
11. [Inspect AI / Pydantic Evals Integrations](#11-inspect-ai--pydantic-evals-integrations)
|
|
59
|
+
12. [Specification & Versioning](#12-specification--versioning)
|
|
60
|
+
13. [Limitations](#13-limitations)
|
|
61
|
+
14. [Contributing](#14-contributing)
|
|
62
|
+
15. [Security](#15-security)
|
|
63
|
+
16. [License & Acknowledgements](#16-license--acknowledgements)
|
|
64
|
+
|
|
65
|
+
[FAQ](#faq) · [Project status](#project-status)
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 1. Project Overview
|
|
72
|
+
|
|
73
|
+
Agent Comparability is a framework-independent **specification** ([spec/SPEC.md](spec/SPEC.md)),
|
|
74
|
+
a frozen **conformance suite**, and a thin **reference implementation** that adjudicates
|
|
75
|
+
*comparability* of agent evaluation records — never the scores themselves.
|
|
76
|
+
|
|
77
|
+
**Who is this for**: developers comparing agent/prompt/harness evaluation results,
|
|
78
|
+
benchmark authors documenting what conclusions their data supports, and teams building
|
|
79
|
+
reliability pipelines on top of existing eval frameworks.
|
|
80
|
+
|
|
81
|
+
### How it relates to existing tools
|
|
82
|
+
|
|
83
|
+
| Tool | What it does | Relation to Agent Comparability |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| [Inspect AI](https://inspect.aisi.org.uk) | Runs evals, agents, sandboxes | Complementary — Inspect *executes*; this decides what comparisons its results support. Adapter provided. |
|
|
86
|
+
| [Pydantic Evals](https://pydantic.dev) | Datasets, cases, reporting | Complementary reporting layer over the same core. Adapter provided. |
|
|
87
|
+
| Benchmark harnesses (lm-eval, SWE-bench, …) | Measure models | They *produce* records; this adjudicates what comparisons of those records mean |
|
|
88
|
+
|
|
89
|
+
## 2. Problem & Motivation
|
|
90
|
+
|
|
91
|
+
Three failure modes silently corrupt agent-evaluation conclusions:
|
|
92
|
+
|
|
93
|
+
| Failure mode | What actually goes wrong |
|
|
94
|
+
|---|---|
|
|
95
|
+
| **Semantics mixing** | A *verified failure* and an *unresolved zero* both read `0.0` — pooled "fail rates" become meaningless |
|
|
96
|
+
| **Confounded variables** | Model and harness change at the same time — a two-variable diff gets reported as causation |
|
|
97
|
+
| **Evidence gaps** | Missing traces quietly inflate success rates; rankings reverse across harnesses |
|
|
98
|
+
|
|
99
|
+
These boundaries should be **machine-checkable**, not vibes. That is what this project ships.
|
|
100
|
+
|
|
101
|
+
## 3. What Agent Comparability Does
|
|
102
|
+
|
|
103
|
+
- Adjudicates a **Requested Claim** (e.g. `score_comparison`, `causal`,
|
|
104
|
+
`descriptive_registration`) against a set of evaluation records
|
|
105
|
+
- Returns a **Comparison Decision Record (CDR)**: admissibility
|
|
106
|
+
(`ADMISSIBLE / INADMISSIBLE / PARTIAL / INCONCLUSIVE`), satisfied/violated/unknown
|
|
107
|
+
conditions, **supported claims AND forbidden claims**, evidence refs, policy version
|
|
108
|
+
- Enforces evidence-trust tiers (agent-claimed vs source-verifier vs independently
|
|
109
|
+
verified), score-scale consistency (range/unit/verifier), zero-semantics splits,
|
|
110
|
+
and unknown-field/unknown-claim rules
|
|
111
|
+
- Ships a frozen conformance suite run against three separated metrics
|
|
112
|
+
|
|
113
|
+
**Admissibility quick reference** (full priority rules in [SPEC §3.3](spec/SPEC.md)):
|
|
114
|
+
|
|
115
|
+
| Verdict | Meaning | Typical trigger |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `ADMISSIBLE` | Requested conclusion is supported | Same task / model / score scale, all records verified |
|
|
118
|
+
| `INADMISSIBLE` | Conclusion not supported | Confounded variables, task mismatch, or score-scale mismatch |
|
|
119
|
+
| `PARTIAL` | Only split presentation allowed | `verified` failures mixed with `unresolved_zero` |
|
|
120
|
+
| `INCONCLUSIVE` | Evidence insufficient to judge | Missing traces / evidence anchors |
|
|
121
|
+
|
|
122
|
+
## 4. What It Does Not Do
|
|
123
|
+
|
|
124
|
+
> [!WARNING]
|
|
125
|
+
> - Does **not** run agents, benchmarks, or models; no network, no credentials, no Docker
|
|
126
|
+
> - Does **not** score anything or certify any agent's reliability
|
|
127
|
+
> - Never merges its three conformance metrics into one number (see [§10](#10-conformance-suite))
|
|
128
|
+
|
|
129
|
+
## 5. Main Features
|
|
130
|
+
|
|
131
|
+
- `adjudicate(records, requested_claim) -> CDR` — pure Python, zero dependencies
|
|
132
|
+
- Priority-ordered decision table (evidence-missing > confounded > semantics > admissible)
|
|
133
|
+
- Machine-verifiable CDR JSON Schema ([spec/cdr.schema.json](spec/cdr.schema.json))
|
|
134
|
+
- Frozen A/B conformance case sets; B5 public erratum precedent protected
|
|
135
|
+
- Optional adapters for Inspect AI and Pydantic Evals reusing the same core
|
|
136
|
+
|
|
137
|
+
## 6. Installation
|
|
138
|
+
|
|
139
|
+
From PyPI (first published release: `0.5.2`):
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pip install agent-comparability # minimal core, zero deps
|
|
143
|
+
pip install "agent-comparability[suite]" # + suite basics (pyyaml, jsonschema)
|
|
144
|
+
pip install "agent-comparability[suite,inspect,pydantic]" # FULL conformance run
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
From a clone (development):
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
git clone https://github.com/Rethymus/agent-comparability.git && cd agent-comparability
|
|
151
|
+
pip install -e . # minimal core, zero deps
|
|
152
|
+
pip install -e .[suite] # + suite basics (pyyaml, jsonschema)
|
|
153
|
+
pip install -e .[suite,inspect,pydantic] # FULL conformance run — required by run_suite.py
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Requires Python ≥ 3.10. No Docker, no model keys.
|
|
157
|
+
|
|
158
|
+
## 7. Quickstart
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
from agent_comparability import adjudicate
|
|
162
|
+
|
|
163
|
+
cdr = adjudicate({"id": "demo", "records": [
|
|
164
|
+
{"task_id": "t1", "harness": "h1", "model": "m1",
|
|
165
|
+
"reward": 1.0, "reward_status": "verified"},
|
|
166
|
+
{"task_id": "t1", "harness": "h2", "model": "m1",
|
|
167
|
+
"reward": 0.0, "reward_status": "unresolved_zero"}]},
|
|
168
|
+
"score_comparison")
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## 8. Input/Output Example (actual output)
|
|
172
|
+
|
|
173
|
+
> Note: the reference implementation's condition/claim messages are currently in Chinese; the admissibility verdict itself is locale-neutral.
|
|
174
|
+
|
|
175
|
+
The quickstart call returns:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
cdr.admissibility -> PARTIAL
|
|
179
|
+
cdr.supported_claims -> ['per_status_stratified_rate(verified_zero/unresolved_zero 分列)']
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
A confounded group instead:
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
cdr = adjudicate({"id": "x", "records": [
|
|
186
|
+
{"task_id": "a", "harness": "h1", "model": "m1", "reward": 1.0, "reward_status": "verified"},
|
|
187
|
+
{"task_id": "b", "harness": "h2", "model": "m2", "reward": 0.0, "reward_status": "verified"}]},
|
|
188
|
+
"score_comparison")
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
cdr.admissibility -> INADMISSIBLE
|
|
193
|
+
cdr.violated_conditions -> ['same_task_id', 'same_model', 'single_variable_isolation']
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
`cdr.to_dict()` emits the full CDR (schema-validated). The quickstart call's complete
|
|
197
|
+
CDR — actual output:
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"case_id": "demo",
|
|
202
|
+
"requested_claim": "score_comparison",
|
|
203
|
+
"comparison_scope": "2 records; models=['m1']; harnesses=['h1', 'h2']",
|
|
204
|
+
"admissibility": "PARTIAL",
|
|
205
|
+
"satisfied_conditions": [
|
|
206
|
+
"same_task_id",
|
|
207
|
+
"same_model",
|
|
208
|
+
"single_variable_isolation",
|
|
209
|
+
"continuous_score_preserved({'range': '0..1', 'unit': 'fraction', 'verifier': 'source'})"
|
|
210
|
+
],
|
|
211
|
+
"violated_conditions": [
|
|
212
|
+
"zero_semantics_uniform(verified_zero != unresolved_zero)"
|
|
213
|
+
],
|
|
214
|
+
"unknown_conditions": [],
|
|
215
|
+
"supported_claims": [
|
|
216
|
+
"per_status_stratified_rate(verified_zero/unresolved_zero 分列)"
|
|
217
|
+
],
|
|
218
|
+
"unsupported_claims": [
|
|
219
|
+
"pooled_fail_rate(0 分语义混同)"
|
|
220
|
+
],
|
|
221
|
+
"evidence_refs": [
|
|
222
|
+
"rec:t1/m1/h1",
|
|
223
|
+
"rec:t1/m1/h2"
|
|
224
|
+
],
|
|
225
|
+
"policy_version": "cmp/0.3.1",
|
|
226
|
+
"limitations": [
|
|
227
|
+
"摘要一致仅证明未同步修改,不构成抗恶意篡改(单写信任域)"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## 9. Architecture
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
spec/SPEC.md ← single source of truth (readable standalone)
|
|
236
|
+
spec/cdr.schema.json ← machine-verifiable CDR
|
|
237
|
+
src/agent_comparability/core.py ← thin reference implementation
|
|
238
|
+
src/agent_comparability/data/ ← SPEC + schema + frozen cases (packaged)
|
|
239
|
+
conformance/ ← run_suite.py (3 metrics) + independent_impl.py + cases
|
|
240
|
+
adapters/ ← optional inspect-ai / pydantic-evals wrappers
|
|
241
|
+
tests/ ← smoke + property tests
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Adjudication flow (priority order, per [SPEC §3.3](spec/SPEC.md)):
|
|
245
|
+
|
|
246
|
+
```mermaid
|
|
247
|
+
flowchart LR
|
|
248
|
+
A[Records + Requested Claim] --> B{trace available?}
|
|
249
|
+
B -- missing --> C[INCONCLUSIVE]
|
|
250
|
+
B -- ok --> D{task / model /<br/>score scale consistent?}
|
|
251
|
+
D -- conflict --> E[INADMISSIBLE]
|
|
252
|
+
D -- ok --> F{zero semantics uniform?}
|
|
253
|
+
F -- verified + unresolved mixed --> G[PARTIAL]
|
|
254
|
+
F -- ok --> H[ADMISSIBLE]
|
|
255
|
+
C & E & G & H --> V[CDR<br/>supported + forbidden claims]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## 10. Conformance Suite
|
|
259
|
+
|
|
260
|
+
`python conformance/run_suite.py` reports three **separated** metrics that must
|
|
261
|
+
never be merged:
|
|
262
|
+
|
|
263
|
+
1. **Policy correctness** — reference implementation vs frozen expectations
|
|
264
|
+
2. **Spec conformance** — an independent implementation written from SPEC alone
|
|
265
|
+
3. **Integration consistency** — the same core via Inspect/Pydantic adapters
|
|
266
|
+
|
|
267
|
+
A failure in each means a different defect class (implementation bug / spec
|
|
268
|
+
ambiguity or misread / adapter bug).
|
|
269
|
+
|
|
270
|
+
The full suite run requires the adapter extras (`.[suite,inspect,pydantic]`) — a missing adapter is treated as FAIL, not skipped.
|
|
271
|
+
|
|
272
|
+
## 11. Inspect AI / Pydantic Evals Integrations
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
pip install -e .[inspect] && python adapters/inspect_adapter.py
|
|
276
|
+
pip install -e .[pydantic] && python adapters/pydantic_adapter.py
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Both wrap the *same* core (no semantic duplication). Inspect scorer uses
|
|
280
|
+
`metrics=[]` — admissibility is deliberately **not** aggregated into accuracy.
|
|
281
|
+
The Pydantic evaluator checks the **task's real output** (`ctx.output`) against
|
|
282
|
+
frozen expectations — it never re-adjudicates inside the evaluator — and the
|
|
283
|
+
adapter's exit code derives from the full 22-pair `report` (cases + failures).
|
|
284
|
+
|
|
285
|
+
## 12. Specification & Versioning
|
|
286
|
+
|
|
287
|
+
Three distinct lines: software tag (e.g. `v0.5.0`), specification `cmp/0.3.1`
|
|
288
|
+
(inside SPEC), and `agent_comparability.__version__`. Judgment-table changes
|
|
289
|
+
require a spec major bump (SPEC §5). See [CHANGELOG](CHANGELOG.md) for the full tag lineage
|
|
290
|
+
(v0.3.1–v0.3.6 are deprecated candidates kept immutably for the record).
|
|
291
|
+
|
|
292
|
+
## 13. Limitations
|
|
293
|
+
|
|
294
|
+
- Experimental specification; self-tested conformance, **no external certification**
|
|
295
|
+
- Single-writer trust domain: digest equality proves non-divergence, not
|
|
296
|
+
tamper-resistance (SPEC §1)
|
|
297
|
+
- No repetition/cost modeling inside adjudication (handled by callers)
|
|
298
|
+
- Chinese/English docs kept equivalent; translation drift tracked in CI link checks
|
|
299
|
+
|
|
300
|
+
## FAQ
|
|
301
|
+
|
|
302
|
+
**Does passing the conformance suite certify my agent is reliable?**
|
|
303
|
+
No. It certifies that an *implementation* matches the specification. It says nothing about any agent.
|
|
304
|
+
|
|
305
|
+
**Can I use it with my existing eval framework?**
|
|
306
|
+
Yes. The core is framework-independent (`adjudicate()` is a pure function over record
|
|
307
|
+
dicts). Adapters for Inspect AI and Pydantic Evals are included; any framework whose
|
|
308
|
+
output you can map to the [record schema](spec/SPEC.md#0-范围与目的) works.
|
|
309
|
+
|
|
310
|
+
**Why not just compare scores?**
|
|
311
|
+
Because `0.0` can mean a *verified failure* or an *unresolved zero*; because model and
|
|
312
|
+
harness changing together turns a diff into an unfounded causal claim; and because
|
|
313
|
+
missing traces inflate success rates silently. §2's failure modes are all real-world
|
|
314
|
+
artifacts, not hypotheticals.
|
|
315
|
+
|
|
316
|
+
**Does it run agents or benchmarks?**
|
|
317
|
+
No — no network, no credentials, no Docker. It only ever sees the records you pass in.
|
|
318
|
+
|
|
319
|
+
**Which versions should I depend on?**
|
|
320
|
+
Package `v0.5.0+` (version lines unified and CI-enforced since then); specification
|
|
321
|
+
`cmp/0.3.1` evolves independently — see [§12](#12-specification--versioning).
|
|
322
|
+
|
|
323
|
+
## Project status
|
|
324
|
+
|
|
325
|
+
| Component | Status |
|
|
326
|
+
|---|---|
|
|
327
|
+
| Specification `cmp/0.3.1` | Stable — frozen conformance set anchors it |
|
|
328
|
+
| Claim types | `score_comparison`, `causal`, `descriptive_registration` (+ unknown → `INCONCLUSIVE`) |
|
|
329
|
+
| Conformance cases | 22 frozen pairs (A + B sets), three separated metrics, all green in CI |
|
|
330
|
+
| Adapters | Inspect AI ✓ · Pydantic Evals ✓ |
|
|
331
|
+
| CI gates | Terminal scan · bilingual docs · conformance ×3 · tests · release version · build + twine · package content |
|
|
332
|
+
| Repo governance | `main` protected (PR + required check), release tags `v*` immutable |
|
|
333
|
+
| Distribution | PyPI (`agent-comparability`, since `0.5.2`, Trusted Publishing) + GitHub source/tags |
|
|
334
|
+
|
|
335
|
+
## 14. Contributing
|
|
336
|
+
|
|
337
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Key rule: **never edit frozen expectations
|
|
338
|
+
to make tests pass**; errata follow the public B5 precedent. PRs must pass all
|
|
339
|
+
three conformance metrics separately.
|
|
340
|
+
|
|
341
|
+
## 15. Security
|
|
342
|
+
|
|
343
|
+
See [SECURITY.md](SECURITY.md). Private vulnerability reporting preferred.
|
|
344
|
+
|
|
345
|
+
## 16. License & Acknowledgements
|
|
346
|
+
|
|
347
|
+
Apache-2.0 (see [LICENSE](LICENSE), [NOTICE](NOTICE)). Optional integrations
|
|
348
|
+
inspect-ai / pydantic-evals are MIT and **not bundled**. Conformance case data is
|
|
349
|
+
original to this project; no CC BY-NC data is distributed. Research lineage:
|
|
350
|
+
this repo was distilled from a private research repository; internal process
|
|
351
|
+
records live under `docs/internal/`.
|