feat(rag): Add DACH legal corpus ingestion (DE/AT/CH laws)
Add 29 new regulations (7 DE + 7 AT + 4 CH + 11 P2/P3) with country metadata, legal corpus text excerpts, and updated RAG admin UI with AT/CH type colors and labels. Fix module path in deploy script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
"""
|
||||
Legal Corpus Ingestion for UCCA RAG Integration.
|
||||
|
||||
Indexes all 19 regulations from the Compliance Hub into Qdrant for
|
||||
Indexes all regulations from the Compliance Hub into Qdrant for
|
||||
semantic search during UCCA assessments and explanations.
|
||||
Includes EU regulations, DACH national laws, and EDPB guidelines.
|
||||
|
||||
Collections:
|
||||
- bp_legal_corpus: All regulation texts (GDPR, AI Act, CRA, BSI, etc.)
|
||||
@@ -84,7 +85,7 @@ class Regulation:
|
||||
requirement_count: int = 0
|
||||
|
||||
|
||||
# All 19 regulations from Compliance Hub
|
||||
# All regulations from Compliance Hub (EU + DACH national laws + guidelines)
|
||||
REGULATIONS: List[Regulation] = [
|
||||
Regulation(
|
||||
code="GDPR",
|
||||
@@ -323,6 +324,348 @@ REGULATIONS: List[Regulation] = [
|
||||
celex="32023R1114",
|
||||
requirement_count=149,
|
||||
),
|
||||
# =====================================================================
|
||||
# DACH National Laws — Deutschland (P1)
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="DE_DDG",
|
||||
name="Digitale-Dienste-Gesetz",
|
||||
full_name="Digitale-Dienste-Gesetz (DDG)",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/ddg/",
|
||||
description="Deutsches Umsetzungsgesetz zum DSA. Regelt Impressumspflicht (§5), Informationspflichten fuer digitale Dienste und Cookies.",
|
||||
requirement_count=30,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_BGB_AGB",
|
||||
name="BGB AGB-Recht",
|
||||
full_name="BGB §§305-310, 312-312k — AGB und Fernabsatz",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/bgb/",
|
||||
description="Deutsches AGB-Recht (§§305-310 BGB) und Fernabsatzrecht (§§312-312k BGB). Klauselverbote, Inhaltskontrolle, Widerrufsrecht, Button-Loesung.",
|
||||
local_path="DE_BGB_AGB.txt",
|
||||
requirement_count=40,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_EGBGB",
|
||||
name="EGBGB Art. 246-248",
|
||||
full_name="Einfuehrungsgesetz zum BGB — Informationspflichten",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/bgbeg/",
|
||||
description="Informationspflichten bei Verbrauchervertraegen (Art. 246), Fernabsatz (Art. 246a), E-Commerce (Art. 246c).",
|
||||
local_path="DE_EGBGB.txt",
|
||||
requirement_count=20,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_UWG",
|
||||
name="UWG Deutschland",
|
||||
full_name="Gesetz gegen den unlauteren Wettbewerb (UWG)",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/uwg_2004/",
|
||||
description="Unlauterer Wettbewerb: irrefuehrende Werbung, Spam-Verbot, Preisangaben, Online-Marketing-Regeln.",
|
||||
requirement_count=25,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_HGB_RET",
|
||||
name="HGB Aufbewahrung",
|
||||
full_name="HGB §§238-261, 257 — Handelsbuecher und Aufbewahrungsfristen",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/hgb/",
|
||||
description="Buchfuehrungspflicht, Aufbewahrungsfristen 6/10 Jahre, Anforderungen an elektronische Aufbewahrung.",
|
||||
local_path="DE_HGB_RET.txt",
|
||||
requirement_count=15,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_AO_RET",
|
||||
name="AO Aufbewahrung",
|
||||
full_name="Abgabenordnung §§140-148 — Steuerliche Aufbewahrungspflichten",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/ao_1977/",
|
||||
description="Steuerliche Buchfuehrungs- und Aufbewahrungspflichten. 6/10 Jahre Fristen, Datenzugriff durch Finanzbehoerden.",
|
||||
local_path="DE_AO_RET.txt",
|
||||
requirement_count=12,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_TKG",
|
||||
name="TKG 2021",
|
||||
full_name="Telekommunikationsgesetz 2021",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/tkg_2021/",
|
||||
description="Telekommunikationsregulierung: Kundenschutz, Datenschutz, Vertragslaufzeiten, Netzinfrastruktur.",
|
||||
requirement_count=45,
|
||||
),
|
||||
# =====================================================================
|
||||
# DACH National Laws — Oesterreich (P1)
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="AT_ECG",
|
||||
name="E-Commerce-Gesetz AT",
|
||||
full_name="E-Commerce-Gesetz (ECG) Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20001703",
|
||||
description="Oesterreichisches E-Commerce-Gesetz: Impressum/Offenlegungspflicht (§5), Informationspflichten, Haftung von Diensteanbietern.",
|
||||
language="de",
|
||||
requirement_count=30,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_TKG",
|
||||
name="TKG 2021 AT",
|
||||
full_name="Telekommunikationsgesetz 2021 Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20011678",
|
||||
description="Oesterreichisches TKG: Cookie-Bestimmungen (§165), Kommunikationsgeheimnis, Endgeraetezugriff.",
|
||||
language="de",
|
||||
requirement_count=40,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_KSCHG",
|
||||
name="KSchG Oesterreich",
|
||||
full_name="Konsumentenschutzgesetz (KSchG) Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10002462",
|
||||
description="Konsumentenschutz: AGB-Kontrolle (§6 Klauselverbote, §9 Verbandsklage), Ruecktrittsrecht, Informationspflichten.",
|
||||
language="de",
|
||||
requirement_count=35,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_FAGG",
|
||||
name="FAGG Oesterreich",
|
||||
full_name="Fern- und Auswaertsgeschaefte-Gesetz (FAGG) Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=20008847",
|
||||
description="Fernabsatzrecht: Informationspflichten, Widerrufsrecht 14 Tage, Button-Loesung, Ausnahmen.",
|
||||
language="de",
|
||||
requirement_count=20,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_UGB_RET",
|
||||
name="UGB Aufbewahrung AT",
|
||||
full_name="UGB §§189-216, 212 — Rechnungslegung und Aufbewahrung Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10001702",
|
||||
description="Oesterreichische Rechnungslegungspflicht und Aufbewahrungsfristen (7 Jahre). Buchfuehrung, Jahresabschluss.",
|
||||
local_path="AT_UGB_RET.txt",
|
||||
language="de",
|
||||
requirement_count=15,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_BAO_RET",
|
||||
name="BAO §132 AT",
|
||||
full_name="Bundesabgabenordnung §132 — Aufbewahrung Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10003940",
|
||||
description="Steuerliche Aufbewahrungspflicht 7 Jahre fuer Buecher, Aufzeichnungen und Belege. Grundstuecke 22 Jahre.",
|
||||
language="de",
|
||||
requirement_count=5,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_MEDIENG",
|
||||
name="MedienG §§24-25 AT",
|
||||
full_name="Mediengesetz §§24-25 Oesterreich — Impressum und Offenlegung",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10000719",
|
||||
description="Impressum/Offenlegungspflicht fuer periodische Medien und Websites in Oesterreich.",
|
||||
language="de",
|
||||
requirement_count=10,
|
||||
),
|
||||
# =====================================================================
|
||||
# DACH National Laws — Schweiz (P1)
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="CH_DSV",
|
||||
name="DSV Schweiz",
|
||||
full_name="Datenschutzverordnung (DSV) Schweiz — SR 235.11",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/2022/568/de",
|
||||
description="Ausfuehrungsverordnung zum revDSG: Meldepflichten, DSFA-Verfahren, Auslandtransfers, technische Massnahmen.",
|
||||
language="de",
|
||||
requirement_count=30,
|
||||
),
|
||||
Regulation(
|
||||
code="CH_OR_AGB",
|
||||
name="OR AGB/Aufbewahrung CH",
|
||||
full_name="Obligationenrecht — AGB-Kontrolle und Aufbewahrung Schweiz (SR 220)",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/27/317_321_377/de",
|
||||
description="Art. 8 OR (AGB-Inhaltskontrolle), Art. 19/20 (Vertragsfreiheit), Art. 957-958f (Buchfuehrung, 10 Jahre Aufbewahrung).",
|
||||
local_path="CH_OR_AGB.txt",
|
||||
language="de",
|
||||
requirement_count=20,
|
||||
),
|
||||
Regulation(
|
||||
code="CH_UWG",
|
||||
name="UWG Schweiz",
|
||||
full_name="Bundesgesetz gegen den unlauteren Wettbewerb Schweiz (SR 241)",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/1988/223_223_223/de",
|
||||
description="Lauterkeitsrecht: Impressumspflicht, irrefuehrende Werbung, aggressive Verkaufsmethoden, AGB-Transparenz.",
|
||||
language="de",
|
||||
requirement_count=20,
|
||||
),
|
||||
Regulation(
|
||||
code="CH_FMG",
|
||||
name="FMG Schweiz",
|
||||
full_name="Fernmeldegesetz Schweiz (SR 784.10)",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/1997/2187_2187_2187/de",
|
||||
description="Telekommunikationsregulierung: Fernmeldegeheimnis, Cookies/Tracking (Art. 45c), Spam-Verbot, Datenschutz.",
|
||||
language="de",
|
||||
requirement_count=25,
|
||||
),
|
||||
# =====================================================================
|
||||
# Deutschland P2
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="DE_PANGV",
|
||||
name="PAngV",
|
||||
full_name="Preisangabenverordnung (PAngV 2022)",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/pangv_2022/",
|
||||
description="Preisangaben: Gesamtpreis, Grundpreis, Streichpreise (§11), Online-Preisauszeichnung.",
|
||||
requirement_count=15,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_DLINFOV",
|
||||
name="DL-InfoV",
|
||||
full_name="Dienstleistungs-Informationspflichten-Verordnung",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/dlinfov/",
|
||||
description="Informationspflichten fuer Dienstleister: Identitaet, Kontakt, Berufshaftpflicht, AGB-Zugang.",
|
||||
requirement_count=10,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_BETRVG",
|
||||
name="BetrVG §87",
|
||||
full_name="Betriebsverfassungsgesetz §87 Abs.1 Nr.6",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/betrvg/",
|
||||
description="Mitbestimmung bei technischer Ueberwachung: Betriebsrat-Beteiligung bei IT-Systemen, die Arbeitnehmerverhalten ueberwachen koennen.",
|
||||
requirement_count=5,
|
||||
),
|
||||
# =====================================================================
|
||||
# Oesterreich P2
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="AT_ABGB_AGB",
|
||||
name="ABGB AGB-Recht AT",
|
||||
full_name="ABGB §§861-879, 864a — AGB-Kontrolle Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10001622",
|
||||
description="Geltungskontrolle (§864a), Sittenwidrigkeitskontrolle (§879 Abs.3), allgemeine Vertragsregeln.",
|
||||
local_path="AT_ABGB_AGB.txt",
|
||||
language="de",
|
||||
requirement_count=10,
|
||||
),
|
||||
Regulation(
|
||||
code="AT_UWG",
|
||||
name="UWG Oesterreich",
|
||||
full_name="Bundesgesetz gegen den unlauteren Wettbewerb Oesterreich",
|
||||
regulation_type="at_law",
|
||||
source_url="https://www.ris.bka.gv.at/GeltendeFassung.wxe?Abfrage=Bundesnormen&Gesetzesnummer=10002665",
|
||||
description="Lauterkeitsrecht AT: irrefuehrende Geschaeftspraktiken, aggressive Praktiken, Preisauszeichnung.",
|
||||
language="de",
|
||||
requirement_count=15,
|
||||
),
|
||||
# =====================================================================
|
||||
# Schweiz P2
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="CH_GEBUV",
|
||||
name="GeBuV Schweiz",
|
||||
full_name="Geschaeftsbuecher-Verordnung Schweiz (SR 221.431)",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/2002/468_468_468/de",
|
||||
description="Ausfuehrungsvorschriften zur Buchfuehrung: elektronische Aufbewahrung, Integritaet, Datentraeger.",
|
||||
language="de",
|
||||
requirement_count=10,
|
||||
),
|
||||
Regulation(
|
||||
code="CH_ZERTES",
|
||||
name="ZertES Schweiz",
|
||||
full_name="Bundesgesetz ueber die elektronische Signatur (SR 943.03)",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/2016/752/de",
|
||||
description="Elektronische Signatur und Zertifizierung: Qualifizierte Signaturen, Zertifizierungsdiensteanbieter.",
|
||||
language="de",
|
||||
requirement_count=10,
|
||||
),
|
||||
# =====================================================================
|
||||
# Deutschland P3
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="DE_GESCHGEHG",
|
||||
name="GeschGehG",
|
||||
full_name="Gesetz zum Schutz von Geschaeftsgeheimnissen",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/geschgehg/",
|
||||
description="Schutz von Geschaeftsgeheimnissen: Definition, angemessene Geheimhaltungsmassnahmen, Reverse Engineering.",
|
||||
requirement_count=10,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_BSIG",
|
||||
name="BSI-Gesetz",
|
||||
full_name="Gesetz ueber das Bundesamt fuer Sicherheit in der Informationstechnik (BSIG)",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/bsig_2009/",
|
||||
description="BSI-Aufgaben, KRITIS-Meldepflichten, IT-Sicherheitsstandards, Zertifizierung.",
|
||||
requirement_count=20,
|
||||
),
|
||||
Regulation(
|
||||
code="DE_USTG_RET",
|
||||
name="UStG §14b",
|
||||
full_name="Umsatzsteuergesetz §14b — Aufbewahrung von Rechnungen",
|
||||
regulation_type="de_law",
|
||||
source_url="https://www.gesetze-im-internet.de/ustg_1980/",
|
||||
description="Aufbewahrungspflicht fuer Rechnungen: 10 Jahre, Grundstuecke 20 Jahre, elektronische Aufbewahrung.",
|
||||
local_path="DE_USTG_RET.txt",
|
||||
requirement_count=5,
|
||||
),
|
||||
# =====================================================================
|
||||
# Schweiz P3
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="CH_ZGB_PERS",
|
||||
name="ZGB Persoenlichkeitsschutz CH",
|
||||
full_name="Zivilgesetzbuch Art. 28-28l — Persoenlichkeitsschutz Schweiz (SR 210)",
|
||||
regulation_type="ch_law",
|
||||
source_url="https://www.fedlex.admin.ch/eli/cc/24/233_245_233/de",
|
||||
description="Persoenlichkeitsschutz: Recht am eigenen Bild, Schutz der Privatsphaere, Gegendarstellungsrecht.",
|
||||
language="de",
|
||||
requirement_count=8,
|
||||
),
|
||||
# =====================================================================
|
||||
# 3 fehlgeschlagene Quellen mit alternativen URLs nachholen
|
||||
# =====================================================================
|
||||
Regulation(
|
||||
code="LU_DPA_LAW",
|
||||
name="Datenschutzgesetz Luxemburg",
|
||||
full_name="Loi du 1er aout 2018 — Datenschutzgesetz Luxemburg",
|
||||
regulation_type="national_law",
|
||||
source_url="https://legilux.public.lu/eli/etat/leg/loi/2018/08/01/a686/jo",
|
||||
description="Luxemburgisches Datenschutzgesetz: Organisation der CNPD, nationale DSGVO-Ergaenzung.",
|
||||
language="fr",
|
||||
requirement_count=40,
|
||||
),
|
||||
Regulation(
|
||||
code="DK_DATABESKYTTELSESLOVEN",
|
||||
name="Databeskyttelsesloven DK",
|
||||
full_name="Databeskyttelsesloven — Datenschutzgesetz Daenemark",
|
||||
regulation_type="national_law",
|
||||
source_url="https://www.retsinformation.dk/eli/lta/2018/502",
|
||||
description="Daenisches Datenschutzgesetz als ergaenzende Bestimmungen zur DSGVO. Reguliert durch Datatilsynet.",
|
||||
language="da",
|
||||
requirement_count=30,
|
||||
),
|
||||
Regulation(
|
||||
code="EDPB_GUIDELINES_1_2022",
|
||||
name="EDPB GL Bussgelder",
|
||||
full_name="EDPB Leitlinien 04/2022 zur Berechnung von Bussgeldern nach der DSGVO",
|
||||
regulation_type="eu_guideline",
|
||||
source_url="https://www.edpb.europa.eu/system/files/2023-05/edpb_guidelines_042022_calculationofadministrativefines_en.pdf",
|
||||
description="EDPB-Leitlinien zur Berechnung von Verwaltungsbussgeldern unter der DSGVO.",
|
||||
language="en",
|
||||
requirement_count=15,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -887,7 +1230,7 @@ async def main():
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description="Legal Corpus Ingestion for UCCA")
|
||||
parser.add_argument("--ingest-all", action="store_true", help="Ingest all 19 regulations")
|
||||
parser.add_argument("--ingest-all", action="store_true", help="Ingest all regulations")
|
||||
parser.add_argument("--ingest", nargs="+", metavar="CODE", help="Ingest specific regulations by code")
|
||||
parser.add_argument("--status", action="store_true", help="Show collection status")
|
||||
parser.add_argument("--search", type=str, help="Test search query")
|
||||
@@ -902,7 +1245,7 @@ async def main():
|
||||
print(json.dumps(status, indent=2))
|
||||
|
||||
elif args.ingest_all:
|
||||
print("Ingesting all 19 regulations...")
|
||||
print(f"Ingesting all {len(REGULATIONS)} regulations...")
|
||||
results = await ingestion.ingest_all()
|
||||
print("\nResults:")
|
||||
for code, count in results.items():
|
||||
|
||||
Reference in New Issue
Block a user