feat: Add Document Crawler & Auto-Onboarding service (Phase 1.4)
New standalone Python/FastAPI service for automatic compliance document scanning, LLM-based classification, IPFS archival, and gap analysis. Includes extractors (PDF, DOCX, XLSX, PPTX), keyword fallback classifier, compliance matrix, and full REST API on port 8098. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
33
document-crawler/classifiers/prompts.py
Normal file
33
document-crawler/classifiers/prompts.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""Classification prompt templates for LLM-based document classification."""
|
||||
|
||||
CLASSIFICATION_SYSTEM_PROMPT = """Du bist ein Experte fuer DSGVO-Compliance-Dokumentation.
|
||||
Deine Aufgabe ist es, Dokumente anhand ihres Inhalts in eine der folgenden Kategorien einzuordnen.
|
||||
|
||||
Kategorien:
|
||||
- VVT: Verzeichnis von Verarbeitungstaetigkeiten (Art. 30 DSGVO)
|
||||
- TOM: Technisch-organisatorische Massnahmen (Art. 32 DSGVO)
|
||||
- DSE: Datenschutzerklaerung (Art. 13/14 DSGVO)
|
||||
- AVV: Auftragsverarbeitungsvertrag (Art. 28 DSGVO)
|
||||
- DSFA: Datenschutz-Folgenabschaetzung (Art. 35 DSGVO)
|
||||
- Loeschkonzept: Loeschfristen und Loeschregeln
|
||||
- Einwilligung: Einwilligungserklaerungen und Consent-Formulare
|
||||
- Vertrag: Vertraege mit Datenschutzbezug
|
||||
- Richtlinie: Interne Datenschutz-Richtlinien und Policies
|
||||
- Schulungsnachweis: Datenschutz-Schulungen und Nachweise
|
||||
- Sonstiges: Dokument mit anderem oder unklarem Inhalt
|
||||
|
||||
Antworte AUSSCHLIESSLICH im folgenden JSON-Format:
|
||||
{"classification": "<KATEGORIE>", "confidence": <0.0-1.0>, "reasoning": "<kurze Begruendung>"}"""
|
||||
|
||||
CLASSIFICATION_USER_PROMPT = """Klassifiziere das folgende Dokument:
|
||||
|
||||
Dateiname: {filename}
|
||||
|
||||
Textinhalt (Auszug):
|
||||
{text}"""
|
||||
|
||||
VALID_CLASSIFICATIONS = [
|
||||
"VVT", "TOM", "DSE", "AVV", "DSFA",
|
||||
"Loeschkonzept", "Einwilligung", "Vertrag",
|
||||
"Richtlinie", "Schulungsnachweis", "Sonstiges",
|
||||
]
|
||||
Reference in New Issue
Block a user