evalkeep 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.
- evalkeep-0.1.0/LICENSE +202 -0
- evalkeep-0.1.0/PKG-INFO +221 -0
- evalkeep-0.1.0/README.md +184 -0
- evalkeep-0.1.0/pyproject.toml +113 -0
- evalkeep-0.1.0/pyproject.toml.orig +111 -0
- evalkeep-0.1.0/src/evalkeep/__init__.py +12 -0
- evalkeep-0.1.0/src/evalkeep/__main__.py +6 -0
- evalkeep-0.1.0/src/evalkeep/adapters/__init__.py +45 -0
- evalkeep-0.1.0/src/evalkeep/adapters/base.py +92 -0
- evalkeep-0.1.0/src/evalkeep/adapters/jsonl.py +164 -0
- evalkeep-0.1.0/src/evalkeep/adapters/langsmith.py +436 -0
- evalkeep-0.1.0/src/evalkeep/adapters/otlp.py +442 -0
- evalkeep-0.1.0/src/evalkeep/adapters/semconv.py +208 -0
- evalkeep-0.1.0/src/evalkeep/analysis.py +174 -0
- evalkeep-0.1.0/src/evalkeep/analysis_run.py +160 -0
- evalkeep-0.1.0/src/evalkeep/analyzers/__init__.py +52 -0
- evalkeep-0.1.0/src/evalkeep/analyzers/anthropic.py +145 -0
- evalkeep-0.1.0/src/evalkeep/analyzers/stub.py +34 -0
- evalkeep-0.1.0/src/evalkeep/cache.py +122 -0
- evalkeep-0.1.0/src/evalkeep/cli.py +1933 -0
- evalkeep-0.1.0/src/evalkeep/clustering.py +383 -0
- evalkeep-0.1.0/src/evalkeep/clusters.py +101 -0
- evalkeep-0.1.0/src/evalkeep/commands/__init__.py +1 -0
- evalkeep-0.1.0/src/evalkeep/commands/analyze_cmd.py +100 -0
- evalkeep-0.1.0/src/evalkeep/commands/compare_cmd.py +169 -0
- evalkeep-0.1.0/src/evalkeep/commands/dataset_cmd.py +182 -0
- evalkeep-0.1.0/src/evalkeep/commands/detect_cmd.py +154 -0
- evalkeep-0.1.0/src/evalkeep/commands/discover_cmd.py +274 -0
- evalkeep-0.1.0/src/evalkeep/commands/ingest_cmd.py +50 -0
- evalkeep-0.1.0/src/evalkeep/commands/init_cmd.py +151 -0
- evalkeep-0.1.0/src/evalkeep/commands/pipeline_cmd.py +156 -0
- evalkeep-0.1.0/src/evalkeep/commands/review_cmd.py +141 -0
- evalkeep-0.1.0/src/evalkeep/commands/run_cmd.py +131 -0
- evalkeep-0.1.0/src/evalkeep/commands/target_cmd.py +109 -0
- evalkeep-0.1.0/src/evalkeep/commands/trace_cmd.py +58 -0
- evalkeep-0.1.0/src/evalkeep/comparison.py +432 -0
- evalkeep-0.1.0/src/evalkeep/config.py +209 -0
- evalkeep-0.1.0/src/evalkeep/detection.py +94 -0
- evalkeep-0.1.0/src/evalkeep/detectors.py +182 -0
- evalkeep-0.1.0/src/evalkeep/discovery.py +208 -0
- evalkeep-0.1.0/src/evalkeep/embeddings/__init__.py +31 -0
- evalkeep-0.1.0/src/evalkeep/embeddings/base.py +32 -0
- evalkeep-0.1.0/src/evalkeep/embeddings/hashing.py +98 -0
- evalkeep-0.1.0/src/evalkeep/errors.py +42 -0
- evalkeep-0.1.0/src/evalkeep/examples/__init__.py +37 -0
- evalkeep-0.1.0/src/evalkeep/examples/langsmith/runs.jsonl +18 -0
- evalkeep-0.1.0/src/evalkeep/examples/opentelemetry/spans.json +898 -0
- evalkeep-0.1.0/src/evalkeep/examples/refund-agent/agents/baseline.py +66 -0
- evalkeep-0.1.0/src/evalkeep/examples/refund-agent/agents/candidate.py +66 -0
- evalkeep-0.1.0/src/evalkeep/examples/refund-agent/traces.jsonl +5 -0
- evalkeep-0.1.0/src/evalkeep/examples/tau-bench/prepare.py +230 -0
- evalkeep-0.1.0/src/evalkeep/exporters/__init__.py +45 -0
- evalkeep-0.1.0/src/evalkeep/exporters/generic.py +31 -0
- evalkeep-0.1.0/src/evalkeep/exporters/promptfoo.py +219 -0
- evalkeep-0.1.0/src/evalkeep/failures.py +95 -0
- evalkeep-0.1.0/src/evalkeep/generation.py +303 -0
- evalkeep-0.1.0/src/evalkeep/hashing.py +56 -0
- evalkeep-0.1.0/src/evalkeep/ingest.py +257 -0
- evalkeep-0.1.0/src/evalkeep/prompts.py +127 -0
- evalkeep-0.1.0/src/evalkeep/pseudonyms.py +82 -0
- evalkeep-0.1.0/src/evalkeep/py.typed +0 -0
- evalkeep-0.1.0/src/evalkeep/redaction.py +333 -0
- evalkeep-0.1.0/src/evalkeep/regression.py +409 -0
- evalkeep-0.1.0/src/evalkeep/review.py +309 -0
- evalkeep-0.1.0/src/evalkeep/runner.py +302 -0
- evalkeep-0.1.0/src/evalkeep/runs.py +185 -0
- evalkeep-0.1.0/src/evalkeep/storage/__init__.py +37 -0
- evalkeep-0.1.0/src/evalkeep/storage/clusters.py +163 -0
- evalkeep-0.1.0/src/evalkeep/storage/failures.py +254 -0
- evalkeep-0.1.0/src/evalkeep/storage/migrations.py +370 -0
- evalkeep-0.1.0/src/evalkeep/storage/regression.py +136 -0
- evalkeep-0.1.0/src/evalkeep/storage/runs.py +223 -0
- evalkeep-0.1.0/src/evalkeep/storage/store.py +429 -0
- evalkeep-0.1.0/src/evalkeep/targets.py +205 -0
- evalkeep-0.1.0/src/evalkeep/trace.py +238 -0
evalkeep-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.
|
evalkeep-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: evalkeep
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Turn production agent failures into a small, reviewed regression suite.
|
|
5
|
+
Keywords: llm,evals,evaluation,regression-testing,ai-agents,testing,promptfoo
|
|
6
|
+
Author: Rakshita Devurkar
|
|
7
|
+
Author-email: Rakshita Devurkar <13130544+rakshita-devurkar@users.noreply.github.com>
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Classifier: Topic :: Software Development :: Testing
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Dist: click>=8.5.0
|
|
23
|
+
Requires-Dist: numpy>=2.4.6
|
|
24
|
+
Requires-Dist: pydantic>=2.13.5
|
|
25
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
26
|
+
Requires-Dist: rich>=15.0.0
|
|
27
|
+
Requires-Dist: typer>=0.27.2
|
|
28
|
+
Requires-Dist: anthropic>=1.0.0 ; extra == 'anthropic'
|
|
29
|
+
Requires-Python: >=3.11
|
|
30
|
+
Project-URL: Homepage, https://github.com/rakshita-devurkar/evalkeep
|
|
31
|
+
Project-URL: Repository, https://github.com/rakshita-devurkar/evalkeep
|
|
32
|
+
Project-URL: Issues, https://github.com/rakshita-devurkar/evalkeep/issues
|
|
33
|
+
Project-URL: Changelog, https://github.com/rakshita-devurkar/evalkeep/blob/main/CHANGELOG.md
|
|
34
|
+
Project-URL: Documentation, https://github.com/rakshita-devurkar/evalkeep/blob/main/docs/pipeline.md
|
|
35
|
+
Provides-Extra: anthropic
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# Evalkeep
|
|
39
|
+
|
|
40
|
+
**Stop fixing the same agent bug twice.** Evalkeep turns production failures
|
|
41
|
+
into a small, reviewed regression suite, and tells you whether a fix held — or
|
|
42
|
+
that the evidence is too thin to say.
|
|
43
|
+
|
|
44
|
+
Existing eval tools *execute* tests. The hard part is deciding which of
|
|
45
|
+
thousands of production traces deserve permanent coverage. Evalkeep owns that
|
|
46
|
+
decision:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
trace → failure evidence → failure family → representative case
|
|
50
|
+
→ reviewed regression test → runner execution → trustworthy comparison
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Evalkeep does not run your agent and is not an eval framework.** It generates
|
|
54
|
+
tests, delegates execution to [Promptfoo](https://promptfoo.dev), and compares
|
|
55
|
+
baseline against candidate. It sits upstream of your eval runner, not next to it.
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git clone https://github.com/rakshita-devurkar/evalkeep && cd evalkeep
|
|
61
|
+
uv sync
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Node.js is needed only for `evalkeep run`, which shells out to Promptfoo.
|
|
65
|
+
|
|
66
|
+
## Quick start
|
|
67
|
+
|
|
68
|
+
One command takes a trace file to a review queue. Offline, no API key:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv run evalkeep demo .
|
|
72
|
+
uv run evalkeep init
|
|
73
|
+
uv run evalkeep from-traces refund-agent/traces.jsonl
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
5 trace(s) ingested
|
|
78
|
+
3 failure(s) found explicit_status x3, failed_evaluator x1, negative_feedback x2
|
|
79
|
+
2 failure famil(ies)
|
|
80
|
+
3 with enough evidence for a regression test
|
|
81
|
+
3 of them only forbid the mistake that was observed; say what should have happened at review.
|
|
82
|
+
|
|
83
|
+
Review them: evalkeep review (3 pending)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
That second qualifier is the honest state of a first run: nothing in a trace
|
|
87
|
+
says what the agent *should* have done. Describing the failures closes it, by
|
|
88
|
+
hand at review or with an analyzer configured. It stops at review on purpose —
|
|
89
|
+
approving a test is a judgement.
|
|
90
|
+
|
|
91
|
+
## On real agent data
|
|
92
|
+
|
|
93
|
+
The example above is five traces. Here is the same pipeline on
|
|
94
|
+
[tau-bench trajectories](https://huggingface.co/datasets/AgentSuite/tau-bench-trajectories):
|
|
95
|
+
165 retail and airline customer-service tasks per model, each scored by
|
|
96
|
+
comparing the final database state against the expected one. Real tool calls,
|
|
97
|
+
and an independent verdict — the two halves a regression suite needs.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
python tau-bench/prepare.py # ~8 MB, two models
|
|
101
|
+
uv run evalkeep from-traces tau-bench/Qwen3-235B-A22B-FP8.traces.jsonl
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
165 trace(s) ingested
|
|
106
|
+
90 failure(s) found explicit_status x90, failed_evaluator x90
|
|
107
|
+
4 failure famil(ies)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Four families, from 90 failures: retail exchange and refund flows, airline
|
|
111
|
+
reservation changes, and two shapes of giving up and escalating to a human.
|
|
112
|
+
Build a test per failure, approve them, and run two recorded models against the
|
|
113
|
+
suite one of them produced:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
uv run evalkeep dataset build --all
|
|
117
|
+
uv run evalkeep review
|
|
118
|
+
uv run evalkeep targets add baseline --type python --function call_api \
|
|
119
|
+
--path tau-bench/replay_Qwen3_235B_A22B_FP8.py
|
|
120
|
+
uv run evalkeep targets add candidate --type python --function call_api \
|
|
121
|
+
--path tau-bench/replay_claude_4_5_sonnet_thinking_off.py
|
|
122
|
+
uv run evalkeep run --target baseline && uv run evalkeep run --target candidate
|
|
123
|
+
uv run evalkeep compare
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
compared 89
|
|
128
|
+
baseline pass rate 4.5%
|
|
129
|
+
candidate pass rate 42.7%
|
|
130
|
+
difference +38.2%
|
|
131
|
+
p-value 0.0000
|
|
132
|
+
95% interval +27.2% to +49.2%
|
|
133
|
+
McNemar's exact test: the change is unlikely to be chance.
|
|
134
|
+
|
|
135
|
+
1 test(s) excluded and not counted in any rate above.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Baseline scoring 4.5% is the control: the tests came from its own failures, so
|
|
139
|
+
it should fail nearly all of them. The four it passes are the documented
|
|
140
|
+
weakness of deriving a test with nothing describing the failure — assertions
|
|
141
|
+
target the last tool call, which is sometimes a harmless lookup. The excluded
|
|
142
|
+
test is one whose target raised rather than answered, and it is kept out of
|
|
143
|
+
every rate rather than counted as a failure.
|
|
144
|
+
|
|
145
|
+
## Doing it stage by stage
|
|
146
|
+
|
|
147
|
+
`from-traces` runs five commands in order. Each is a real decision with its own
|
|
148
|
+
evidence, and you will want them separately once you are tuning a suite:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
uv run evalkeep ingest traces.jsonl # validate, redact, store
|
|
152
|
+
uv run evalkeep detect # evidence-backed failures
|
|
153
|
+
uv run evalkeep analyze # describe them (or: failures label)
|
|
154
|
+
uv run evalkeep discover # embed, cluster, pick representatives
|
|
155
|
+
uv run evalkeep dataset build # draft a test per representative
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Re-running `from-traces` is safe: it skips traces it already has and rebuilds
|
|
159
|
+
drafts, but never touches a test you have reviewed.
|
|
160
|
+
|
|
161
|
+
## Bring your own traces
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
uv run evalkeep ingest spans.json --format otlp # OpenTelemetry / OpenInference
|
|
165
|
+
uv run evalkeep ingest runs.jsonl --format langsmith # LangSmith
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Adapters read files, never APIs — no credentials, any vendor tier. OpenTelemetry
|
|
169
|
+
covers the most ground, since Langfuse, Braintrust and Phoenix all ingest OTLP.
|
|
170
|
+
`evalkeep demo` writes an example export in each format.
|
|
171
|
+
|
|
172
|
+
## Commands
|
|
173
|
+
|
|
174
|
+
| Stage | Commands |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| Set up | `init`, `targets add/list/show/remove` |
|
|
177
|
+
| Ingest | `ingest`, `trace list/show` |
|
|
178
|
+
| Detect | `detect`, `failures list/show/confirm/dismiss/add` |
|
|
179
|
+
| Analyze | `analyze`, `failures label` |
|
|
180
|
+
| Group | `discover`, `clusters list/show/rename/merge/split/dismiss/restore` |
|
|
181
|
+
| Build | `dataset build/list/show` |
|
|
182
|
+
| Review | `review`, `dataset approve/reject/edit` |
|
|
183
|
+
| Run | `export`, `run --target ...`, `runs list/show` |
|
|
184
|
+
| Compare | `compare`, `baseline promote/show` |
|
|
185
|
+
|
|
186
|
+
## What it guarantees
|
|
187
|
+
|
|
188
|
+
- **Values are redacted before storage** — in memory, with no path around it.
|
|
189
|
+
Identifiers can be [pseudonymized](docs/security.md#identifiers) too.
|
|
190
|
+
- **Automation never overwrites human judgement.** Re-running any stage
|
|
191
|
+
refreshes derived data and leaves your reviews, labels and edits alone.
|
|
192
|
+
- **Nothing is exported without approval.** Generated tests are drafts.
|
|
193
|
+
- **A test that never ran is not a test that failed.** Timeouts and crashed
|
|
194
|
+
providers are excluded from every rate, so an outage cannot read as a regression.
|
|
195
|
+
- **One lucky pass is not a fix.** `run --repetitions N` reports a per-case
|
|
196
|
+
verdict; a case that only sometimes passes is flaky, never passing.
|
|
197
|
+
- **Score changes are not overclaimed.** McNemar's exact test, and no confidence
|
|
198
|
+
interval when the sample cannot support one.
|
|
199
|
+
|
|
200
|
+
## More
|
|
201
|
+
|
|
202
|
+
[How it works](docs/pipeline.md) · [Privacy and security](docs/security.md) ·
|
|
203
|
+
[Roadmap](docs/roadmap.md) · [Contributing](CONTRIBUTING.md) ·
|
|
204
|
+
[Changelog](CHANGELOG.md)
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
uv sync && uv run pytest # 985 tests
|
|
208
|
+
uv run ruff check . && uv run mypy # lint and strict types
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
`EVALKEEP_E2E=1 uv run pytest` also runs the suite against real Promptfoo.
|
|
212
|
+
Exit codes: `0` success, `1` ran but some records were rejected, `2` could not
|
|
213
|
+
run.
|
|
214
|
+
|
|
215
|
+
0.1 is feature-complete and not yet released to PyPI. Multi-turn replay and
|
|
216
|
+
longitudinal failure history are still open; see the
|
|
217
|
+
[roadmap](docs/roadmap.md).
|
|
218
|
+
|
|
219
|
+
## License
|
|
220
|
+
|
|
221
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
evalkeep-0.1.0/README.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Evalkeep
|
|
2
|
+
|
|
3
|
+
**Stop fixing the same agent bug twice.** Evalkeep turns production failures
|
|
4
|
+
into a small, reviewed regression suite, and tells you whether a fix held — or
|
|
5
|
+
that the evidence is too thin to say.
|
|
6
|
+
|
|
7
|
+
Existing eval tools *execute* tests. The hard part is deciding which of
|
|
8
|
+
thousands of production traces deserve permanent coverage. Evalkeep owns that
|
|
9
|
+
decision:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
trace → failure evidence → failure family → representative case
|
|
13
|
+
→ reviewed regression test → runner execution → trustworthy comparison
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Evalkeep does not run your agent and is not an eval framework.** It generates
|
|
17
|
+
tests, delegates execution to [Promptfoo](https://promptfoo.dev), and compares
|
|
18
|
+
baseline against candidate. It sits upstream of your eval runner, not next to it.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git clone https://github.com/rakshita-devurkar/evalkeep && cd evalkeep
|
|
24
|
+
uv sync
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Node.js is needed only for `evalkeep run`, which shells out to Promptfoo.
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
One command takes a trace file to a review queue. Offline, no API key:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv run evalkeep demo .
|
|
35
|
+
uv run evalkeep init
|
|
36
|
+
uv run evalkeep from-traces refund-agent/traces.jsonl
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
5 trace(s) ingested
|
|
41
|
+
3 failure(s) found explicit_status x3, failed_evaluator x1, negative_feedback x2
|
|
42
|
+
2 failure famil(ies)
|
|
43
|
+
3 with enough evidence for a regression test
|
|
44
|
+
3 of them only forbid the mistake that was observed; say what should have happened at review.
|
|
45
|
+
|
|
46
|
+
Review them: evalkeep review (3 pending)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
That second qualifier is the honest state of a first run: nothing in a trace
|
|
50
|
+
says what the agent *should* have done. Describing the failures closes it, by
|
|
51
|
+
hand at review or with an analyzer configured. It stops at review on purpose —
|
|
52
|
+
approving a test is a judgement.
|
|
53
|
+
|
|
54
|
+
## On real agent data
|
|
55
|
+
|
|
56
|
+
The example above is five traces. Here is the same pipeline on
|
|
57
|
+
[tau-bench trajectories](https://huggingface.co/datasets/AgentSuite/tau-bench-trajectories):
|
|
58
|
+
165 retail and airline customer-service tasks per model, each scored by
|
|
59
|
+
comparing the final database state against the expected one. Real tool calls,
|
|
60
|
+
and an independent verdict — the two halves a regression suite needs.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python tau-bench/prepare.py # ~8 MB, two models
|
|
64
|
+
uv run evalkeep from-traces tau-bench/Qwen3-235B-A22B-FP8.traces.jsonl
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
165 trace(s) ingested
|
|
69
|
+
90 failure(s) found explicit_status x90, failed_evaluator x90
|
|
70
|
+
4 failure famil(ies)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Four families, from 90 failures: retail exchange and refund flows, airline
|
|
74
|
+
reservation changes, and two shapes of giving up and escalating to a human.
|
|
75
|
+
Build a test per failure, approve them, and run two recorded models against the
|
|
76
|
+
suite one of them produced:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uv run evalkeep dataset build --all
|
|
80
|
+
uv run evalkeep review
|
|
81
|
+
uv run evalkeep targets add baseline --type python --function call_api \
|
|
82
|
+
--path tau-bench/replay_Qwen3_235B_A22B_FP8.py
|
|
83
|
+
uv run evalkeep targets add candidate --type python --function call_api \
|
|
84
|
+
--path tau-bench/replay_claude_4_5_sonnet_thinking_off.py
|
|
85
|
+
uv run evalkeep run --target baseline && uv run evalkeep run --target candidate
|
|
86
|
+
uv run evalkeep compare
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
compared 89
|
|
91
|
+
baseline pass rate 4.5%
|
|
92
|
+
candidate pass rate 42.7%
|
|
93
|
+
difference +38.2%
|
|
94
|
+
p-value 0.0000
|
|
95
|
+
95% interval +27.2% to +49.2%
|
|
96
|
+
McNemar's exact test: the change is unlikely to be chance.
|
|
97
|
+
|
|
98
|
+
1 test(s) excluded and not counted in any rate above.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Baseline scoring 4.5% is the control: the tests came from its own failures, so
|
|
102
|
+
it should fail nearly all of them. The four it passes are the documented
|
|
103
|
+
weakness of deriving a test with nothing describing the failure — assertions
|
|
104
|
+
target the last tool call, which is sometimes a harmless lookup. The excluded
|
|
105
|
+
test is one whose target raised rather than answered, and it is kept out of
|
|
106
|
+
every rate rather than counted as a failure.
|
|
107
|
+
|
|
108
|
+
## Doing it stage by stage
|
|
109
|
+
|
|
110
|
+
`from-traces` runs five commands in order. Each is a real decision with its own
|
|
111
|
+
evidence, and you will want them separately once you are tuning a suite:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
uv run evalkeep ingest traces.jsonl # validate, redact, store
|
|
115
|
+
uv run evalkeep detect # evidence-backed failures
|
|
116
|
+
uv run evalkeep analyze # describe them (or: failures label)
|
|
117
|
+
uv run evalkeep discover # embed, cluster, pick representatives
|
|
118
|
+
uv run evalkeep dataset build # draft a test per representative
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Re-running `from-traces` is safe: it skips traces it already has and rebuilds
|
|
122
|
+
drafts, but never touches a test you have reviewed.
|
|
123
|
+
|
|
124
|
+
## Bring your own traces
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
uv run evalkeep ingest spans.json --format otlp # OpenTelemetry / OpenInference
|
|
128
|
+
uv run evalkeep ingest runs.jsonl --format langsmith # LangSmith
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Adapters read files, never APIs — no credentials, any vendor tier. OpenTelemetry
|
|
132
|
+
covers the most ground, since Langfuse, Braintrust and Phoenix all ingest OTLP.
|
|
133
|
+
`evalkeep demo` writes an example export in each format.
|
|
134
|
+
|
|
135
|
+
## Commands
|
|
136
|
+
|
|
137
|
+
| Stage | Commands |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Set up | `init`, `targets add/list/show/remove` |
|
|
140
|
+
| Ingest | `ingest`, `trace list/show` |
|
|
141
|
+
| Detect | `detect`, `failures list/show/confirm/dismiss/add` |
|
|
142
|
+
| Analyze | `analyze`, `failures label` |
|
|
143
|
+
| Group | `discover`, `clusters list/show/rename/merge/split/dismiss/restore` |
|
|
144
|
+
| Build | `dataset build/list/show` |
|
|
145
|
+
| Review | `review`, `dataset approve/reject/edit` |
|
|
146
|
+
| Run | `export`, `run --target ...`, `runs list/show` |
|
|
147
|
+
| Compare | `compare`, `baseline promote/show` |
|
|
148
|
+
|
|
149
|
+
## What it guarantees
|
|
150
|
+
|
|
151
|
+
- **Values are redacted before storage** — in memory, with no path around it.
|
|
152
|
+
Identifiers can be [pseudonymized](docs/security.md#identifiers) too.
|
|
153
|
+
- **Automation never overwrites human judgement.** Re-running any stage
|
|
154
|
+
refreshes derived data and leaves your reviews, labels and edits alone.
|
|
155
|
+
- **Nothing is exported without approval.** Generated tests are drafts.
|
|
156
|
+
- **A test that never ran is not a test that failed.** Timeouts and crashed
|
|
157
|
+
providers are excluded from every rate, so an outage cannot read as a regression.
|
|
158
|
+
- **One lucky pass is not a fix.** `run --repetitions N` reports a per-case
|
|
159
|
+
verdict; a case that only sometimes passes is flaky, never passing.
|
|
160
|
+
- **Score changes are not overclaimed.** McNemar's exact test, and no confidence
|
|
161
|
+
interval when the sample cannot support one.
|
|
162
|
+
|
|
163
|
+
## More
|
|
164
|
+
|
|
165
|
+
[How it works](docs/pipeline.md) · [Privacy and security](docs/security.md) ·
|
|
166
|
+
[Roadmap](docs/roadmap.md) · [Contributing](CONTRIBUTING.md) ·
|
|
167
|
+
[Changelog](CHANGELOG.md)
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
uv sync && uv run pytest # 985 tests
|
|
171
|
+
uv run ruff check . && uv run mypy # lint and strict types
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
`EVALKEEP_E2E=1 uv run pytest` also runs the suite against real Promptfoo.
|
|
175
|
+
Exit codes: `0` success, `1` ran but some records were rejected, `2` could not
|
|
176
|
+
run.
|
|
177
|
+
|
|
178
|
+
0.1 is feature-complete and not yet released to PyPI. Multi-turn replay and
|
|
179
|
+
longitudinal failure history are still open; see the
|
|
180
|
+
[roadmap](docs/roadmap.md).
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
|
+
Apache-2.0. See [LICENSE](LICENSE).
|