hermes-benchmark 0.0.5__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 (105) hide show
  1. hermes_benchmark-0.0.5/.github/workflows/docs.yml +82 -0
  2. hermes_benchmark-0.0.5/.gitignore +20 -0
  3. hermes_benchmark-0.0.5/LICENSE +19 -0
  4. hermes_benchmark-0.0.5/PKG-INFO +137 -0
  5. hermes_benchmark-0.0.5/README.md +99 -0
  6. hermes_benchmark-0.0.5/configs/az_1000.yaml +116 -0
  7. hermes_benchmark-0.0.5/configs/az_1000_gemini.yaml +123 -0
  8. hermes_benchmark-0.0.5/configs/az_classification_smoke.yaml +62 -0
  9. hermes_benchmark-0.0.5/configs/legacy_tr_10k.yaml +481 -0
  10. hermes_benchmark-0.0.5/configs/pt_1000.yaml +116 -0
  11. hermes_benchmark-0.0.5/docs/assets/styles.css +19 -0
  12. hermes_benchmark-0.0.5/docs/configuration.md +177 -0
  13. hermes_benchmark-0.0.5/docs/contributing.md +110 -0
  14. hermes_benchmark-0.0.5/docs/examples/az_1000.yaml +252 -0
  15. hermes_benchmark-0.0.5/docs/examples/az_1000_gemini.yaml +259 -0
  16. hermes_benchmark-0.0.5/docs/examples/az_classification_smoke.yaml +62 -0
  17. hermes_benchmark-0.0.5/docs/getting-started.md +128 -0
  18. hermes_benchmark-0.0.5/docs/index.md +46 -0
  19. hermes_benchmark-0.0.5/docs/installation.md +100 -0
  20. hermes_benchmark-0.0.5/docs/methodology.md +140 -0
  21. hermes_benchmark-0.0.5/docs/python-api.md +126 -0
  22. hermes_benchmark-0.0.5/docs/reference/cli.md +127 -0
  23. hermes_benchmark-0.0.5/docs/reference/config.schema.json +493 -0
  24. hermes_benchmark-0.0.5/docs/reference/task-options.md +80 -0
  25. hermes_benchmark-0.0.5/docs/reference/typed-settings.md +110 -0
  26. hermes_benchmark-0.0.5/docs/tasks.md +192 -0
  27. hermes_benchmark-0.0.5/docs/troubleshooting.md +105 -0
  28. hermes_benchmark-0.0.5/mkdocs.yml +43 -0
  29. hermes_benchmark-0.0.5/pyproject.toml +65 -0
  30. hermes_benchmark-0.0.5/scripts/generate_docs_reference.py +176 -0
  31. hermes_benchmark-0.0.5/scripts/validate_docs.py +183 -0
  32. hermes_benchmark-0.0.5/src/hermes_benchmark/__init__.py +0 -0
  33. hermes_benchmark-0.0.5/src/hermes_benchmark/capacity/__init__.py +16 -0
  34. hermes_benchmark-0.0.5/src/hermes_benchmark/capacity/estimates.py +309 -0
  35. hermes_benchmark-0.0.5/src/hermes_benchmark/capacity/models.py +142 -0
  36. hermes_benchmark-0.0.5/src/hermes_benchmark/capacity/pilot.py +133 -0
  37. hermes_benchmark-0.0.5/src/hermes_benchmark/capacity/profiler.py +387 -0
  38. hermes_benchmark-0.0.5/src/hermes_benchmark/cli.py +519 -0
  39. hermes_benchmark-0.0.5/src/hermes_benchmark/config.py +209 -0
  40. hermes_benchmark-0.0.5/src/hermes_benchmark/enrichment/__init__.py +21 -0
  41. hermes_benchmark-0.0.5/src/hermes_benchmark/enrichment/builder.py +556 -0
  42. hermes_benchmark-0.0.5/src/hermes_benchmark/enrichment/clustering.py +56 -0
  43. hermes_benchmark-0.0.5/src/hermes_benchmark/enrichment/models.py +18 -0
  44. hermes_benchmark-0.0.5/src/hermes_benchmark/enrichment/providers.py +96 -0
  45. hermes_benchmark-0.0.5/src/hermes_benchmark/io.py +38 -0
  46. hermes_benchmark-0.0.5/src/hermes_benchmark/language_templates.py +81 -0
  47. hermes_benchmark-0.0.5/src/hermes_benchmark/ner_ontology.py +124 -0
  48. hermes_benchmark-0.0.5/src/hermes_benchmark/pipeline.py +1142 -0
  49. hermes_benchmark-0.0.5/src/hermes_benchmark/progress.py +46 -0
  50. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/__init__.py +70 -0
  51. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/classification.py +1381 -0
  52. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/classification_provider.py +261 -0
  53. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/extractive_qa.py +1318 -0
  54. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/google_client.py +26 -0
  55. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/knowledge_base.py +429 -0
  56. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/models.py +110 -0
  57. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/ner.py +808 -0
  58. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/output_names.py +118 -0
  59. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/paragraphs.py +926 -0
  60. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/qa_provider.py +290 -0
  61. hermes_benchmark-0.0.5/src/hermes_benchmark/tasks/reranking.py +745 -0
  62. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/ar.yaml +116 -0
  63. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/az.yaml +116 -0
  64. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/de.yaml +117 -0
  65. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/en.yaml +116 -0
  66. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/es.yaml +116 -0
  67. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/fr.yaml +116 -0
  68. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/pt.yaml +116 -0
  69. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/ru.yaml +116 -0
  70. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/tr.yaml +116 -0
  71. hermes_benchmark-0.0.5/src/hermes_benchmark/templates/zh.yaml +109 -0
  72. hermes_benchmark-0.0.5/src/hermes_benchmark/utils/__init__.py +1 -0
  73. hermes_benchmark-0.0.5/src/hermes_benchmark/utils/hashing.py +18 -0
  74. hermes_benchmark-0.0.5/src/hermes_benchmark/wikipedia/__init__.py +15 -0
  75. hermes_benchmark-0.0.5/src/hermes_benchmark/wikipedia/corpus.py +371 -0
  76. hermes_benchmark-0.0.5/src/hermes_benchmark/wikipedia/dump.py +159 -0
  77. hermes_benchmark-0.0.5/src/hermes_benchmark/wikipedia/models.py +49 -0
  78. hermes_benchmark-0.0.5/src/hermes_benchmark/wikipedia/text.py +235 -0
  79. hermes_benchmark-0.0.5/tests/fixtures/capacitywiki.xml +58 -0
  80. hermes_benchmark-0.0.5/tests/fixtures/miniwiki.xml +84 -0
  81. hermes_benchmark-0.0.5/tests/test_capacity_estimates.py +157 -0
  82. hermes_benchmark-0.0.5/tests/test_capacity_pilot.py +82 -0
  83. hermes_benchmark-0.0.5/tests/test_capacity_profiler.py +109 -0
  84. hermes_benchmark-0.0.5/tests/test_classification_provider.py +246 -0
  85. hermes_benchmark-0.0.5/tests/test_classification_tasks.py +557 -0
  86. hermes_benchmark-0.0.5/tests/test_cli.py +937 -0
  87. hermes_benchmark-0.0.5/tests/test_config.py +405 -0
  88. hermes_benchmark-0.0.5/tests/test_enrichment_builder.py +314 -0
  89. hermes_benchmark-0.0.5/tests/test_enrichment_clustering.py +62 -0
  90. hermes_benchmark-0.0.5/tests/test_enrichment_providers.py +64 -0
  91. hermes_benchmark-0.0.5/tests/test_extractive_qa_tasks.py +738 -0
  92. hermes_benchmark-0.0.5/tests/test_hashing.py +27 -0
  93. hermes_benchmark-0.0.5/tests/test_io.py +55 -0
  94. hermes_benchmark-0.0.5/tests/test_knowledge_base.py +336 -0
  95. hermes_benchmark-0.0.5/tests/test_language_templates.py +130 -0
  96. hermes_benchmark-0.0.5/tests/test_ner_tasks.py +381 -0
  97. hermes_benchmark-0.0.5/tests/test_paragraph_tasks.py +351 -0
  98. hermes_benchmark-0.0.5/tests/test_pipeline.py +535 -0
  99. hermes_benchmark-0.0.5/tests/test_qa_provider.py +314 -0
  100. hermes_benchmark-0.0.5/tests/test_reranking_tasks.py +366 -0
  101. hermes_benchmark-0.0.5/tests/test_task_output_names.py +80 -0
  102. hermes_benchmark-0.0.5/tests/test_wikipedia_corpus.py +179 -0
  103. hermes_benchmark-0.0.5/tests/test_wikipedia_dump.py +91 -0
  104. hermes_benchmark-0.0.5/tests/test_wikipedia_models.py +70 -0
  105. hermes_benchmark-0.0.5/tests/test_wikipedia_text.py +138 -0
@@ -0,0 +1,82 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - 'docs/**'
7
+ - 'scripts/**'
8
+ - 'src/**'
9
+ - 'tests/**'
10
+ - 'configs/**'
11
+ - 'README.md'
12
+ - 'pyproject.toml'
13
+ - 'mkdocs.yml'
14
+ - '.github/workflows/docs.yml'
15
+ push:
16
+ branches: [main]
17
+ paths:
18
+ - 'docs/**'
19
+ - 'scripts/**'
20
+ - 'src/**'
21
+ - 'tests/**'
22
+ - 'configs/**'
23
+ - 'README.md'
24
+ - 'pyproject.toml'
25
+ - 'mkdocs.yml'
26
+ - '.github/workflows/docs.yml'
27
+ workflow_dispatch:
28
+
29
+ permissions:
30
+ contents: read
31
+
32
+ concurrency:
33
+ group: docs-${{ github.ref }}
34
+ cancel-in-progress: true
35
+
36
+ jobs:
37
+ build:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: '3.12'
44
+ - name: Install project and documentation tools
45
+ run: python -m pip install '.[dev,docs]'
46
+ - name: Check generated references
47
+ run: python scripts/generate_docs_reference.py --check
48
+ - name: Validate documentation examples
49
+ run: python scripts/validate_docs.py
50
+ - name: Run software tests
51
+ run: python -m pytest -q --junitxml=output/documentation-validation/tests.xml
52
+ - name: Build with strict link and navigation checks
53
+ run: python -m mkdocs build --strict
54
+ - name: Keep validation evidence
55
+ if: always()
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: documentation-validation
59
+ path: output/documentation-validation/
60
+ if-no-files-found: ignore
61
+ - name: Upload Pages site
62
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
63
+ uses: actions/upload-pages-artifact@v3
64
+ with:
65
+ path: site
66
+
67
+ deploy:
68
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
69
+ needs: build
70
+ runs-on: ubuntu-latest
71
+ permissions:
72
+ pages: write
73
+ id-token: write
74
+ environment:
75
+ name: github-pages
76
+ url: ${{ steps.deployment.outputs.page_url }}
77
+ steps:
78
+ - name: Configure Pages
79
+ uses: actions/configure-pages@v5
80
+ - name: Deploy validated site
81
+ id: deployment
82
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .pytest_cache/
4
+ .coverage
5
+ htmlcov/
6
+ .venv/
7
+ .venv-*/
8
+ venv/
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+ .DS_Store
13
+ output/
14
+ *.xml
15
+ *.xml.bz2
16
+ *.xml.gz
17
+ !tests/fixtures/*.xml
18
+ config.*.yaml
19
+ .secrets/
20
+ site/
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2018 The Python Packaging Authority
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes_benchmark
3
+ Version: 0.0.5
4
+ Summary: Wikipedia based benchmark creation package for low-resource languages.
5
+ Project-URL: Homepage, https://github.com/sasalya98/hermes-benchmark
6
+ Project-URL: Documentation, https://sasalya98.github.io/hermes-benchmark/
7
+ Project-URL: Repository, https://github.com/sasalya98/hermes-benchmark
8
+ Project-URL: Issues, https://github.com/sasalya98/hermes-benchmark/issues
9
+ Author-email: Doruk Demirci <ddemirci3606@gmail.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Requires-Dist: mwparserfromhell>=0.7
16
+ Requires-Dist: mwxml>=0.3.8
17
+ Requires-Dist: numpy>=1.24
18
+ Requires-Dist: pyarrow
19
+ Requires-Dist: pydantic>=2
20
+ Requires-Dist: pyyaml>=6
21
+ Requires-Dist: tqdm
22
+ Requires-Dist: typer
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest; extra == 'dev'
25
+ Requires-Dist: pytest-cov; extra == 'dev'
26
+ Provides-Extra: docs
27
+ Requires-Dist: mkdocs<2,>=1.6; extra == 'docs'
28
+ Provides-Extra: embeddings
29
+ Requires-Dist: sentence-transformers; extra == 'embeddings'
30
+ Provides-Extra: gemini
31
+ Requires-Dist: google-genai; extra == 'gemini'
32
+ Provides-Extra: huggingface
33
+ Requires-Dist: datasets; extra == 'huggingface'
34
+ Requires-Dist: huggingface-hub; extra == 'huggingface'
35
+ Provides-Extra: vertex
36
+ Requires-Dist: google-genai; extra == 'vertex'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Hermes Benchmark
40
+
41
+ Hermes Benchmark generates Wikipedia-based NLP benchmark datasets through a
42
+ Python API and the `hermes-data` command line. It supports eight task families,
43
+ localized configuration templates, cached external services, and artifact
44
+ validation.
45
+
46
+ **Documentation:** [Documentation site](https://sasalya98.github.io/hermes-benchmark/) ·
47
+ [Getting started](https://sasalya98.github.io/hermes-benchmark/getting-started/) ·
48
+ [Configuration](https://sasalya98.github.io/hermes-benchmark/configuration/) ·
49
+ [Tasks and outputs](https://sasalya98.github.io/hermes-benchmark/tasks/) ·
50
+ [Python API](https://sasalya98.github.io/hermes-benchmark/python-api/) ·
51
+ [Methodology and limitations](https://sasalya98.github.io/hermes-benchmark/methodology/)
52
+
53
+ ## Installation
54
+
55
+ Python 3.9 or newer is required by the package metadata. Use a maintained Python
56
+ release for a new environment; optional model/provider dependencies may impose
57
+ additional version requirements.
58
+
59
+ Install from PyPI:
60
+
61
+ ```bash
62
+ python3 -m venv .venv
63
+ source .venv/bin/activate
64
+ python -m pip install --upgrade pip
65
+ python -m pip install "hermes-benchmark[embeddings,gemini]"
66
+ ```
67
+
68
+ For source installation, wheel installation, and optional dependencies, see the
69
+ [installation guide](https://sasalya98.github.io/hermes-benchmark/installation/).
70
+
71
+ ## Quick start
72
+
73
+ Place an Azerbaijani `pages-articles` XML dump in the working directory, then run:
74
+
75
+ ```bash
76
+ hermes-data languages
77
+ hermes-data init-config --language az --output config.az.yaml
78
+ hermes-data info --config config.az.yaml
79
+ hermes-data pilot --config config.az.yaml
80
+ hermes-data generate --config config.az.yaml
81
+ hermes-data validate --config config.az.yaml
82
+ ```
83
+
84
+ Before generation, edit the dump path, output directory, and targets in the YAML
85
+ file. The Azerbaijani starter expects
86
+ `azwiki-latest-pages-articles-multistream.xml.bz2`. It requests **100 samples per
87
+ output variant**, enables seven task families, and leaves classification disabled.
88
+ NER and template QA still require Wikidata access or a complete local cache.
89
+ Generation also requires the configured embedding model.
90
+
91
+ For 1,000 examples per variant, use the reviewed
92
+ [Azerbaijani configuration](https://sasalya98.github.io/hermes-benchmark/examples/az_1000.yaml). Gemini QA and a small Gemini
93
+ classification test have separate examples in [the guide](https://sasalya98.github.io/hermes-benchmark/getting-started/).
94
+ Reranking defaults to **20 titles: one gold title and 19 hard negatives**.
95
+
96
+ ## Supported tasks
97
+
98
+ | Configuration task | Output variants | Services |
99
+ |---|---|---|
100
+ | `paragraph_coherence` | Four-way outlier selection | Embeddings |
101
+ | `paragraph_ordering` | Four-way paragraph-order selection | Embeddings through shared enrichment |
102
+ | `article_membership` | Same-article binary decision | Embeddings |
103
+ | `next_paragraph` | Four-way continuation selection | Embeddings |
104
+ | `reranking` | Title ranking with one known gold title | Embeddings |
105
+ | `ner` | Extraction, type assignment, type verification | Wikidata |
106
+ | `classification` | Label prediction, multiple choice, verification | Embeddings and Gemini/Vertex AI |
107
+ | `extractive_qa` | Answer-span extraction | Wikidata; Gemini/Vertex AI in `hybrid` mode |
108
+
109
+ A `target` of 1,000 produces 1,000 records **in each enabled variant**: NER, for
110
+ example, produces three files with 1,000 records each.
111
+
112
+ ## Validation and research use
113
+
114
+ `validate` checks file integrity, corpus alignment, sample structure/counts, QA
115
+ spans, and contradictory QA annotations. It does **not** establish expert-level
116
+ annotation accuracy, question uniqueness for every sample, or contamination-free
117
+ splits. NER labels come from Wikipedia links and a configurable Wikidata ontology;
118
+ classification labels may be model-generated. Read the
119
+ [methodology](https://sasalya98.github.io/hermes-benchmark/methodology/) before reporting benchmark results.
120
+
121
+ ## Development and documentation
122
+
123
+ ```bash
124
+ python -m pip install ".[dev,docs]"
125
+ python scripts/generate_docs_reference.py --check
126
+ python scripts/validate_docs.py
127
+ python -m pytest -q
128
+ python -m mkdocs build --strict
129
+ python -m mkdocs serve
130
+ ```
131
+
132
+ Documentation is maintained in `docs/`. The
133
+ [publishing guide](https://sasalya98.github.io/hermes-benchmark/contributing/) describes PyPI releases, GitHub Pages deployment, and
134
+ how to keep examples and references synchronized with the implementation.
135
+
136
+ The software is [MIT-licensed](https://github.com/sasalya98/hermes-benchmark/blob/main/LICENSE). Wikipedia and Wikidata source material
137
+ have their own [licensing and attribution requirements](https://sasalya98.github.io/hermes-benchmark/methodology/#licensing-and-attribution).
@@ -0,0 +1,99 @@
1
+ # Hermes Benchmark
2
+
3
+ Hermes Benchmark generates Wikipedia-based NLP benchmark datasets through a
4
+ Python API and the `hermes-data` command line. It supports eight task families,
5
+ localized configuration templates, cached external services, and artifact
6
+ validation.
7
+
8
+ **Documentation:** [Documentation site](https://sasalya98.github.io/hermes-benchmark/) ·
9
+ [Getting started](https://sasalya98.github.io/hermes-benchmark/getting-started/) ·
10
+ [Configuration](https://sasalya98.github.io/hermes-benchmark/configuration/) ·
11
+ [Tasks and outputs](https://sasalya98.github.io/hermes-benchmark/tasks/) ·
12
+ [Python API](https://sasalya98.github.io/hermes-benchmark/python-api/) ·
13
+ [Methodology and limitations](https://sasalya98.github.io/hermes-benchmark/methodology/)
14
+
15
+ ## Installation
16
+
17
+ Python 3.9 or newer is required by the package metadata. Use a maintained Python
18
+ release for a new environment; optional model/provider dependencies may impose
19
+ additional version requirements.
20
+
21
+ Install from PyPI:
22
+
23
+ ```bash
24
+ python3 -m venv .venv
25
+ source .venv/bin/activate
26
+ python -m pip install --upgrade pip
27
+ python -m pip install "hermes-benchmark[embeddings,gemini]"
28
+ ```
29
+
30
+ For source installation, wheel installation, and optional dependencies, see the
31
+ [installation guide](https://sasalya98.github.io/hermes-benchmark/installation/).
32
+
33
+ ## Quick start
34
+
35
+ Place an Azerbaijani `pages-articles` XML dump in the working directory, then run:
36
+
37
+ ```bash
38
+ hermes-data languages
39
+ hermes-data init-config --language az --output config.az.yaml
40
+ hermes-data info --config config.az.yaml
41
+ hermes-data pilot --config config.az.yaml
42
+ hermes-data generate --config config.az.yaml
43
+ hermes-data validate --config config.az.yaml
44
+ ```
45
+
46
+ Before generation, edit the dump path, output directory, and targets in the YAML
47
+ file. The Azerbaijani starter expects
48
+ `azwiki-latest-pages-articles-multistream.xml.bz2`. It requests **100 samples per
49
+ output variant**, enables seven task families, and leaves classification disabled.
50
+ NER and template QA still require Wikidata access or a complete local cache.
51
+ Generation also requires the configured embedding model.
52
+
53
+ For 1,000 examples per variant, use the reviewed
54
+ [Azerbaijani configuration](https://sasalya98.github.io/hermes-benchmark/examples/az_1000.yaml). Gemini QA and a small Gemini
55
+ classification test have separate examples in [the guide](https://sasalya98.github.io/hermes-benchmark/getting-started/).
56
+ Reranking defaults to **20 titles: one gold title and 19 hard negatives**.
57
+
58
+ ## Supported tasks
59
+
60
+ | Configuration task | Output variants | Services |
61
+ |---|---|---|
62
+ | `paragraph_coherence` | Four-way outlier selection | Embeddings |
63
+ | `paragraph_ordering` | Four-way paragraph-order selection | Embeddings through shared enrichment |
64
+ | `article_membership` | Same-article binary decision | Embeddings |
65
+ | `next_paragraph` | Four-way continuation selection | Embeddings |
66
+ | `reranking` | Title ranking with one known gold title | Embeddings |
67
+ | `ner` | Extraction, type assignment, type verification | Wikidata |
68
+ | `classification` | Label prediction, multiple choice, verification | Embeddings and Gemini/Vertex AI |
69
+ | `extractive_qa` | Answer-span extraction | Wikidata; Gemini/Vertex AI in `hybrid` mode |
70
+
71
+ A `target` of 1,000 produces 1,000 records **in each enabled variant**: NER, for
72
+ example, produces three files with 1,000 records each.
73
+
74
+ ## Validation and research use
75
+
76
+ `validate` checks file integrity, corpus alignment, sample structure/counts, QA
77
+ spans, and contradictory QA annotations. It does **not** establish expert-level
78
+ annotation accuracy, question uniqueness for every sample, or contamination-free
79
+ splits. NER labels come from Wikipedia links and a configurable Wikidata ontology;
80
+ classification labels may be model-generated. Read the
81
+ [methodology](https://sasalya98.github.io/hermes-benchmark/methodology/) before reporting benchmark results.
82
+
83
+ ## Development and documentation
84
+
85
+ ```bash
86
+ python -m pip install ".[dev,docs]"
87
+ python scripts/generate_docs_reference.py --check
88
+ python scripts/validate_docs.py
89
+ python -m pytest -q
90
+ python -m mkdocs build --strict
91
+ python -m mkdocs serve
92
+ ```
93
+
94
+ Documentation is maintained in `docs/`. The
95
+ [publishing guide](https://sasalya98.github.io/hermes-benchmark/contributing/) describes PyPI releases, GitHub Pages deployment, and
96
+ how to keep examples and references synchronized with the implementation.
97
+
98
+ The software is [MIT-licensed](https://github.com/sasalya98/hermes-benchmark/blob/main/LICENSE). Wikipedia and Wikidata source material
99
+ have their own [licensing and attribution requirements](https://sasalya98.github.io/hermes-benchmark/methodology/#licensing-and-attribution).
@@ -0,0 +1,116 @@
1
+ # Azərbaycan dili: LLM tələb etməyən yeddi tapşırıq, hər çıxış növünə 1000 nümunə.
2
+ dump:
3
+ path: azwiki-latest-pages-articles-multistream.xml.bz2
4
+ language: az
5
+ dump_id: azwiki-latest
6
+ seed: 42
7
+ output_dir: output/azwiki-1000
8
+ inspection:
9
+ sample_pages: 10000
10
+ pilot_articles: 100
11
+ pilot_max_pages: 10000
12
+ corpus:
13
+ article_limit: 2000
14
+ max_pages: 100000
15
+ min_paragraphs: 4
16
+ max_paragraphs: 8
17
+ min_paragraph_chars: 150
18
+ max_paragraph_chars: 900
19
+ cleaning_mode: structured
20
+ excluded_title_suffixes: ["(dəqiqləşdirmə)"]
21
+ excluded_paragraph_prefixes: ["istinadlar", "həmçinin bax", "xarici keçidlər", "qeydlər"]
22
+ additional_excluded_link_prefixes: ["Şəkil"]
23
+ tasks:
24
+ paragraph_coherence:
25
+ target: 1000
26
+ options:
27
+ instruction: >-
28
+ Məqalənin məna axınını pozan abzası seçin. Yalnız düzgün seçim
29
+ identifikatorunu yazın.
30
+ paragraph_ordering:
31
+ target: 1000
32
+ options:
33
+ instruction: >-
34
+ Qarışdırılmış abzasları məqalədəki təbii ardıcıllığa salan seçimi edin.
35
+ Yalnız düzgün seçim identifikatorunu yazın.
36
+ article_membership:
37
+ target: 1000
38
+ options:
39
+ instruction: >-
40
+ İki abzas eyni Wikipedia məqaləsinə aiddirsə yalnız True, əks halda
41
+ yalnız False yazın.
42
+ next_paragraph:
43
+ target: 1000
44
+ options:
45
+ instruction: >-
46
+ Başlığa və əvvəlki abzaslara əsasən düzgün növbəti abzası seçin.
47
+ Yalnız düzgün seçim identifikatorunu yazın.
48
+ reranking:
49
+ target: 1000
50
+ options:
51
+ candidate_count: 20
52
+ hard_negative_count: 19
53
+ instruction: >-
54
+ Namizəd Wikipedia başlıqlarını verilmiş abzası ehtiva etmə ehtimalına
55
+ görə ən yüksəkdən ən aşağıya sıralayın. Hər identifikatoru bir dəfə
56
+ işlədərək yalnız vergüllə ayrılmış namizəd identifikatorlarını yazın.
57
+ ner:
58
+ target: 1000
59
+ options:
60
+ instruction_type1: >-
61
+ Mətndəki adlı varlıqları tapın. Hər sətirdə entity_text<TAB>TYPE
62
+ formatında bir varlıq yazın; varlıq yoxdursa EMPTY yazın. Etibarlı növlər:
63
+ {ner_labels}.
64
+ instruction_type2: >-
65
+ Hər varlıq identifikatoruna bir NER növü təyin edin. Yalnız E1=TYPE,
66
+ E2=TYPE formatında cavab verin. Yalnız seçimlərdəki etibarlı növlərdən istifadə edin.
67
+ instruction_type3: >-
68
+ Təklif olunan varlıq/növ cütü düzgündürsə yalnız True, əks halda yalnız
69
+ False yazın.
70
+ extractive_qa:
71
+ target: 1000
72
+ options:
73
+ generation_method: template
74
+ question_template: >-
75
+ Mətnə görə {title} məqaləsində hansı ad və ya ifadə qeyd olunur?
76
+ question_without_title: >-
77
+ Mətnə görə hansı ad və ya ifadə qeyd olunur?
78
+ instruction: >-
79
+ Suala kontekstə əsasən cavab verin. Cavabı kontekstdən dəqiq mətn
80
+ parçası kimi çıxarın və izah vermədən yalnız cavab mətnini yazın.
81
+ classification:
82
+ enabled: false
83
+ target: 1000
84
+ services:
85
+ embeddings:
86
+ provider: sentence_transformers
87
+ model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
88
+ batch_size: 128
89
+ local_files_only: true
90
+ knowledge_base:
91
+ provider: wikidata
92
+ # Editable NER ontology shared by NER and extractive QA.
93
+ ner_ontology_by_label:
94
+ PER: [Q5, Q15632617, Q12737077]
95
+ GROUP: [Q41710, Q6266, Q16334295, Q8436, Q164950]
96
+ FACILITY: [Q13226383, Q41176, Q1248784, Q55488, Q483110, Q12280]
97
+ ORG: [Q43229, Q4830453, Q7210356, Q327333, Q783794, Q31855, Q38723, Q3918, Q476028]
98
+ LOC: [Q515, Q6256, Q3957, Q486972, Q82794, Q23397, Q4022, Q8502, Q46831, Q14763, Q1549591, Q3624078, Q5107, Q23442]
99
+ WORK: [Q386724, Q17537576, Q571, Q11424, Q482994, Q7725634, Q2188189, Q13406463, Q732577, Q5398426, Q7366, Q7889, Q41298, Q11032]
100
+ EVENT: [Q1190554, Q1656682, Q198, Q40231, Q27020041, Q16510064, Q47566]
101
+ PRODUCT: [Q2424752, Q15401930, Q7397]
102
+ LANGUAGE: [Q315, Q33742, Q9143, Q33215, Q25295, Q33384]
103
+ LAW: [Q7748, Q820655, Q7755, Q131569]
104
+ AWARD: [Q618779, Q203535, Q208045, Q7191]
105
+ MEDICAL: [Q12136, Q2057971, Q3505845, Q169872, Q1441305, Q18123741]
106
+ TAXON: [Q16521, Q7432]
107
+ CHEMICAL: [Q11173, Q79529, Q11344, Q25276, Q407595]
108
+ CELESTIAL: [Q6999, Q634, Q318, Q523, Q728, Q3863, Q44559]
109
+ FOOD: [Q2095, Q40050, Q746549, Q19861951, Q25403900]
110
+ VEHICLE: [Q42889, Q11436, Q11446, Q1420, Q870, Q35676]
111
+ ner_labels: [PER, GROUP, FACILITY, ORG, LOC, WORK, EVENT, PRODUCT, LANGUAGE, LAW, AWARD, MEDICAL, TAXON, CHEMICAL, CELESTIAL, FOOD, VEHICLE]
112
+ ner_label_priority: [PER, GROUP, FACILITY, ORG, LANGUAGE, LAW, AWARD, MEDICAL, TAXON, CHEMICAL, CELESTIAL, FOOD, VEHICLE, LOC, WORK, EVENT, PRODUCT]
113
+ ontology_batch_size: 10
114
+ request_delay_seconds: 0.25
115
+ timeout_seconds: 60
116
+ max_retries: 3
@@ -0,0 +1,123 @@
1
+ # Azərbaycan dili: hər çıxış növünə 1000 nümunə; QA sualları Gemini ilə yazılır.
2
+ dump:
3
+ path: azwiki-latest-pages-articles-multistream.xml.bz2
4
+ language: az
5
+ dump_id: azwiki-latest
6
+ seed: 42
7
+ output_dir: output/azwiki-1000
8
+ inspection:
9
+ sample_pages: 10000
10
+ pilot_articles: 100
11
+ pilot_max_pages: 10000
12
+ corpus:
13
+ article_limit: 2000
14
+ max_pages: 100000
15
+ min_paragraphs: 4
16
+ max_paragraphs: 8
17
+ min_paragraph_chars: 150
18
+ max_paragraph_chars: 900
19
+ cleaning_mode: structured
20
+ excluded_title_suffixes: ["(dəqiqləşdirmə)"]
21
+ excluded_paragraph_prefixes: ["istinadlar", "həmçinin bax", "xarici keçidlər", "qeydlər"]
22
+ additional_excluded_link_prefixes: ["Şəkil"]
23
+ tasks:
24
+ paragraph_coherence:
25
+ target: 1000
26
+ options:
27
+ instruction: >-
28
+ Məqalənin məna axınını pozan abzası seçin. Yalnız düzgün seçim
29
+ identifikatorunu yazın.
30
+ paragraph_ordering:
31
+ target: 1000
32
+ options:
33
+ instruction: >-
34
+ Qarışdırılmış abzasları məqalədəki təbii ardıcıllığa salan seçimi edin.
35
+ Yalnız düzgün seçim identifikatorunu yazın.
36
+ article_membership:
37
+ target: 1000
38
+ options:
39
+ instruction: >-
40
+ İki abzas eyni Wikipedia məqaləsinə aiddirsə yalnız True, əks halda
41
+ yalnız False yazın.
42
+ next_paragraph:
43
+ target: 1000
44
+ options:
45
+ instruction: >-
46
+ Başlığa və əvvəlki abzaslara əsasən düzgün növbəti abzası seçin.
47
+ Yalnız düzgün seçim identifikatorunu yazın.
48
+ reranking:
49
+ target: 1000
50
+ options:
51
+ candidate_count: 20
52
+ hard_negative_count: 19
53
+ instruction: >-
54
+ Namizəd Wikipedia başlıqlarını verilmiş abzası ehtiva etmə ehtimalına
55
+ görə ən yüksəkdən ən aşağıya sıralayın. Hər identifikatoru bir dəfə
56
+ işlədərək yalnız vergüllə ayrılmış namizəd identifikatorlarını yazın.
57
+ ner:
58
+ target: 1000
59
+ options:
60
+ instruction_type1: >-
61
+ Mətndəki adlı varlıqları tapın. Hər sətirdə entity_text<TAB>TYPE
62
+ formatında bir varlıq yazın; varlıq yoxdursa EMPTY yazın. Etibarlı növlər:
63
+ {ner_labels}.
64
+ instruction_type2: >-
65
+ Hər varlıq identifikatoruna bir NER növü təyin edin. Yalnız E1=TYPE,
66
+ E2=TYPE formatında cavab verin. Yalnız seçimlərdəki etibarlı növlərdən istifadə edin.
67
+ instruction_type3: >-
68
+ Təklif olunan varlıq/növ cütü düzgündürsə yalnız True, əks halda yalnız
69
+ False yazın.
70
+ extractive_qa:
71
+ target: 1000
72
+ options:
73
+ generation_method: hybrid
74
+ question_template: >-
75
+ Mətnə görə {title} məqaləsində hansı ad və ya ifadə qeyd olunur?
76
+ question_without_title: >-
77
+ Mətnə görə hansı ad və ya ifadə qeyd olunur?
78
+ instruction: >-
79
+ Suala kontekstə əsasən cavab verin. Cavabı kontekstdən dəqiq mətn
80
+ parçası kimi çıxarın və izah vermədən yalnız cavab mətnini yazın.
81
+ classification:
82
+ enabled: false
83
+ target: 1000
84
+ services:
85
+ llm:
86
+ provider: gemini
87
+ model: gemini-3.1-flash-lite
88
+ api_key: "" # Paste your Gemini API key between the quotes.
89
+ api_version: v1beta
90
+ batch_size: 10
91
+ temperature: 0
92
+ embeddings:
93
+ provider: sentence_transformers
94
+ model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
95
+ batch_size: 128
96
+ local_files_only: true
97
+ knowledge_base:
98
+ provider: wikidata
99
+ # Editable NER ontology shared by NER and extractive QA.
100
+ ner_ontology_by_label:
101
+ PER: [Q5, Q15632617, Q12737077]
102
+ GROUP: [Q41710, Q6266, Q16334295, Q8436, Q164950]
103
+ FACILITY: [Q13226383, Q41176, Q1248784, Q55488, Q483110, Q12280]
104
+ ORG: [Q43229, Q4830453, Q7210356, Q327333, Q783794, Q31855, Q38723, Q3918, Q476028]
105
+ LOC: [Q515, Q6256, Q3957, Q486972, Q82794, Q23397, Q4022, Q8502, Q46831, Q14763, Q1549591, Q3624078, Q5107, Q23442]
106
+ WORK: [Q386724, Q17537576, Q571, Q11424, Q482994, Q7725634, Q2188189, Q13406463, Q732577, Q5398426, Q7366, Q7889, Q41298, Q11032]
107
+ EVENT: [Q1190554, Q1656682, Q198, Q40231, Q27020041, Q16510064, Q47566]
108
+ PRODUCT: [Q2424752, Q15401930, Q7397]
109
+ LANGUAGE: [Q315, Q33742, Q9143, Q33215, Q25295, Q33384]
110
+ LAW: [Q7748, Q820655, Q7755, Q131569]
111
+ AWARD: [Q618779, Q203535, Q208045, Q7191]
112
+ MEDICAL: [Q12136, Q2057971, Q3505845, Q169872, Q1441305, Q18123741]
113
+ TAXON: [Q16521, Q7432]
114
+ CHEMICAL: [Q11173, Q79529, Q11344, Q25276, Q407595]
115
+ CELESTIAL: [Q6999, Q634, Q318, Q523, Q728, Q3863, Q44559]
116
+ FOOD: [Q2095, Q40050, Q746549, Q19861951, Q25403900]
117
+ VEHICLE: [Q42889, Q11436, Q11446, Q1420, Q870, Q35676]
118
+ ner_labels: [PER, GROUP, FACILITY, ORG, LOC, WORK, EVENT, PRODUCT, LANGUAGE, LAW, AWARD, MEDICAL, TAXON, CHEMICAL, CELESTIAL, FOOD, VEHICLE]
119
+ ner_label_priority: [PER, GROUP, FACILITY, ORG, LANGUAGE, LAW, AWARD, MEDICAL, TAXON, CHEMICAL, CELESTIAL, FOOD, VEHICLE, LOC, WORK, EVENT, PRODUCT]
120
+ ontology_batch_size: 10
121
+ request_delay_seconds: 0.25
122
+ timeout_seconds: 60
123
+ max_retries: 3
@@ -0,0 +1,62 @@
1
+ # Small live Gemini classification test; existing azwiki corpus is reused.
2
+ dump:
3
+ path: azwiki-latest-pages-articles-multistream.xml.bz2
4
+ language: az
5
+ dump_id: azwiki-latest
6
+ seed: 42
7
+ output_dir: output/azwiki-classification-smoke
8
+ corpus:
9
+ article_limit: 2000
10
+ max_pages: 100000
11
+ min_paragraphs: 4
12
+ max_paragraphs: 8
13
+ min_paragraph_chars: 150
14
+ max_paragraph_chars: 900
15
+ cleaning_mode: structured
16
+ excluded_title_suffixes:
17
+ - (dəqiqləşdirmə)
18
+ excluded_paragraph_prefixes:
19
+ - istinadlar
20
+ - həmçinin bax
21
+ - xarici keçidlər
22
+ - qeydlər
23
+ additional_excluded_link_prefixes:
24
+ - Şəkil
25
+ tasks:
26
+ classification:
27
+ target: 8
28
+ options:
29
+ labels:
30
+ - Coğrafiya
31
+ - Mədəniyyət
32
+ - Elm və texnologiya
33
+ - Digər
34
+ candidate_total: 16
35
+ cluster_count: 22
36
+ llm_batch_size: 8
37
+ manual_review_total: 8
38
+ instruction_type1: Mətn üçün ən uyğun mövzu kateqoriyasını seçin. Yalnız kateqoriya
39
+ adını yazın.
40
+ instruction_type2: Mətn üçün düzgün mövzu kateqoriyasını seçimlərdən seçin.
41
+ Yalnız seçim identifikatorunu yazın.
42
+ instruction_type3: Mətn və kateqoriya uyğun gəlirsə True, əks halda False yazın.
43
+ services:
44
+ llm:
45
+ provider: gemini
46
+ model: gemini-3.1-flash-lite
47
+ batch_size: 8
48
+ temperature: 0.0
49
+ project: null
50
+ location: us-central1
51
+ cache_path: null
52
+ api_key_file: .secrets/gemini_api_key.txt
53
+ timeout_seconds: 60
54
+ max_retries: 2
55
+ max_output_tokens: 4096
56
+ api_version: v1beta
57
+ api_key: ''
58
+ embeddings:
59
+ provider: sentence_transformers
60
+ model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
61
+ batch_size: 128
62
+ local_files_only: true