feat: Pi Text-Agent — initialer Commit (sauberes Repo)
Vollständiges Multi-Agenten-System für Fact-Checking, Artikelschreiben und Argumentationsanalyse. Zwei Backends: llama.cpp (★ bevorzugt) und Ollama. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
5146b7fa30
32 changed files with 11279 additions and 0 deletions
43
tests/corpus/README.md
Normal file
43
tests/corpus/README.md
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Testkorpus — Pi Text-Agent Fact-Checker
|
||||
|
||||
Jeder Fall enthält einen Artikel mit mindestens einem bekannten Fehler und 2+ korrekten Fakten.
|
||||
|
||||
## Struktur
|
||||
|
||||
```
|
||||
case_XXX/
|
||||
├── input.txt ← Artikel mit bekannten Fehlern
|
||||
├── expected.json ← Erwartete Claim-Status (claim_text → status)
|
||||
└── notes.md ← Was falsch ist und warum
|
||||
```
|
||||
|
||||
## expected.json Format
|
||||
|
||||
```json
|
||||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "Wort oder Phrase zur Identifikation des Claims",
|
||||
"expected_status": "contradicted | supported | mixed | insufficient_evidence",
|
||||
"note": "Kurze Begründung"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`text_contains` wird case-insensitiv als Substring gesucht.
|
||||
|
||||
## Fälle
|
||||
|
||||
| Nr | Thema | Fehler |
|
||||
|----|-------|--------|
|
||||
| 001 | Deutsche Inflation 2024 | Falsche Rate (3,2% statt 2,2%) |
|
||||
| 002 | EZB Leitzins | Falscher Zeitpunkt (April statt Juni) |
|
||||
| 003 | Mondlandung Apollo | Enthält korrekten Fakt |
|
||||
| 004 | Bevölkerung Deutschland | Falsche Zahl (90 Mio statt ~84 Mio) |
|
||||
| 005 | Erneuerbare Energien Deutschland 2023 | Falscher Anteil (70% statt ~59%) |
|
||||
| 006 | Bitcoin Allzeithoch 2021 | Falscher Betrag ($75.000 statt ~$68.000) |
|
||||
| 007 | COVID Impfstoff Zulassung | Richtiger Fakt |
|
||||
| 008 | Bundeshaushalt 2024 | Falscher Betrag (500 Mrd statt ~476 Mrd) |
|
||||
| 009 | Klimaziel Paris | Korrekte Kernaussage |
|
||||
| 010 | Weltbevölkerung | Falsche Zahl (9 Mrd statt ~8,1 Mrd) |
|
||||
19
tests/corpus/case_001/expected.json
Normal file
19
tests/corpus/case_001/expected.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "3,2 Prozent",
|
||||
"expected_status": "contradicted",
|
||||
"note": "Tatsächliche Inflationsrate 2024 war 2,2% (Destatis), nicht 3,2%"
|
||||
},
|
||||
{
|
||||
"text_contains": "Zielwert",
|
||||
"expected_status": "mixed",
|
||||
"note": "EZB-Ziel ist 2% (korrekt), aber 2024er Jahresschnitt 2,2% ist kaum 'deutlich über Zielwert'; Perplexity liefert 2025-Daten"
|
||||
},
|
||||
{
|
||||
"text_contains": "Euro als gesetzliches Zahlungsmittel seit 2002",
|
||||
"expected_status": "supported",
|
||||
"note": "Deutschland hat den Euro 2002 eingeführt — korrekter Fakt"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/corpus/case_001/input.txt
Normal file
1
tests/corpus/case_001/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Die Inflationsrate in Deutschland betrug im Jahr 2024 durchschnittlich 3,2 Prozent. Damit lag sie deutlich über dem Zielwert der Europäischen Zentralbank von 2 Prozent. Das Statistische Bundesamt veröffentlicht die Inflationsdaten monatlich. Deutschland ist Mitglied der Eurozone und verwendet den Euro als gesetzliches Zahlungsmittel seit 2002.
|
||||
13
tests/corpus/case_001/notes.md
Normal file
13
tests/corpus/case_001/notes.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Case 001 — Deutsche Inflation 2024
|
||||
|
||||
## Fehler
|
||||
Die Inflationsrate 2024 wird mit 3,2% angegeben. Laut Statistischem Bundesamt (Destatis) betrug sie
|
||||
tatsächlich **2,2%** (Jahresdurchschnitt 2024).
|
||||
|
||||
## Quelle
|
||||
- Destatis: https://www.destatis.de/DE/Themen/Wirtschaft/Preise/Verbraucherpreisindex/
|
||||
|
||||
## Korrekte Fakten im Text
|
||||
- EZB-Inflationsziel: 2% ✓
|
||||
- Euro-Einführung Deutschland: 2002 ✓
|
||||
- Statistisches Bundesamt veröffentlicht Daten monatlich ✓
|
||||
19
tests/corpus/case_002/expected.json
Normal file
19
tests/corpus/case_002/expected.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "April 2024",
|
||||
"expected_status": "contradicted",
|
||||
"note": "Die erste EZB-Zinssenkung 2024 war im Juni, nicht April"
|
||||
},
|
||||
{
|
||||
"text_contains": "Frankfurt am Main",
|
||||
"expected_status": "supported",
|
||||
"note": "EZB-Sitz ist Frankfurt am Main — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "20 Mitgliedsstaaten",
|
||||
"expected_status": "contradicted",
|
||||
"note": "Bulgarien trat am 1.1.2026 bei — Eurozone hat seither 21 Mitglieder"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/corpus/case_002/input.txt
Normal file
1
tests/corpus/case_002/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Die Europäische Zentralbank hat im April 2024 erstmals seit Jahren den Leitzins gesenkt. Der Schritt um 0,25 Prozentpunkte war das Ergebnis monatelanger Beratungen im EZB-Rat. Die EZB hat ihren Sitz in Frankfurt am Main und ist für die Geldpolitik im Euroraum zuständig. Insgesamt umfasst die Eurozone 20 Mitgliedsstaaten.
|
||||
13
tests/corpus/case_002/notes.md
Normal file
13
tests/corpus/case_002/notes.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Case 002 — EZB Leitzins 2024
|
||||
|
||||
## Fehler
|
||||
Der Text behauptet, die erste Zinssenkung war im **April** 2024. Tatsächlich senkte die EZB den
|
||||
Leitzins erstmals im **Juni 2024** (Sitzung vom 6. Juni 2024).
|
||||
|
||||
## Quelle
|
||||
- EZB-Pressemitteilung vom 6. Juni 2024
|
||||
|
||||
## Korrekte Fakten im Text
|
||||
- EZB-Sitz Frankfurt am Main ✓
|
||||
- Eurozone: 20 Mitgliedsstaaten (seit Kroatien 2023) ✓
|
||||
- Senkung um 0,25 Prozentpunkte ✓
|
||||
19
tests/corpus/case_003/expected.json
Normal file
19
tests/corpus/case_003/expected.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "20. Juli 1969",
|
||||
"expected_status": "supported",
|
||||
"note": "Armstrong betrat den Mond am 20. Juli 1969 (UTC) — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "Apollo 11",
|
||||
"expected_status": "supported",
|
||||
"note": "Korrekte Missionsbezeichnung"
|
||||
},
|
||||
{
|
||||
"text_contains": "Collins im Mondorbit",
|
||||
"expected_status": "supported",
|
||||
"note": "Collins blieb tatsächlich im Mondorbit — korrekter Fakt"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/corpus/case_003/input.txt
Normal file
1
tests/corpus/case_003/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Am 20. Juli 1969 betrat Neil Armstrong als erster Mensch den Mond. Die Mission trug den Namen Apollo 11. Zusammen mit ihm flogen Buzz Aldrin und Michael Collins zum Mond, wobei Collins im Mondorbit verblieb und nicht auf der Oberfläche landete. Die NASA ist die US-amerikanische Raumfahrtbehörde mit Hauptsitz in Washington D.C.
|
||||
16
tests/corpus/case_003/notes.md
Normal file
16
tests/corpus/case_003/notes.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Case 003 — Mondlandung Apollo 11
|
||||
|
||||
## Hinweis
|
||||
Dieser Fall enthält überwiegend korrekte Fakten. Er dient als Negativtest: Der Fact-Checker
|
||||
sollte keine falschen Widerlegungen produzieren (False Positives).
|
||||
|
||||
## Alle Fakten
|
||||
- Armstrong erster Mensch auf dem Mond: ✓
|
||||
- Datum 20. Juli 1969 (UTC): ✓
|
||||
- Missionsname Apollo 11: ✓
|
||||
- Collins im Mondorbit: ✓
|
||||
- NASA-Hauptsitz Washington D.C.: ✓ (Johnson Space Center ist in Houston, aber HQ ist D.C.)
|
||||
|
||||
## Erwartetes Verhalten
|
||||
Alle prüfbaren Claims sollten als `supported` bewertet werden.
|
||||
Der Test schlägt fehl wenn ein Claim fälschlicherweise als `contradicted` markiert wird.
|
||||
24
tests/corpus/case_004/expected.json
Normal file
24
tests/corpus/case_004/expected.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "90 Millionen",
|
||||
"expected_status": "contradicted",
|
||||
"note": "Deutschland hatte Ende 2023 ca. 84,7 Millionen Einwohner, nicht 90 Millionen"
|
||||
},
|
||||
{
|
||||
"text_contains": "16 Bundesländer",
|
||||
"expected_status": "supported",
|
||||
"note": "Deutschland hat 16 Bundesländer — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "drei Stadtstaaten",
|
||||
"expected_status": "supported",
|
||||
"note": "Berlin, Hamburg, Bremen sind die drei Stadtstaaten — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "größte Stadt",
|
||||
"expected_status": "supported",
|
||||
"note": "Berlin ist die größte Stadt Deutschlands — korrekter Fakt"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/corpus/case_004/input.txt
Normal file
1
tests/corpus/case_004/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Deutschland ist das bevölkerungsreichste Land der Europäischen Union. Nach Angaben des Statistischen Bundesamtes lebten Ende 2023 rund 90 Millionen Menschen in Deutschland. Das Land besteht aus 16 Bundesländern, davon sind drei Stadtstaaten: Berlin, Hamburg und Bremen. Die Hauptstadt Berlin ist zugleich die größte Stadt Deutschlands.
|
||||
14
tests/corpus/case_004/notes.md
Normal file
14
tests/corpus/case_004/notes.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Case 004 — Bevölkerung Deutschland
|
||||
|
||||
## Fehler
|
||||
Der Text behauptet 90 Millionen Einwohner. Laut Destatis lebten Ende 2023 ca. **84,7 Millionen**
|
||||
Menschen in Deutschland.
|
||||
|
||||
## Quelle
|
||||
- Destatis Bevölkerungsstand: https://www.destatis.de/DE/Themen/Gesellschaft-Umwelt/Bevoelkerung/
|
||||
|
||||
## Korrekte Fakten
|
||||
- bevölkerungsreichstes EU-Land ✓
|
||||
- 16 Bundesländer ✓
|
||||
- 3 Stadtstaaten (Berlin, Hamburg, Bremen) ✓
|
||||
- Berlin größte Stadt ✓
|
||||
19
tests/corpus/case_005/expected.json
Normal file
19
tests/corpus/case_005/expected.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "70 Prozent",
|
||||
"expected_status": "contradicted",
|
||||
"note": "Anteil erneuerbarer Energien 2023 lag bei ca. 59-62%, nicht 70%"
|
||||
},
|
||||
{
|
||||
"text_contains": "letzten drei Kernkraftwerke",
|
||||
"expected_status": "supported",
|
||||
"note": "Deutschland hat am 15. April 2023 die letzten 3 AKW abgeschaltet — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "April 2023",
|
||||
"expected_status": "supported",
|
||||
"note": "Abschaltdatum April 2023 ist korrekt"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/corpus/case_005/input.txt
Normal file
1
tests/corpus/case_005/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Im Jahr 2023 deckten erneuerbare Energien rund 70 Prozent des deutschen Stromverbrauchs ab. Windkraft war dabei die wichtigste Quelle, gefolgt von Photovoltaik und Biomasse. Deutschland hat im April 2023 seine letzten drei Kernkraftwerke vom Netz genommen. Der Ausbau erneuerbarer Energien ist zentrales Ziel der deutschen Energiepolitik.
|
||||
15
tests/corpus/case_005/notes.md
Normal file
15
tests/corpus/case_005/notes.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Case 005 — Erneuerbare Energien Deutschland 2023
|
||||
|
||||
## Fehler
|
||||
Der Text behauptet 70% Anteil erneuerbarer Energien am Stromverbrauch 2023.
|
||||
Laut Bundesnetzagentur / Fraunhofer ISE lag der Anteil 2023 bei ca. **59,0%** (Stromerzeugung)
|
||||
bzw. ~52% am Verbrauch.
|
||||
|
||||
## Quelle
|
||||
- Fraunhofer ISE Energy-Charts
|
||||
- Bundesnetzagentur Jahresbericht 2023
|
||||
|
||||
## Korrekte Fakten
|
||||
- AKW-Abschaltung April 2023 ✓
|
||||
- Windkraft wichtigste Quelle ✓
|
||||
- Reihenfolge Wind > PV > Biomasse (ungefähr) ✓
|
||||
24
tests/corpus/case_006/expected.json
Normal file
24
tests/corpus/case_006/expected.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "75.000 US-Dollar",
|
||||
"expected_status": "contradicted",
|
||||
"note": "Bitcoin ATH Nov. 2021 war ca. $68.000-69.000, nicht $75.000"
|
||||
},
|
||||
{
|
||||
"text_contains": "2009",
|
||||
"expected_status": "supported",
|
||||
"note": "Bitcoin wurde 2009 eingeführt — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "21 Millionen",
|
||||
"expected_status": "supported",
|
||||
"note": "Bitcoin-Supply-Cap ist 21 Mio — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "Proof-of-Work",
|
||||
"expected_status": "supported",
|
||||
"note": "Bitcoin verwendet PoW — korrekter Fakt"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/corpus/case_006/input.txt
Normal file
1
tests/corpus/case_006/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Bitcoin erreichte im November 2021 ein Allzeithoch von rund 75.000 US-Dollar. Die Kryptowährung wurde 2009 von einer Person oder Gruppe unter dem Pseudonym Satoshi Nakamoto eingeführt. Die Gesamtmenge an Bitcoin ist auf 21 Millionen Einheiten begrenzt. Bitcoin verwendet zur Absicherung der Transaktionen die Proof-of-Work-Methode.
|
||||
14
tests/corpus/case_006/notes.md
Normal file
14
tests/corpus/case_006/notes.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Case 006 — Bitcoin Allzeithoch 2021
|
||||
|
||||
## Fehler
|
||||
Das Bitcoin-ATH im November 2021 lag bei ca. **$68.789** (10. November 2021), nicht bei $75.000.
|
||||
Das tatsächliche Allzeithoch von ~$73.000+ wurde erst im März 2024 erreicht.
|
||||
|
||||
## Quelle
|
||||
- CoinMarketCap historische Daten
|
||||
|
||||
## Korrekte Fakten
|
||||
- Einführungsjahr 2009 ✓
|
||||
- Satoshi Nakamoto Pseudonym ✓
|
||||
- Supply-Cap 21 Millionen ✓
|
||||
- Proof-of-Work ✓
|
||||
19
tests/corpus/case_007/expected.json
Normal file
19
tests/corpus/case_007/expected.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"claims": [
|
||||
{
|
||||
"text_contains": "Dezember 2020",
|
||||
"expected_status": "supported",
|
||||
"note": "FDA EUA für BioNTech/Pfizer war 11. Dezember 2020 — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "95 Prozent",
|
||||
"expected_status": "supported",
|
||||
"note": "Studien zeigten ~95% Wirksamkeit (Phase-3-Studie) — korrekter Fakt"
|
||||
},
|
||||
{
|
||||
"text_contains": "Mainz",
|
||||
"expected_status": "supported",
|
||||
"note": "BioNTech-Sitz ist Mainz — korrekter Fakt"
|
||||
}
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue