Metadata-Version: 2.4
Name: hermes_benchmark
Version: 0.0.6
Summary: Wikipedia based benchmark creation package for low-resource languages.
Project-URL: Homepage, https://github.com/sasalya98/hermes-benchmark
Project-URL: Documentation, https://sasalya98.github.io/hermes-benchmark/
Project-URL: Repository, https://github.com/sasalya98/hermes-benchmark
Project-URL: Issues, https://github.com/sasalya98/hermes-benchmark/issues
Author-email: Doruk Demirci <ddemirci3606@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: google-genai
Requires-Dist: mwparserfromhell>=0.7
Requires-Dist: mwxml>=0.3.8
Requires-Dist: numpy>=1.24
Requires-Dist: pyarrow
Requires-Dist: pydantic>=2
Requires-Dist: pyyaml>=6
Requires-Dist: sentence-transformers
Requires-Dist: tqdm
Requires-Dist: typer
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs<2,>=1.6; extra == 'docs'
Provides-Extra: embeddings
Provides-Extra: gemini
Provides-Extra: huggingface
Requires-Dist: datasets; extra == 'huggingface'
Requires-Dist: huggingface-hub; extra == 'huggingface'
Provides-Extra: vertex
Description-Content-Type: text/markdown

# Hermes Benchmark

Hermes Benchmark generates Wikipedia-based NLP benchmark datasets through a
Python API and the `hermes-data` command line. It supports eight task families,
localized configuration templates, cached external services, and artifact
validation.

**Documentation:** [Documentation site](https://sasalya98.github.io/hermes-benchmark/) ·
[Getting started](https://sasalya98.github.io/hermes-benchmark/getting-started/) ·
[Configuration](https://sasalya98.github.io/hermes-benchmark/configuration/) ·
[Tasks and outputs](https://sasalya98.github.io/hermes-benchmark/tasks/) ·
[Python API](https://sasalya98.github.io/hermes-benchmark/python-api/) ·
[Methodology and limitations](https://sasalya98.github.io/hermes-benchmark/methodology/)

## Installation

Python 3.9 or newer is required by the package metadata. Use a maintained Python
release for a new environment that is supported by the embedding and Google SDK
dependencies.

Install from PyPI:

```bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install hermes-benchmark
```

Sentence Transformers and the Gemini/Vertex AI SDK are included in the default
installation. To update an existing installation, run
`python -m pip install --upgrade hermes-benchmark`.

For source installation, wheel installation, and development tools, see the
[installation guide](https://sasalya98.github.io/hermes-benchmark/installation/).

## Quick start

Place an Azerbaijani `pages-articles` XML dump in the working directory, then run:

```bash
hermes-data languages
hermes-data init-config --language az --output config.az.yaml
hermes-data info --config config.az.yaml
hermes-data pilot --config config.az.yaml
hermes-data generate --config config.az.yaml
hermes-data validate --config config.az.yaml
```

Before generation, edit the dump path, output directory, and targets in the YAML
file. The Azerbaijani starter expects
`azwiki-latest-pages-articles-multistream.xml.bz2`. It requests **100 samples per
output variant**, enables seven task families, and leaves classification disabled.
NER and template QA still require Wikidata access or a complete local cache.
Generation also requires the configured embedding model.

For 1,000 examples per variant, use the reviewed
[Azerbaijani configuration](https://sasalya98.github.io/hermes-benchmark/examples/az_1000.yaml). Gemini QA and a small Gemini
classification test have separate examples in [the guide](https://sasalya98.github.io/hermes-benchmark/getting-started/).
Reranking defaults to **20 titles: one gold title and 19 hard negatives**.

## Supported tasks

| Configuration task | Output variants | Services |
|---|---|---|
| `paragraph_coherence` | Four-way outlier selection | Embeddings |
| `paragraph_ordering` | Four-way paragraph-order selection | Embeddings through shared enrichment |
| `article_membership` | Same-article binary decision | Embeddings |
| `next_paragraph` | Four-way continuation selection | Embeddings |
| `reranking` | Title ranking with one known gold title | Embeddings |
| `ner` | Extraction, type assignment, type verification | Wikidata |
| `classification` | Label prediction, multiple choice, verification | Embeddings and Gemini/Vertex AI |
| `extractive_qa` | Answer-span extraction | Wikidata; Gemini/Vertex AI in `hybrid` mode |

A `target` of 1,000 produces 1,000 records **in each enabled variant**: NER, for
example, produces three files with 1,000 records each.

## Validation and research use

`validate` checks file integrity, corpus alignment, sample structure/counts, QA
spans, and contradictory QA annotations. It does **not** establish expert-level
annotation accuracy, question uniqueness for every sample, or contamination-free
splits. NER labels come from Wikipedia links and a configurable Wikidata ontology;
classification labels may be model-generated. Read the
[methodology](https://sasalya98.github.io/hermes-benchmark/methodology/) before reporting benchmark results.

## Development and documentation

```bash
python -m pip install ".[dev,docs]"
python scripts/generate_docs_reference.py --check
python scripts/validate_docs.py
python -m pytest -q
python -m mkdocs build --strict
python -m mkdocs serve
```

Documentation is maintained in `docs/`. The
[publishing guide](https://sasalya98.github.io/hermes-benchmark/contributing/) describes PyPI releases, GitHub Pages deployment, and
how to keep examples and references synchronized with the implementation.

The software is [MIT-licensed](https://github.com/sasalya98/hermes-benchmark/blob/main/LICENSE). Wikipedia and Wikidata source material
have their own [licensing and attribution requirements](https://sasalya98.github.io/hermes-benchmark/methodology/#licensing-and-attribution).
