Repository navigation
Add compare_fn comparison example (camerontjs-dot) - #23
Vedantgitbot merged 2 commits into
Conversation
|
Thanks @camerontjs-dot, this is a strong example. It's scoped correctly, adds no dependency to BOOTH, and the conflicting-evidence case is documented clearly rather than tuned away. A few small changes before I merge:
Once those are in I'll run it on my side and merge. |
|
Thanks for the review. I addressed all five requests in 6e4b2c1:
I reran the revised script on Python 3.9.6/macOS arm64 with the PyPI package: exit 0; stdout still matches the recorded hash and ten-case output. The full checkout-source suite ( GitHub's new-head workflow currently shows |
|
Thanks @camerontjs-dot, merged. Great example, and the conflicting-evidence case is a useful addition to the docs. |
What does this change?
Adds a self-contained
check_with_evidence()example inexamples/camerontjs-dot_compare_fn/, comparing a weak token-overlapcompare_fnwith a pinned local DeBERTa NLIcompare_fnon the same ten fixed claim/evidence cases. Prints each arm's BOOTHstatus,reason,detail, andevidence_agreement, along with passage-level NLI labels. It adds no BOOTH core dependency or behavior change.Addresses issue #18. Related to issue #2.
Why?
BOOTH deliberately delegates evidence agreement to the caller's comparator. On these illustrative cases, the lexical comparator accepted wrong refund quantities, negation, and scope mutations and rejected a legitimate paraphrase. The NLI comparator made better checkpoint decisions, but its simple max-entailment projection also accepted genuinely conflicting evidence. The NLI model itself assigned high support to one passage and high contradiction to another; the scalar projection discarded that distinction. Both improvements and limitations are part of the example.
Reproduction and evidence
boothpy==0.5.4installed from PyPI, not imported from the BOOTH checkout;MoritzLaurer/DeBERTa-v3-base-mnli-fever-anlipinned at revision6f5cf0a2b59cabb106aca4c287eed12e357e90eb.RESULTS.md.PYTHONPATH="$PWD/src" python -m pytest -v): 348 passed locally.Checklist
pytest -v) and it passes.RESULTS.md.Anything else worth knowing?
This is a small author-constructed comparison, not a statistical accuracy benchmark, a calibrated probability claim, or an improvement to BOOTH's semantic checker (BOOTH does not bundle one). The lexical and NLI scores use different, explicitly documented uncalibrated thresholds (0.5 vs 0.7).
The scope-swap case also reveals that DeBERTa's fine-grained
contradictionlabel can be wrong even when BOOTH's overall decision to withhold acceptance is appropriate. The example intentionally does not silently add conflict-resolution policy or change the library to eliminate those failures.