Datasets:
Tasks:
Document Question Answering
Size:
n<1K
Tags:
benchmark
document-ai
information-extraction
structured-extraction
key-information-extraction
ocr
License:
File size: 804 Bytes
8143f06 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | from pathlib import Path
from docubench.cli import score_engines, validate_benchmark
ROOT = Path(__file__).resolve().parents[1]
def test_validate_current_benchmark_files():
errors, warnings, summary = validate_benchmark(ROOT)
assert errors == []
assert warnings == []
assert summary["documents"] == 50
assert summary["labels"] == 50
assert summary["schemas"] == 50
assert summary["sources"] == 50
assert set(summary["engines"]) == {
"claude",
"docupipe_high",
"docupipe_standard",
"extend",
"gemini",
"gpt",
}
def test_score_engines_reproduces_extend_aggregate():
scores = score_engines(ROOT, ["extend"])
assert round(scores["aggregates"]["extend"], 4) == 0.9111
assert len(scores["per_doc"]) == 50
|