ModelVerdict

Comparison

Claude Sonnet 5 vs Gemma 4 31B

Same documents, same prompt: where each model is right, what it really costs and how fast it answers.

At a glance

Task · documentsEnglish (US)CzechGermanSpanishFrench
Invoice extraction99.8% / 97.6%100.0% / 96.1%99.0% / 94.9%93.6% / 95.4%98.7% / 93.6%
Email triage98.2% / 96.5%98.2% / 97.1%97.9% / 95.1%——
Personal data detection99.7% / 99.9%98.9% / 99.8%99.7% / 99.9%——
Contract clauses100.0% / 99.6%100.0% / 100.0%98.2% / 94.4%——

Correct fields: Claude Sonnet 5 / Gemma 4 31B; the better one in bold. Click a cell to see the details.

Invoice extraction · English (US) (150 documents)

Claude Sonnet 5 is more accurate by 2.2 pp. Gemma 4 31B is 52.8× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields99.8%97.6%
Error-free documents99%81%
Per 1,000 documents$8.84$0.17
To fix / 1,00013187
Speed (median)3.2 sec8.9 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Supplier100.0%99.3%
Supplier ID (EIN, IČO…)100.0%98.0%
Invoice number100.0%100.0%
Payment reference100.0%99.3%
Invoice date100.0%98.7%
Due date100.0%98.7%
Net by tax rate98.7%95.3%
Tax by rate99.3%98.7%
Total100.0%100.0%
Currency100.0%100.0%
Bank account100.0%86.0%

Documents where they differ

Invoice extraction · Czech (150 documents)

Claude Sonnet 5 is more accurate by 3.9 pp. Gemma 4 31B is 44.4× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields100.0%96.1%
Error-free documents100%67%
Per 1,000 documents$9.41$0.21
To fix / 1,0000333
Speed (median)3.6 sec10.4 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Supplier100.0%96.7%
Supplier ID (EIN, IČO…)100.0%93.3%
VAT ID100.0%96.7%
Invoice number100.0%100.0%
Payment reference100.0%96.0%
Invoice date100.0%96.0%
Tax point100.0%95.3%
Due date100.0%94.0%
Net by tax rate100.0%98.0%
Tax by rate100.0%97.3%
Total100.0%99.3%
Currency100.0%100.0%
Bank account100.0%86.7%

Documents where they differ

Invoice extraction · German (150 documents)

Claude Sonnet 5 is more accurate by 4.1 pp. Gemma 4 31B is 52.3× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields99.0%94.9%
Error-free documents87%64%
Per 1,000 documents$10.42$0.20
To fix / 1,000133360
Speed (median)3.8 sec7.7 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Supplier100.0%98.7%
Supplier ID (EIN, IČO…)100.0%99.3%
VAT ID100.0%94.0%
Invoice number100.0%99.3%
Payment reference100.0%98.7%
Invoice date99.3%87.3%
Tax point100.0%92.0%
Due date100.0%90.7%
Net by tax rate89.3%94.7%
Tax by rate100.0%97.3%
Total100.0%99.3%
Currency100.0%99.3%
Bank account98.0%82.7%

Documents where they differ

Invoice extraction · Spanish (100 documents)

Gemma 4 31B is more accurate by 1.8 pp. Gemma 4 31B is 58.3× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields93.6%95.4%
Error-free documents77%54%
Per 1,000 documents$11.89$0.20
To fix / 1,000230460
Speed (median)4.0 sec8.7 sec
Valid answers95.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Supplier94.0%95.4%
Supplier ID (EIN, IČO…)95.0%93.1%
VAT ID95.0%98.9%
Invoice number95.0%100.0%
Payment reference94.0%95.4%
Invoice date95.0%98.9%
Tax point95.0%100.0%
Due date95.0%97.7%
Net by tax rate79.0%81.6%
Tax by rate95.0%100.0%
Total95.0%100.0%
Currency95.0%100.0%
Bank account95.0%79.3%

Documents where they differ

Invoice extraction · French (97 documents)

Claude Sonnet 5 is more accurate by 5.1 pp. Gemma 4 31B is 49.7× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields98.7%93.6%
Error-free documents96%51%
Per 1,000 documents$11.02$0.22
To fix / 1,00041494
Speed (median)4.4 sec7.2 sec
Valid answers99.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Supplier99.0%96.6%
Supplier ID (EIN, IČO…)99.0%77.0%
VAT ID99.0%95.4%
Invoice number99.0%97.7%
Payment reference97.9%96.6%
Invoice date99.0%96.6%
Tax point99.0%94.3%
Due date99.0%96.6%
Net by tax rate96.9%93.1%
Tax by rate99.0%100.0%
Total99.0%100.0%
Currency99.0%98.9%
Bank account97.9%73.6%

Documents where they differ

Email triage · English (US) (150 documents)

Claude Sonnet 5 is more accurate by 1.7 pp. Gemma 4 31B is 33.2× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields98.2%96.5%
Error-free documents84%72%
Per 1,000 documents$4.01$0.12
To fix / 1,000160280
Speed (median)3.8 sec2.2 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Category100.0%100.0%
Priority97.3%85.3%
Sentiment86.7%83.3%
Customer name100.0%100.0%
Order number100.0%100.0%
Invoice number100.0%100.0%
Amount100.0%100.0%
Currency100.0%100.0%
Deadline100.0%100.0%

Documents where they differ

Email triage · Czech (150 documents)

Claude Sonnet 5 is more accurate by 1 pp. Gemma 4 31B is 30.9× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields98.2%97.1%
Error-free documents83%75%
Per 1,000 documents$4.91$0.16
To fix / 1,000167253
Speed (median)4.7 sec2.5 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Category100.0%100.0%
Priority96.0%85.3%
Sentiment87.3%88.7%
Customer name100.0%100.0%
Order number100.0%100.0%
Invoice number100.0%100.0%
Amount100.0%100.0%
Currency100.0%100.0%
Deadline100.0%100.0%

Documents where they differ

Email triage · German (150 documents)

Claude Sonnet 5 is more accurate by 2.7 pp. Gemma 4 31B is 34.5× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields97.9%95.1%
Error-free documents81%62%
Per 1,000 documents$5.11$0.15
To fix / 1,000187380
Speed (median)4.3 sec3.6 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Category100.0%100.0%
Priority96.0%78.0%
Sentiment84.7%78.0%
Customer name100.0%100.0%
Order number100.0%100.0%
Invoice number100.0%100.0%
Amount100.0%100.0%
Currency100.0%100.0%
Deadline100.0%100.0%

Documents where they differ

Personal data detection · English (US) (150 documents)

Gemma 4 31B is more accurate by 0.2 pp. Gemma 4 31B is 41.4× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields99.7%99.9%
Error-free documents98%99%
Per 1,000 documents$3.50$0.08
To fix / 1,000207
Speed (median)2.5 sec2.4 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Names100.0%100.0%
Email addresses100.0%100.0%
Phone numbers100.0%100.0%
Addresses98.0%99.3%
Dates of birth100.0%100.0%
National IDs100.0%100.0%
Bank accounts100.0%100.0%

Documents where they differ

Both models got the same number of fields right on every example document.

Personal data detection · Czech (150 documents)

Gemma 4 31B is more accurate by 0.9 pp. Gemma 4 31B is 34.1× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields98.9%99.8%
Error-free documents92%99%
Per 1,000 documents$4.06$0.12
To fix / 1,0008013
Speed (median)3.2 sec2.9 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Names96.7%100.0%
Email addresses100.0%100.0%
Phone numbers100.0%100.0%
Addresses97.3%98.7%
Dates of birth98.0%100.0%
National IDs100.0%100.0%
Bank accounts100.0%100.0%

Documents where they differ

Personal data detection · German (150 documents)

Gemma 4 31B is more accurate by 0.2 pp. Gemma 4 31B is 43.2× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields99.7%99.9%
Error-free documents98%99%
Per 1,000 documents$4.40$0.10
To fix / 1,000207
Speed (median)3.7 sec1.9 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Names98.7%100.0%
Email addresses100.0%100.0%
Phone numbers100.0%100.0%
Addresses100.0%99.3%
Dates of birth99.3%100.0%
National IDs100.0%100.0%
Bank accounts100.0%100.0%

Documents where they differ

Contract clauses · English (US) (150 documents)

Claude Sonnet 5 is more accurate by 0.4 pp. Gemma 4 31B is 28× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields100.0%99.6%
Error-free documents100%97%
Per 1,000 documents$5.04$0.18
To fix / 1,000027
Speed (median)3.4 sec2.5 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Provider100.0%98.0%
Provider ID100.0%100.0%
Client100.0%98.0%
Client ID100.0%100.0%
Contract type100.0%100.0%
Price (net)100.0%100.0%
Currency100.0%100.0%
Billing period100.0%100.0%
Effective date100.0%99.3%
End date100.0%100.0%
Notice period (months)100.0%100.0%
Late-payment penalty (% per day)100.0%100.0%
Governing law100.0%100.0%

Documents where they differ

Both models got the same number of fields right on every example document.

Contract clauses · Czech (150 documents)

Both are equally accurate. Gemma 4 31B is 23.8× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields100.0%100.0%
Error-free documents100%99%
Per 1,000 documents$6.05$0.25
To fix / 1,00007
Speed (median)3.6 sec6.0 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Provider100.0%100.0%
Provider ID100.0%100.0%
Client100.0%100.0%
Client ID100.0%100.0%
Contract type100.0%100.0%
Price (net)100.0%100.0%
Currency100.0%100.0%
Billing period100.0%100.0%
Effective date100.0%99.3%
End date100.0%100.0%
Notice period (months)100.0%100.0%
Late-payment penalty (% per day)100.0%100.0%
Governing law100.0%100.0%

Documents where they differ

Contract clauses · German (150 documents)

Claude Sonnet 5 is more accurate by 3.8 pp. Gemma 4 31B is 32.3× cheaper.

MetricClaude Sonnet 5Gemma 4 31B
Correct fields98.2%94.4%
Error-free documents87%27%
Per 1,000 documents$7.11$0.22
To fix / 1,000133727
Speed (median)4.3 sec2.6 sec
Valid answers100.0%100.0%

Accuracy per field

FieldClaude Sonnet 5Gemma 4 31B
Provider100.0%100.0%
Provider ID87.3%100.0%
Client100.0%100.0%
Client ID89.3%100.0%
Contract type100.0%100.0%
Price (net)100.0%100.0%
Currency100.0%100.0%
Billing period100.0%100.0%
Effective date100.0%100.0%
End date100.0%100.0%
Notice period (months)100.0%100.0%
Late-payment penalty (% per day)100.0%27.3%
Governing law100.0%100.0%

Documents where they differ