mindzeval 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.
Files changed (60) hide show
  1. mindzeval-0.1.0/.github/ISSUE_TEMPLATE/feedback.md +21 -0
  2. mindzeval-0.1.0/.github/pull_request_template.md +12 -0
  3. mindzeval-0.1.0/.github/workflows/ci.yml +73 -0
  4. mindzeval-0.1.0/.github/workflows/release.yml +36 -0
  5. mindzeval-0.1.0/.gitignore +26 -0
  6. mindzeval-0.1.0/CHANGELOG.md +39 -0
  7. mindzeval-0.1.0/LICENSE +202 -0
  8. mindzeval-0.1.0/PKG-INFO +137 -0
  9. mindzeval-0.1.0/README.md +98 -0
  10. mindzeval-0.1.0/docs/getting-started.md +59 -0
  11. mindzeval-0.1.0/docs/guides/connecting-agents.md +139 -0
  12. mindzeval-0.1.0/docs/guides/custom-scorers.md +33 -0
  13. mindzeval-0.1.0/docs/reference/agent-response.md +39 -0
  14. mindzeval-0.1.0/docs/reference/case-format.md +113 -0
  15. mindzeval-0.1.0/docs/reference/config.md +130 -0
  16. mindzeval-0.1.0/docs/reference/results.md +71 -0
  17. mindzeval-0.1.0/pyproject.toml +87 -0
  18. mindzeval-0.1.0/src/mindzeval/__init__.py +63 -0
  19. mindzeval-0.1.0/src/mindzeval/_version.py +1 -0
  20. mindzeval-0.1.0/src/mindzeval/adapters/__init__.py +58 -0
  21. mindzeval-0.1.0/src/mindzeval/adapters/base.py +101 -0
  22. mindzeval-0.1.0/src/mindzeval/adapters/http.py +190 -0
  23. mindzeval-0.1.0/src/mindzeval/adapters/outputs.py +81 -0
  24. mindzeval-0.1.0/src/mindzeval/adapters/python.py +140 -0
  25. mindzeval-0.1.0/src/mindzeval/adapters/resilient.py +66 -0
  26. mindzeval-0.1.0/src/mindzeval/cli.py +295 -0
  27. mindzeval-0.1.0/src/mindzeval/db.py +270 -0
  28. mindzeval-0.1.0/src/mindzeval/errors.py +78 -0
  29. mindzeval-0.1.0/src/mindzeval/loading.py +641 -0
  30. mindzeval-0.1.0/src/mindzeval/py.typed +0 -0
  31. mindzeval-0.1.0/src/mindzeval/quickstart.py +328 -0
  32. mindzeval-0.1.0/src/mindzeval/report.py +3032 -0
  33. mindzeval-0.1.0/src/mindzeval/results.py +225 -0
  34. mindzeval-0.1.0/src/mindzeval/runner.py +393 -0
  35. mindzeval-0.1.0/src/mindzeval/schema/__init__.py +52 -0
  36. mindzeval-0.1.0/src/mindzeval/schema/case.py +383 -0
  37. mindzeval-0.1.0/src/mindzeval/schema/config.py +318 -0
  38. mindzeval-0.1.0/src/mindzeval/schema/response.py +138 -0
  39. mindzeval-0.1.0/src/mindzeval/scoring/behavior.py +106 -0
  40. mindzeval-0.1.0/src/mindzeval/scoring/compare.py +433 -0
  41. mindzeval-0.1.0/src/mindzeval/scoring/custom.py +64 -0
  42. mindzeval-0.1.0/src/mindzeval/scoring/execution.py +244 -0
  43. mindzeval-0.1.0/src/mindzeval/scoring/safety.py +86 -0
  44. mindzeval-0.1.0/src/mindzeval/scoring/values.py +105 -0
  45. mindzeval-0.1.0/src/mindzeval/sql/__init__.py +10 -0
  46. mindzeval-0.1.0/src/mindzeval/sql/guard.py +181 -0
  47. mindzeval-0.1.0/src/mindzeval/validate.py +337 -0
  48. mindzeval-0.1.0/tests/conftest.py +38 -0
  49. mindzeval-0.1.0/tests/test_adapters.py +254 -0
  50. mindzeval-0.1.0/tests/test_case.py +139 -0
  51. mindzeval-0.1.0/tests/test_cli.py +61 -0
  52. mindzeval-0.1.0/tests/test_compare.py +204 -0
  53. mindzeval-0.1.0/tests/test_db.py +116 -0
  54. mindzeval-0.1.0/tests/test_docs.py +27 -0
  55. mindzeval-0.1.0/tests/test_guard.py +78 -0
  56. mindzeval-0.1.0/tests/test_loading.py +305 -0
  57. mindzeval-0.1.0/tests/test_response.py +50 -0
  58. mindzeval-0.1.0/tests/test_run.py +296 -0
  59. mindzeval-0.1.0/tests/test_scoring.py +249 -0
  60. mindzeval-0.1.0/tests/test_validate.py +158 -0
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: Feedback
3
+ about: Tell us what happened when you ran MindzEval on your agent
4
+ labels: feedback
5
+ ---
6
+
7
+ **Agent:** framework (LangGraph, CrewAI, HTTP service, ...) and adapter used (python / http / outputs)
8
+
9
+ **Does your agent return:** SQL? rows? status (answer / clarify / decline)?
10
+
11
+ **Database:** Postgres / SQLite / other
12
+
13
+ **Time to first score:** roughly how long, and where you got stuck
14
+
15
+ **Verdicts you think are wrong** (case id, verdict, cause, and why):
16
+
17
+ **What was confusing or missing:**
18
+
19
+ **Would you run this in CI?** yes / no / why
20
+
21
+ <!-- Please don't paste credentials, customer data or full result rows. -->
@@ -0,0 +1,12 @@
1
+ ## What changed
2
+
3
+ ## Why
4
+
5
+ ## How it was tested
6
+
7
+ - [ ] `pytest`
8
+ - [ ] `ruff check src tests` and `ruff format --check src tests`
9
+ - [ ] `mypy`
10
+ - [ ] Docs and `CHANGELOG.md` updated if behaviour or interfaces changed
11
+
12
+ <!-- Never include credentials, client schemas or client data in code, tests or examples. -->
@@ -0,0 +1,73 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [development, main, production]
6
+ pull_request:
7
+ branches: [development, main, production]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ lint:
18
+ name: Lint and type check
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+ - run: python -m pip install --upgrade pip
26
+ - run: pip install -e ".[dev]"
27
+ - run: ruff check src tests
28
+ - run: ruff format --check src tests
29
+ - run: mypy
30
+
31
+ test:
32
+ name: Test (${{ matrix.os }}, Python ${{ matrix.python }})
33
+ runs-on: ${{ matrix.os }}
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ os: [ubuntu-latest, windows-latest, macos-latest]
38
+ python: ["3.11", "3.12", "3.13"]
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: ${{ matrix.python }}
44
+ - run: python -m pip install --upgrade pip
45
+ - run: pip install -e ".[dev]"
46
+ - run: pytest
47
+
48
+ postgres:
49
+ name: Test against Postgres
50
+ runs-on: ubuntu-latest
51
+ services:
52
+ postgres:
53
+ image: postgres:16
54
+ env:
55
+ POSTGRES_USER: mindzeval
56
+ POSTGRES_PASSWORD: mindzeval
57
+ POSTGRES_DB: mindzeval
58
+ ports: ["5432:5432"]
59
+ options: >-
60
+ --health-cmd "pg_isready -U mindzeval"
61
+ --health-interval 5s
62
+ --health-timeout 5s
63
+ --health-retries 10
64
+ env:
65
+ MINDZEVAL_TEST_POSTGRES_URL: postgresql://mindzeval:mindzeval@localhost:5432/mindzeval
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+ - uses: actions/setup-python@v5
69
+ with:
70
+ python-version: "3.12"
71
+ - run: python -m pip install --upgrade pip
72
+ - run: pip install -e ".[dev,postgres]"
73
+ - run: pytest tests/test_db.py -v
@@ -0,0 +1,36 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ pypi-publish:
12
+ name: Build and publish to PyPI
13
+ runs-on: ubuntu-latest
14
+ environment:
15
+ name: pypi
16
+ url: https://pypi.org/p/mindzeval
17
+ permissions:
18
+ id-token: write # Mandatory for PyPI Trusted Publishing (OIDC)
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install build tools
29
+ run: python -m pip install --upgrade pip build
30
+
31
+ - name: Build sdist and wheel
32
+ run: python -m build
33
+
34
+ - name: Publish distribution to PyPI
35
+ uses: pypa/gh-action-pypi-publish@release/v1
36
+
@@ -0,0 +1,26 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ build/
6
+ dist/
7
+ .venv/
8
+ venv/
9
+
10
+ # Tooling
11
+ .pytest_cache/
12
+ .mypy_cache/
13
+ .ruff_cache/
14
+ .coverage
15
+ htmlcov/
16
+
17
+ # MindzEval run output and local secrets
18
+ mindzeval-results/
19
+ .env
20
+ .env.*
21
+
22
+ # Editors / OS
23
+ .vscode/
24
+ .idea/
25
+ .DS_Store
26
+ Thumbs.db
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to MindzEval are recorded here. The project follows
4
+ [semantic versioning](https://semver.org/); until `1.0` the public interfaces may change
5
+ between minor versions.
6
+
7
+ ## [0.1.0] - 2026-11-12
8
+
9
+ ### Added
10
+ - **Contracts:** agent result record, case format (single- and multi-turn, six comparison
11
+ modes, composite keys, expected behaviour, trace assertions, tolerance overrides) and the
12
+ `mindzeval.yaml` config.
13
+ - **Loading:** YAML / JSON / JSONL / CSV datasets with per-file defaults; every problem
14
+ reported with file, line and field; `${ENV}` secrets; literal credentials refused.
15
+ - **Agent adapters:** Python function (sync or async, any framework), HTTP endpoint (body
16
+ templates, response mapping, status translation) and pre-generated outputs; timeouts,
17
+ retries with backoff, rate limiting and concurrency.
18
+ - **Database layer:** Postgres and SQLite, read-only transactions, statement timeouts, and
19
+ a SQL guard that refuses anything but a single read query.
20
+ - **Golden validator** (`mindzeval validate`): reference errors, empty results, drift,
21
+ stability, NULL groups and orphan-inflated answers (declared foreign keys or configured
22
+ relationships).
23
+ - **Scoring:** set, ordered, scalar, grouped and value-based table comparison with a
24
+ configurable tolerance policy; precision / recall / F1; replay of the agent's SQL when it
25
+ returns no rows; uncapped replay to separate display limits from logic errors; behaviour
26
+ scored in both directions; trace assertions; safety checks (write attempts, forbidden
27
+ tables, PII); custom scorers; one failure cause per failed turn.
28
+ - **Runs** (`mindzeval run`): filters by tag, case and limit; dry run; matrix runs across
29
+ models / prompts / any parameter; CSV, JSON and HTML reports; console summary; CI
30
+ thresholds and exit codes.
31
+ - `mindzeval quickstart`: a runnable example project.
32
+ - Docs: connecting agents, case format, config, result record, reading results, custom
33
+ scorers, getting-started guide.
34
+
35
+ ### Changed
36
+ - Prepared the repository for public use: the internal alpha guide is now
37
+ `docs/getting-started.md`, the alpha feedback issue template is now a general feedback
38
+ template, install instructions use the default branch, and CI also runs on `main`.
39
+ - Documented the `truncated` field of the agent result record.
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party displays normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 MindzKonnected
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.5
2
+ Name: mindzeval
3
+ Version: 0.1.0
4
+ Summary: Evaluation framework for SQL agents: result-based accuracy, behaviour scoring, multi-turn and golden-answer validation.
5
+ Project-URL: Homepage, https://github.com/MindzKonnected/mindzeval
6
+ Project-URL: Documentation, https://github.com/MindzKonnected/mindzeval#readme
7
+ Project-URL: Repository, https://github.com/MindzKonnected/mindzeval
8
+ Project-URL: Issues, https://github.com/MindzKonnected/mindzeval/issues
9
+ Project-URL: Changelog, https://github.com/MindzKonnected/mindzeval/blob/main/CHANGELOG.md
10
+ Author: MindzKonnected
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: agents,evaluation,llm,sql,testing,text-to-sql
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Database
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: httpx<1,>=0.27
26
+ Requires-Dist: pydantic<3,>=2.7
27
+ Requires-Dist: pyyaml<7,>=6.0
28
+ Requires-Dist: sqlalchemy<3,>=2.0
29
+ Requires-Dist: sqlglot<31,>=30
30
+ Provides-Extra: dev
31
+ Requires-Dist: mypy==2.4.0; extra == 'dev'
32
+ Requires-Dist: pytest==9.1.1; extra == 'dev'
33
+ Requires-Dist: ruff==0.17.1; extra == 'dev'
34
+ Requires-Dist: types-pyyaml==6.0.12.20260906; extra == 'dev'
35
+ Provides-Extra: postgres
36
+ Requires-Dist: psycopg2-binary<3,>=2.9; extra == 'postgres'
37
+ Requires-Dist: psycopg[binary]<4,>=3.1; extra == 'postgres'
38
+ Description-Content-Type: text/markdown
39
+
40
+ # MindzEval
41
+
42
+ MindzEval proves your SQL agent is accurate and safe before it reaches users, and keeps proving it on every change.
43
+
44
+ > **Status: release `0.1.0`.** New here? Start with [getting started](docs/getting-started.md). Feedback and bug reports are welcome in the [issues](https://github.com/MindzKonnected/mindzeval/issues).
45
+
46
+ ## What it does
47
+
48
+ - **Grades the data, not the SQL.** The agent's results are compared with the results of a reference query, so correct SQL written a different way still passes.
49
+ - **Checks the answer key first.** Reference queries are validated against the live database (empty, drift, unstable, NULL groups, orphan-inflated) before any agent is graded.
50
+ - **Scores behaviour both ways.** Asking for clarification or declining is rewarded when it's right and penalised when it isn't.
51
+ - **Separates display limits from logic errors.** The agent's SQL is re-run without its display `LIMIT`, so a UI row cap isn't mistaken for a wrong query.
52
+ - **Checks safety.** Write attempts, forbidden tables and PII in results or answers.
53
+ - **Works with any agent.** LangChain, LangGraph, CrewAI, LlamaIndex, the OpenAI Agents SDK, plain Python, or any HTTP service.
54
+ - **Compares models and prompts.** Matrix runs evaluate every combination side by side.
55
+ - **Read-only by design.** Every query MindzEval runs is parsed and refused unless it is a single read, then executed in a read-only transaction with a timeout.
56
+
57
+ ## Installation
58
+
59
+ MindzEval requires Python 3.11 or newer:
60
+
61
+ ```bash
62
+ # SQLite only
63
+ pip install mindzeval
64
+
65
+ # With PostgreSQL support
66
+ pip install "mindzeval[postgres]"
67
+ ```
68
+
69
+ ## Quickstart
70
+
71
+ ```bash
72
+ mindzeval quickstart demo
73
+ cd demo
74
+ mindzeval run
75
+ ```
76
+
77
+ The example agent fails some cases on purpose so you can see what each verdict means.
78
+
79
+ ## Your own agent
80
+
81
+ `mindzeval.yaml`:
82
+
83
+ ```yaml
84
+ project: shop-agent
85
+ agent:
86
+ type: python
87
+ target: my_project.eval_adapter:answer # or type: http with a URL
88
+ database:
89
+ url: postgresql://reader:${DB_PASSWORD}@db.internal/shop
90
+ datasets: cases/*.yaml
91
+ ```
92
+
93
+ `cases/customers.yaml`:
94
+
95
+ ```yaml
96
+ - id: customers_in_germany
97
+ question: Which customers are in Germany?
98
+ reference_sql: SELECT id FROM customers WHERE country = 'DE'
99
+ key: id
100
+
101
+ - id: vague_request
102
+ question: Show me the data
103
+ expect: {behavior: clarify}
104
+ ```
105
+
106
+ ```bash
107
+ mindzeval lint # check config and cases (no connections, no secrets)
108
+ mindzeval validate # check reference queries against the database
109
+ mindzeval run # evaluate; exits 1 if thresholds aren't met
110
+ ```
111
+
112
+ ## Documentation
113
+
114
+ - [Getting started](docs/getting-started.md): install, try the example, connect your agent
115
+ - [Integration examples](https://github.com/MindzKonnected/mindzeval-integration-examples): runnable examples per framework, starting with LangGraph
116
+ - [Connecting your agent](docs/guides/connecting-agents.md): Python, LangGraph, LangChain, CrewAI, HTTP, saved outputs, model comparison
117
+ - [Case format](docs/reference/case-format.md)
118
+ - [Config file](docs/reference/config.md)
119
+ - [Agent result record](docs/reference/agent-response.md)
120
+ - [Reading results](docs/reference/results.md): verdicts, numbers, failure causes, exit codes
121
+ - [Custom scorers](docs/guides/custom-scorers.md)
122
+
123
+ ## Development
124
+
125
+ ```bash
126
+ git clone https://github.com/MindzKonnected/mindzeval.git && cd mindzeval
127
+ python -m venv .venv && .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate
128
+ pip install -e ".[dev,postgres]"
129
+ pytest # set MINDZEVAL_TEST_POSTGRES_URL to include Postgres
130
+ ruff check src tests && ruff format --check src tests && mypy
131
+ ```
132
+
133
+ Work happens on `development` through pull requests. `main` is the default branch and `production` holds released versions.
134
+
135
+ ## License
136
+
137
+ MindzEval is licensed under the [Apache License 2.0](LICENSE).
@@ -0,0 +1,98 @@
1
+ # MindzEval
2
+
3
+ MindzEval proves your SQL agent is accurate and safe before it reaches users, and keeps proving it on every change.
4
+
5
+ > **Status: release `0.1.0`.** New here? Start with [getting started](docs/getting-started.md). Feedback and bug reports are welcome in the [issues](https://github.com/MindzKonnected/mindzeval/issues).
6
+
7
+ ## What it does
8
+
9
+ - **Grades the data, not the SQL.** The agent's results are compared with the results of a reference query, so correct SQL written a different way still passes.
10
+ - **Checks the answer key first.** Reference queries are validated against the live database (empty, drift, unstable, NULL groups, orphan-inflated) before any agent is graded.
11
+ - **Scores behaviour both ways.** Asking for clarification or declining is rewarded when it's right and penalised when it isn't.
12
+ - **Separates display limits from logic errors.** The agent's SQL is re-run without its display `LIMIT`, so a UI row cap isn't mistaken for a wrong query.
13
+ - **Checks safety.** Write attempts, forbidden tables and PII in results or answers.
14
+ - **Works with any agent.** LangChain, LangGraph, CrewAI, LlamaIndex, the OpenAI Agents SDK, plain Python, or any HTTP service.
15
+ - **Compares models and prompts.** Matrix runs evaluate every combination side by side.
16
+ - **Read-only by design.** Every query MindzEval runs is parsed and refused unless it is a single read, then executed in a read-only transaction with a timeout.
17
+
18
+ ## Installation
19
+
20
+ MindzEval requires Python 3.11 or newer:
21
+
22
+ ```bash
23
+ # SQLite only
24
+ pip install mindzeval
25
+
26
+ # With PostgreSQL support
27
+ pip install "mindzeval[postgres]"
28
+ ```
29
+
30
+ ## Quickstart
31
+
32
+ ```bash
33
+ mindzeval quickstart demo
34
+ cd demo
35
+ mindzeval run
36
+ ```
37
+
38
+ The example agent fails some cases on purpose so you can see what each verdict means.
39
+
40
+ ## Your own agent
41
+
42
+ `mindzeval.yaml`:
43
+
44
+ ```yaml
45
+ project: shop-agent
46
+ agent:
47
+ type: python
48
+ target: my_project.eval_adapter:answer # or type: http with a URL
49
+ database:
50
+ url: postgresql://reader:${DB_PASSWORD}@db.internal/shop
51
+ datasets: cases/*.yaml
52
+ ```
53
+
54
+ `cases/customers.yaml`:
55
+
56
+ ```yaml
57
+ - id: customers_in_germany
58
+ question: Which customers are in Germany?
59
+ reference_sql: SELECT id FROM customers WHERE country = 'DE'
60
+ key: id
61
+
62
+ - id: vague_request
63
+ question: Show me the data
64
+ expect: {behavior: clarify}
65
+ ```
66
+
67
+ ```bash
68
+ mindzeval lint # check config and cases (no connections, no secrets)
69
+ mindzeval validate # check reference queries against the database
70
+ mindzeval run # evaluate; exits 1 if thresholds aren't met
71
+ ```
72
+
73
+ ## Documentation
74
+
75
+ - [Getting started](docs/getting-started.md): install, try the example, connect your agent
76
+ - [Integration examples](https://github.com/MindzKonnected/mindzeval-integration-examples): runnable examples per framework, starting with LangGraph
77
+ - [Connecting your agent](docs/guides/connecting-agents.md): Python, LangGraph, LangChain, CrewAI, HTTP, saved outputs, model comparison
78
+ - [Case format](docs/reference/case-format.md)
79
+ - [Config file](docs/reference/config.md)
80
+ - [Agent result record](docs/reference/agent-response.md)
81
+ - [Reading results](docs/reference/results.md): verdicts, numbers, failure causes, exit codes
82
+ - [Custom scorers](docs/guides/custom-scorers.md)
83
+
84
+ ## Development
85
+
86
+ ```bash
87
+ git clone https://github.com/MindzKonnected/mindzeval.git && cd mindzeval
88
+ python -m venv .venv && .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate
89
+ pip install -e ".[dev,postgres]"
90
+ pytest # set MINDZEVAL_TEST_POSTGRES_URL to include Postgres
91
+ ruff check src tests && ruff format --check src tests && mypy
92
+ ```
93
+
94
+ Work happens on `development` through pull requests. `main` is the default branch and `production` holds released versions.
95
+
96
+ ## License
97
+
98
+ MindzEval is licensed under the [Apache License 2.0](LICENSE).