'use client' import { useState } from 'react' import { Language } from '@/lib/types' import { t } from '@/lib/i18n' import GradientText from '../ui/GradientText' import FadeInView from '../ui/FadeInView' import GlassCard from '../ui/GlassCard' import { Brain, Search, Database, FileText, Bot, Zap, Layers, ArrowRight, Activity, Shield, Cpu, MessageSquare, Eye, Gauge, Network, Sparkles, } from 'lucide-react' interface AIPipelineSlideProps { lang: Language } type PipelineTab = 'rag' | 'agents' | 'quality' export default function AIPipelineSlide({ lang }: AIPipelineSlideProps) { const i = t(lang) const de = lang === 'de' const [activeTab, setActiveTab] = useState('rag') const heroStats = [ { value: '38+', label: de ? 'Indexierte Verordnungen' : 'Indexed Regulations', sub: 'DSGVO · AI Act · NIS2 · CRA · BDSG · DSA · ...', color: 'text-indigo-400' }, { value: '6.259', label: de ? 'Extrahierte Controls' : 'Extracted Controls', sub: de ? '79% Source-Match · 9 Verordnungen' : '79% source match · 9 regulations', color: 'text-purple-400' }, { value: '6', label: de ? 'Qdrant Collections' : 'Qdrant Collections', sub: de ? 'Legal Corpus · DSFA · Recht · Templates · ...' : 'Legal Corpus · DSFA · Law · Templates · ...', color: 'text-emerald-400' }, { value: '325+', label: de ? 'Abgeleitete Pflichten' : 'Derived Obligations', sub: de ? 'NIS2 · DSGVO · AI Act · CRA · ...' : 'NIS2 · GDPR · AI Act · CRA · ...', color: 'text-amber-400' }, ] const tabs: { id: PipelineTab; label: string; icon: typeof Brain }[] = [ { id: 'rag', label: de ? 'RAG-Pipeline' : 'RAG Pipeline', icon: Search }, { id: 'agents', label: de ? 'UCCA & Engines' : 'UCCA & Engines', icon: Bot }, { id: 'quality', label: de ? 'QA & Infrastruktur' : 'QA & Infrastructure', icon: Gauge }, ] // RAG Pipeline content const ragPipelineSteps = [ { icon: FileText, color: 'text-blue-400', bg: 'bg-blue-500/10 border-blue-500/20', title: de ? '1. Ingestion & QA' : '1. Ingestion & QA', items: de ? ['38+ PDF-Verordnungen (EU + DE + International)', 'Strukturelles Chunking an Artikel/Absatz-Grenzen', 'PDF-QA-Pipeline: 86% Artikel-Extraktion', 'Deduplizierung + Cross-Regulation Harmonisierung'] : ['38+ PDF regulations (EU + DE + International)', 'Structural chunking at article/paragraph boundaries', 'PDF QA pipeline: 86% article extraction', 'Deduplication + cross-regulation harmonization'], }, { icon: Cpu, color: 'text-purple-400', bg: 'bg-purple-500/10 border-purple-500/20', title: de ? '2. Embedding & LLM' : '2. Embedding & LLM', items: de ? ['BGE-M3 Multilingual (1024-dim, lokal)', '120B LLM auf OVH (via LiteLLM, OpenAI-kompatibel)', '1000B LLM auf SysEleven (BSI-zertifiziert)', 'CrossEncoder Re-Ranking + HyDE'] : ['BGE-M3 multilingual (1024-dim, local)', '120B LLM on OVH (via LiteLLM, OpenAI-compatible)', '1000B LLM on SysEleven (BSI-certified)', 'CrossEncoder re-ranking + HyDE'], }, { icon: Database, color: 'text-emerald-400', bg: 'bg-emerald-500/10 border-emerald-500/20', title: de ? '3. Vektorspeicher' : '3. Vector Store', items: de ? ['Qdrant Vector DB (Hetzner, API-Key gesichert)', '6 Collections: CE, Recht, Gesetze, Datenschutz, DSFA, Templates', 'MinIO Object Storage (Hetzner, S3-kompatibel, TLS)', '25.000+ Sicherheitskontrollen · 110 Regularien · HNSW-Index'] : ['Qdrant Vector DB (Hetzner, API-key secured)', '6 Collections: CE, Law, Statutes, Privacy, DSFA, Templates', 'MinIO object storage (Hetzner, S3-compatible, TLS)', '25,000+ security controls · 110 regulations · HNSW index'], }, { icon: Search, color: 'text-indigo-400', bg: 'bg-indigo-500/10 border-indigo-500/20', title: de ? '4. Hybrid Search' : '4. Hybrid Search', items: de ? ['Multi-Collection-Suche mit Whitelist-Validierung', 'Deutsche Komposita-Zerlegung', 'Cross-Encoder Re-Ranking der Top-K Ergebnisse', 'Quellen-Attribution mit Artikel/Absatz-Referenz'] : ['Multi-collection search with whitelist validation', 'German compound word decomposition', 'Cross-encoder re-ranking of top-K results', 'Source attribution with article/paragraph reference'], }, ] // Multi-Agent System content — UCCA + Policy Engine const agents = [ { name: 'UCCA', soul: de ? 'Use-Case Compliance' : 'Use-Case Compliance', desc: de ? 'Policy Engine (45 Regeln) + Eskalation E0–E3' : 'Policy engine (45 rules) + escalation E0–E3', color: 'text-indigo-400' }, { name: de ? 'Pflichten-Engine' : 'Obligations Engine', soul: de ? '325+ Pflichten' : '325+ obligations', desc: de ? 'Multi-Regulation: NIS2, DSGVO, AI Act, CRA, ...' : 'Multi-regulation: NIS2, GDPR, AI Act, CRA, ...', color: 'text-emerald-400' }, { name: de ? 'Compliance-Berater' : 'Compliance Advisor', soul: de ? 'Legal RAG + LLM' : 'Legal RAG + LLM', desc: de ? 'Wizard-basierter Chatbot mit Qdrant-Kontext' : 'Wizard-based chatbot with Qdrant context', color: 'text-purple-400' }, { name: de ? 'Dokument-Generator' : 'Document Generator', soul: de ? '20 Templates' : '20 templates', desc: de ? 'AGB, DSE, AV-Vertrag, Widerruf + 16 weitere' : 'T&C, Privacy Policy, DPA, Withdrawal + 16 more', color: 'text-amber-400' }, { name: de ? 'DSFA-Agent' : 'DSFA Agent', soul: de ? 'Art. 35 DSGVO' : 'Art. 35 GDPR', desc: de ? 'Risikobewertung mit Legal Context Injection' : 'Risk assessment with legal context injection', color: 'text-red-400' }, { name: de ? 'Schulungs-Engine' : 'Training Engine', soul: de ? 'Academy + TTS' : 'Academy + TTS', desc: de ? '28 Module · Piper TTS · Automatische Videos' : '28 modules · Piper TTS · Automatic videos', color: 'text-blue-400' }, ] const agentInfra = [ { icon: Shield, label: de ? 'Policy Engine' : 'Policy Engine', desc: de ? 'Deterministisch · LLM ist NICHT Wahrheitsquelle' : 'Deterministic · LLM is NOT source of truth' }, { icon: Brain, label: de ? 'LLM-Schicht' : 'LLM Layer', desc: de ? '120B (OVH) + 1000B (SysEleven BSI) · EU-only' : '120B (OVH) + 1000B (SysEleven BSI) · EU-only' }, { icon: Network, label: 'LiteLLM Gateway', desc: de ? 'OpenAI-kompatibel · Multi-Provider Routing' : 'OpenAI-compatible · Multi-provider routing' }, { icon: Activity, label: de ? 'Eskalation E0–E3' : 'Escalation E0–E3', desc: de ? 'Auto-Approve → Team-Lead → DSB → DSB+Legal' : 'Auto-approve → Team lead → DPO → DPO+Legal' }, ] // Quality Assurance content const qaFeatures = [ { icon: Shield, color: 'text-emerald-400', title: de ? 'Control Quality Pipeline' : 'Control Quality Pipeline', items: de ? ['6.259 Controls extrahiert (79% Source-Match)', '3.301 Duplikate entfernt (Phase 5 Normalisierung)', '90+ QA-Skripte: Deduplizierung, Match-Validierung', 'Canonical Controls JSON-Schema-Validierung in CI'] : ['6,259 controls extracted (79% source match)', '3,301 duplicates removed (Phase 5 normalization)', '90+ QA scripts: deduplication, match validation', 'Canonical Controls JSON schema validation in CI'], }, { icon: Eye, color: 'text-indigo-400', title: de ? 'RAG Quality & Monitoring' : 'RAG Quality & Monitoring', items: de ? ['PDF-QA-Pipeline: 86% Artikel-Extraktion', 'Multi-Collection-Whitelist-Validierung', 'Qdrant-Deduplizierung: 8-Stufen-Bereinigung', 'Fallback-Handling: RAG-Fehler brechen nie Hauptfunktion'] : ['PDF QA pipeline: 86% article extraction', 'Multi-collection whitelist validation', 'Qdrant deduplication: 8-step cleanup', 'Fallback handling: RAG failures never break main function'], }, { icon: Sparkles, color: 'text-purple-400', title: de ? 'CI/CD & Testing' : 'CI/CD & Testing', items: de ? ['Gitea Actions: Lint → Tests → Validierung bei jedem Push', 'Go-Tests (AI SDK) + Python-Tests (Backend + Crawler + Gateway)', 'Coolify Auto-Deploy mit Health-Check-Monitoring', 'arm64 → amd64 Cross-Build fuer Hetzner Production'] : ['Gitea Actions: Lint → Tests → Validation on every push', 'Go tests (AI SDK) + Python tests (Backend + Crawler + Gateway)', 'Coolify auto-deploy with health check monitoring', 'arm64 → amd64 cross-build for Hetzner production'], }, { icon: Zap, color: 'text-amber-400', title: de ? 'LLM-Infrastruktur' : 'LLM Infrastructure', items: de ? ['120B Modell auf OVH via LiteLLM (OpenAI-kompatibel)', '1000B Modell auf SysEleven (BSI-zertifiziert)', 'Isolierte Namespaces pro Kunde · Keine US-Provider', 'BGE-M3 Embedding lokal · Lazy Model Loading'] : ['120B model on OVH via LiteLLM (OpenAI-compatible)', '1000B model on SysEleven (BSI-certified)', 'Isolated namespaces per customer · No US providers', 'BGE-M3 embedding local · Lazy model loading'], }, ] return (

{de ? 'Anhang' : 'Appendix'}

{i.annex.aipipeline.title}

{i.annex.aipipeline.subtitle}

{/* Hero Stats */}
{heroStats.map((stat, idx) => (

{stat.value}

{stat.label}

{stat.sub}

))}
{/* Tab Navigation */}
{tabs.map((tab) => { const Icon = tab.icon return ( ) })}
{/* Tab Content */} {activeTab === 'rag' && (
{/* Pipeline Flow Visualization */}
{[ { icon: FileText, label: '38+ PDFs' }, { icon: Layers, label: 'QA + Chunking' }, { icon: Cpu, label: 'BGE-M3' }, { icon: Database, label: '6 Collections' }, { icon: Search, label: 'Hybrid Search' }, { icon: Brain, label: '120B / 1000B' }, ].map((step, idx, arr) => (
{step.label}
{idx < arr.length - 1 && }
))}
{/* Pipeline Steps */}
{ragPipelineSteps.map((step, idx) => { const Icon = step.icon return (

{step.title}

    {step.items.map((item, iidx) => (
  • {item}
  • ))}
) })}
)} {activeTab === 'agents' && (
{/* Agent List */}

{de ? 'Compliance-Engines' : 'Compliance Engines'}

{agents.map((agent, idx) => (

{agent.name}

{agent.desc}

{agent.soul}

))}
{/* Agent Infrastructure */}

{de ? 'Infrastruktur' : 'Infrastructure'}

{agentInfra.map((inf, idx) => { const Icon = inf.icon return (

{inf.label}

{inf.desc}

) })}

{de ? 'Wahrheit = Regeln + Evidenz · LLM = Uebersetzer + Subsumtions-Helfer · 100% EU-Cloud' : 'Truth = Rules + Evidence · LLM = Translator + Subsumption Helper · 100% EU Cloud'}

)} {activeTab === 'quality' && (
{qaFeatures.map((feat, idx) => { const Icon = feat.icon return (

{feat.title}

    {feat.items.map((item, iidx) => (
  • {item}
  • ))}
) })}
)}
) }