XL-DocBench / code /README.md
daiqi's picture
Upload folder using huggingface_hub
72954bd verified
|
Raw
History Blame Contribute Delete
1.01 kB

XL-DocBench Code

All runnable code is kept in this directory. The release smoke test and evaluator require only Python's standard library.

One-command smoke test

Run from the release root:

uv run --no-project python code/quickstart.py

This validates the data files, IDs, document references, evidence metadata, per-question score coverage, manifest counts, and a five-question evaluation fixture.

Files

  • quickstart.py: zero-dependency release validation and evaluation smoke test.
  • evaluate.py: primary Accuracy, Token F1, and ANLS evaluator.
  • examples/load_data.py: minimal standard-library data loader.
  • examples/gold_sample.jsonl: five-record evaluation fixture.
  • examples/predictions_sample.jsonl: perfect predictions for that fixture.

Examples

uv run --no-project python code/examples/load_data.py

uv run --no-project python code/evaluate.py \
  --gold-files code/examples/gold_sample.jsonl \
  --predictions code/examples/predictions_sample.jsonl