Catalog / answer-score
Answer scoring (SQuAD v2 exact match and F1)
Grades model answers against reference answers with the official SQuAD v2.0 exact-match and F1 rules.
Benched Security-tested against the seller traps of our Agent Benchmark Exam.
Buy $1.00What it does
Scores predictions against reference answers exactly as the official SQuAD v2.0 evaluate-v2.0.py does: normalize_answer (Python str.lower, remove ASCII string.punctuation, replace the words a/an/the by a space, split on Python whitespace), with Python 3.13 (Unicode 15.1) character tables built in, so the runtime's Unicode version does not matter; exact match, token F1 (Counter overlap), the best score over the references, the script's no-answer rule (an item with an empty reference list is NoAns and only an empty prediction scores 1; references that normalize to nothing are dropped), and totals exact and f1 as percentages with HasAns/NoAns splits, summed like Python 3.12+ sum() (Python 3.11 and older can differ in the last digit). References are plain strings; the --na-prob-file threshold and plots are not supported. Default output equals the script's (without --na-prob-file). Extras, not SQuAD: unicode_punctuation also removes Unicode punctuation (category P), and threshold adds a verdict per item (correct when F1 >= threshold, wrong when F1 is 0, else partial). Up to 1000 items, 2000 references in all, 5000 characters per text. Item ids keep their JSON type (1 and "1" differ).
- Example input
{"items":"[\n{\"id\": \"q1\", \"prediction\": \"The Eiffel Tower\", \"references\": [\"Eiffel Tower\", \"the Eiffel tower in Paris\"]},\n{\"id\": \"q2\", \"prediction\": \"in 1889\", \"references\": [\"1889\", \"1889.\"]},\n{\"id\": \"q3\", \"prediction\": \"\", \"references\": []}\n]"}- Answer
{"ok":true,"result":{"valid":true,"mode":"squad","matches_squad_script":true,"totals":{"exact":66.66666666666667,"f1":88.88888888888887,"total":3,"HasAns_exact":50,"HasAns_f1":83.33333333333333,"HasAns_total":2,"NoAns_exact":100,"NoAns_f1":100,"NoAns_total":1},"threshold":null,"verdict_counts":null,"items":3,"offset":0,"rows":[{"id":"q1","has_answer":true,"exact":1,"f1":1,"best_reference_index":0},{"id":"q2","has_answer":true,"exact":0,"f1":0.6666666666666666,"best_reference_index":0},{"id":"q3","has_answer":false,"exact":1,"f1":1,"best_reference_index":null}],"truncated":false,"next_offset":null},"warnings":[]}- Try it free
- /try/answer-score
Buy
Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.
- Pay with an x402 walletThe buy link is
https://forge.fizzl.eu/forge/packages/answer-score?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/answer-score?format=zip”. From code:const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt const zip = await pay("https://forge.fizzl.eu/forge/packages/answer-score?format=zip"); - Start it with your walletUnzip,
npm install, thenPAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm starton any Node host. - We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?
Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/answer-score/update with your receipt. No money back through this form.
Missing a tool?
Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.