Create a ground truth from a PDF, then compare against tool extraction. Usage: /ground-truth path/to/akte.pdf
Manually reads a court file PDF, creates a ground truth extraction, then runs the tool and compares field-by-field.
The user provides a PDF path. If no path given, ask for it.
Read the PDF page by page (use Read tool with pages parameter, 10 pages at a time).
Extract ALL data manually as a German insolvency expert. Create a markdown table for each section:
Verfahrensdaten: Aktenzeichen, Gericht, Richter, Antragsdatum, Beschlussdatum, Antragsart, Eröffnungsgrund, Zustellungsdatum, Verfahrensstadium, Verfahrensart
Schuldner: Name, Vorname (if natürliche Person), Geburtsdatum, Adresse, Firma, Rechtsform, Betriebsstätte, HRB, Familienstand, Kinder, Ehegatte
Antragsteller: Name, Adresse, Ansprechpartner, Telefon, Fax, Email, Betriebsnummer, IBAN, BIC
Forderungen: Each creditor with: Gläubiger, Art, Betrag, Zeitraum, Sicherheiten. Plus: Gesamtforderung, betroffene Arbeitnehmer
Ermittlungsergebnisse: Grundbuch, Gerichtsvollzieher, Vollstreckungsportal, Meldeauskunft
Besonderheiten: Anfechtbare Vorgänge, Adressdiskrepanzen, Widersprüche zwischen Dokumenten, Fristen
For each field, note the exact page where found.
Flag tricky spots the tool might get wrong:
cd backend && npx tsx src/scripts/verify-extraction.ts "{pdf_path}" 2>&1 | grep -v "Warning: Ran out of space"
| Feld | Ground Truth | Tool | Status |
|---|---|---|---|
| Aktenzeichen | 23 IN 165/25 | 23 IN 165/25 | ✅ |
| Zustellungsdatum | 03.12.2025 (PZU) | 27.11.2025 | ❌ Briefdatum statt PZU |
Status markers:
Calculate score: Count correct / total relevant fields × 100
Identify prompt improvements needed:
backend/src/services/anthropic.ts