diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 1096bbaf5a..d71cdffd61 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -1,13 +1,11 @@ name: 'Auto-translate Documentation' -# Temporarily disabled on: - workflow_dispatch: # Allow manual triggers only - # push: - # branches: [ staging ] - # paths: - # - 'apps/docs/content/docs/en/**' - # - 'apps/docs/i18n.json' + push: + branches: [ staging ] + paths: + - 'apps/docs/content/docs/en/**' + - 'apps/docs/i18n.json' permissions: contents: write diff --git a/apps/docs/content/docs/de/blocks/guardrails.mdx b/apps/docs/content/docs/de/blocks/guardrails.mdx index f2d6a95f8f..ce56f1773e 100644 --- a/apps/docs/content/docs/de/blocks/guardrails.mdx +++ b/apps/docs/content/docs/de/blocks/guardrails.mdx @@ -8,7 +8,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs' import { Image } from '@/components/ui/image' import { Video } from '@/components/ui/video' -The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. +Der Guardrails-Block validiert und schützt Ihre KI-Workflows, indem er Inhalte anhand mehrerer Validierungstypen überprüft. Stellen Sie die Datenqualität sicher, verhindern Sie Halluzinationen, erkennen Sie personenbezogene Daten und erzwingen Sie Formatanforderungen, bevor Inhalte durch Ihren Workflow fließen.
-## Overview +## Übersicht -The Guardrails block enables you to: +Mit dem Guardrails-Block können Sie: - Validate JSON Structure: Ensure LLM outputs are valid JSON before parsing + JSON-Struktur validieren: Stellen Sie sicher, dass LLM-Ausgaben gültiges JSON sind, bevor sie geparst werden - Match Regex Patterns: Verify content matches specific formats (emails, phone numbers, URLs, etc.) + Regex-Muster abgleichen: Überprüfen Sie, ob Inhalte bestimmten Formaten entsprechen (E-Mails, Telefonnummern, URLs usw.) - Detect Hallucinations: Use RAG + LLM scoring to validate AI outputs against knowledge base content + Halluzinationen erkennen: Nutzen Sie RAG + LLM-Scoring, um KI-Ausgaben anhand von Wissensdatenbankinhalten zu validieren - Detect PII: Identify and optionally mask personally identifiable information across 40+ entity types + PII erkennen: Identifizieren und optional maskieren Sie personenbezogene Daten über mehr als 40 Entitätstypen hinweg -## Validation Types +## Validierungstypen -### JSON Validation +### JSON-Validierung -Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. +Überprüft, ob Inhalte korrekt formatiertes JSON sind. Perfekt, um sicherzustellen, dass strukturierte LLM-Ausgaben sicher geparst werden können. -**Use Cases:** -- Validate JSON responses from Agent blocks before parsing -- Ensure API payloads are properly formatted -- Check structured data integrity +**Anwendungsfälle:** +- Validieren von JSON-Antworten aus Agent-Blöcken vor dem Parsen +- Sicherstellen, dass API-Payloads korrekt formatiert sind +- Überprüfen der Integrität strukturierter Daten **Output:** -- `passed`: `true` if valid JSON, `false` otherwise -- `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") +- `passed`: `true` wenn gültiges JSON, sonst `false` +- `error`: Fehlermeldung bei fehlgeschlagener Validierung (z.B. "Invalid JSON: Unexpected token...") -### Regex Validation +### Regex-Validierung -Checks if content matches a specified regular expression pattern. +Überprüft, ob Inhalte einem bestimmten regulären Ausdrucksmuster entsprechen. -**Use Cases:** -- Validate email addresses -- Check phone number formats -- Verify URLs or custom identifiers -- Enforce specific text patterns +**Anwendungsfälle:** +- Validieren von E-Mail-Adressen +- Überprüfen von Telefonnummernformaten +- Verifizieren von URLs oder benutzerdefinierten Kennungen +- Durchsetzen spezifischer Textmuster -**Configuration:** -- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails) +**Konfiguration:** +- **Regex-Muster**: Der reguläre Ausdruck, der abgeglichen werden soll (z.B. `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` für E-Mails) **Output:** -- `passed`: `true` if content matches pattern, `false` otherwise -- `error`: Error message if validation fails +- `passed`: `true` wenn der Inhalt dem Muster entspricht, `false` andernfalls +- `error`: Fehlermeldung bei fehlgeschlagener Validierung -### Hallucination Detection +### Halluzinationserkennung -Uses Retrieval-Augmented Generation (RAG) with LLM scoring to detect when AI-generated content contradicts or isn't grounded in your knowledge base. +Verwendet Retrieval-Augmented Generation (RAG) mit LLM-Bewertung, um zu erkennen, wann KI-generierte Inhalte im Widerspruch zu Ihrer Wissensdatenbank stehen oder nicht darin begründet sind. -**How It Works:** -1. Queries your knowledge base for relevant context -2. Sends both the AI output and retrieved context to an LLM -3. LLM assigns a confidence score (0-10 scale) - - **0** = Full hallucination (completely ungrounded) - - **10** = Fully grounded (completely supported by knowledge base) -4. Validation passes if score ≥ threshold (default: 3) +**Funktionsweise:** +1. Durchsucht Ihre Wissensdatenbank nach relevantem Kontext +2. Sendet sowohl die KI-Ausgabe als auch den abgerufenen Kontext an ein LLM +3. LLM weist einen Konfidenzwert zu (Skala 0-10) + - **0** = Vollständige Halluzination (völlig unbegründet) + - **10** = Vollständig fundiert (komplett durch Wissensdatenbank gestützt) +4. Validierung besteht, wenn der Wert ≥ Schwellenwert (Standard: 3) -**Configuration:** -- **Knowledge Base**: Select from your existing knowledge bases -- **Model**: Choose LLM for scoring (requires strong reasoning - GPT-4o, Claude 3.7 Sonnet recommended) -- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama models) -- **Confidence Threshold**: Minimum score to pass (0-10, default: 3) -- **Top K** (Advanced): Number of knowledge base chunks to retrieve (default: 10) +**Konfiguration:** +- **Wissensdatenbank**: Auswahl aus Ihren vorhandenen Wissensdatenbanken +- **Modell**: LLM für die Bewertung wählen (erfordert starkes Reasoning - GPT-4o, Claude 3.7 Sonnet empfohlen) +- **API-Schlüssel**: Authentifizierung für den ausgewählten LLM-Anbieter (automatisch ausgeblendet für gehostete/Ollama-Modelle) +- **Konfidenz-Schwellenwert**: Mindestwert zum Bestehen (0-10, Standard: 3) +- **Top K** (Erweitert): Anzahl der abzurufenden Wissensdatenbank-Chunks (Standard: 10) **Output:** -- `passed`: `true` if confidence score ≥ threshold -- `score`: Confidence score (0-10) -- `reasoning`: LLM's explanation for the score -- `error`: Error message if validation fails +- `passed`: `true` wenn Konfidenzwert ≥ Schwellenwert +- `score`: Konfidenzwert (0-10) +- `reasoning`: Erklärung des LLM für den Wert +- `error`: Fehlermeldung bei fehlgeschlagener Validierung -**Use Cases:** -- Validate Agent responses against documentation -- Ensure customer support answers are factually accurate -- Verify generated content matches source material -- Quality control for RAG applications +**Anwendungsfälle:** +- Validierung von Agent-Antworten anhand der Dokumentation +- Sicherstellen, dass Kundenservice-Antworten sachlich korrekt sind +- Überprüfen, ob generierte Inhalte mit dem Quellmaterial übereinstimmen +- Qualitätskontrolle für RAG-Anwendungen -### PII Detection +### PII-Erkennung -Detects personally identifiable information using Microsoft Presidio. Supports 40+ entity types across multiple countries and languages. +Erkennt personenbezogene Daten mit Microsoft Presidio. Unterstützt über 40 Entitätstypen in mehreren Ländern und Sprachen.
-**How It Works:** -1. Scans content for PII entities using pattern matching and NLP -2. Returns detected entities with locations and confidence scores -3. Optionally masks detected PII in the output - -**Configuration:** -- **PII Types to Detect**: Select from grouped categories via modal selector - - **Common**: Person name, Email, Phone, Credit card, IP address, etc. - - **USA**: SSN, Driver's license, Passport, etc. - - **UK**: NHS number, National insurance number - - **Spain**: NIF, NIE, CIF - - **Italy**: Fiscal code, Driver's license, VAT code - - **Poland**: PESEL, NIP, REGON - - **Singapore**: NRIC/FIN, UEN - - **Australia**: ABN, ACN, TFN, Medicare - - **India**: Aadhaar, PAN, Passport, Voter number -- **Mode**: - - **Detect**: Only identify PII (default) - - **Mask**: Replace detected PII with masked values -- **Language**: Detection language (default: English) +**Funktionsweise:** +1. Scannt Inhalte nach PII-Entitäten mittels Mustererkennung und NLP +2. Gibt erkannte Entitäten mit Positionen und Konfidenzwerten zurück +3. Maskiert optional erkannte PII in der Ausgabe -**Output:** -- `passed`: `false` if any selected PII types are detected -- `detectedEntities`: Array of detected PII with type, location, and confidence -- `maskedText`: Content with PII masked (only if mode = "Mask") -- `error`: Error message if validation fails +**Konfiguration:** +- **Zu erkennende PII-Typen**: Auswahl aus gruppierten Kategorien über Modal-Selektor + - **Allgemein**: Personenname, E-Mail, Telefon, Kreditkarte, IP-Adresse usw. + - **USA**: SSN, Führerschein, Reisepass usw. + - **UK**: NHS-Nummer, Sozialversicherungsnummer + - **Spanien**: NIF, NIE, CIF + - **Italien**: Steuernummer, Führerschein, Umsatzsteuer-ID + - **Polen**: PESEL, NIP, REGON + - **Singapur**: NRIC/FIN, UEN + - **Australien**: ABN, ACN, TFN, Medicare + - **Indien**: Aadhaar, PAN, Reisepass, Wählernummer +- **Modus**: + - **Erkennen**: Nur PII identifizieren (Standard) + - **Maskieren**: Erkannte PII durch maskierte Werte ersetzen +- **Sprache**: Erkennungssprache (Standard: Englisch) + +**Ausgabe:** +- `passed`: `false` wenn ausgewählte PII-Typen erkannt werden +- `detectedEntities`: Array erkannter PII mit Typ, Position und Konfidenz +- `maskedText`: Inhalt mit maskierter PII (nur wenn Modus = "Mask") +- `error`: Fehlermeldung, wenn die Validierung fehlschlägt -**Use Cases:** -- Block content containing sensitive personal information -- Mask PII before logging or storing data -- Compliance with GDPR, HIPAA, and other privacy regulations -- Sanitize user inputs before processing +**Anwendungsfälle:** +- Blockieren von Inhalten mit sensiblen persönlichen Informationen +- Maskieren von PII vor der Protokollierung oder Speicherung von Daten +- Einhaltung von DSGVO, HIPAA und anderen Datenschutzbestimmungen +- Bereinigung von Benutzereingaben vor der Verarbeitung -## Configuration +## Konfiguration -### Content to Validate +### Zu validierender Inhalt -The input content to validate. This typically comes from: -- Agent block outputs: `` -- Function block results: `` -- API responses: `` -- Any other block output +Der zu validierende Eingabeinhalt. Dieser stammt typischerweise aus: +- Ausgaben von Agent-Blöcken: `` +- Ergebnisse von Funktionsblöcken: `` +- API-Antworten: `` +- Jede andere Blockausgabe -### Validation Type +### Validierungstyp -Choose from four validation types: -- **Valid JSON**: Check if content is properly formatted JSON -- **Regex Match**: Verify content matches a regex pattern -- **Hallucination Check**: Validate against knowledge base with LLM scoring -- **PII Detection**: Detect and optionally mask personally identifiable information +Wählen Sie aus vier Validierungstypen: +- **Gültiges JSON**: Prüfen, ob der Inhalt korrekt formatiertes JSON ist +- **Regex-Übereinstimmung**: Überprüfen, ob der Inhalt einem Regex-Muster entspricht +- **Halluzinationsprüfung**: Validierung gegen Wissensdatenbank mit LLM-Bewertung +- **PII-Erkennung**: Erkennung und optional Maskierung personenbezogener Daten -## Outputs +## Ausgaben -All validation types return: +Alle Validierungstypen liefern zurück: -- **``**: Boolean indicating if validation passed -- **``**: The type of validation performed -- **``**: The original input that was validated -- **``**: Error message if validation failed (optional) +- **``**: Boolean, der angibt, ob die Validierung erfolgreich war +- **``**: Die Art der durchgeführten Validierung +- **``**: Die ursprüngliche Eingabe, die validiert wurde +- **``**: Fehlermeldung, wenn die Validierung fehlgeschlagen ist (optional) -Additional outputs by type: +Zusätzliche Ausgaben nach Typ: -**Hallucination Check:** -- **``**: Confidence score (0-10) -- **``**: LLM's explanation +**Halluzinationsprüfung:** +- **``**: Konfidenzwert (0-10) +- **``**: Erklärung des LLM -**PII Detection:** -- **``**: Array of detected PII entities -- **``**: Content with PII masked (if mode = "Mask") +**PII-Erkennung:** +- **``**: Array erkannter PII-Entitäten +- **``**: Inhalt mit maskierter PII (wenn Modus = "Mask") -## Example Use Cases +## Beispielanwendungsfälle -### Validate JSON Before Parsing +### JSON vor dem Parsen validieren
-

Scenario: Ensure Agent output is valid JSON

+

Szenario: Sicherstellen, dass die Agent-Ausgabe gültiges JSON ist

    -
  1. Agent generates structured JSON response
  2. -
  3. Guardrails validates JSON format
  4. -
  5. Condition block checks ``
  6. -
  7. If passed → Parse and use data, If failed → Retry or handle error
  8. +
  9. Agent generiert strukturierte JSON-Antwort
  10. +
  11. Guardrails validiert das JSON-Format
  12. +
  13. Bedingungsblock prüft ``
  14. +
  15. Bei Erfolg → Daten parsen und verwenden, Bei Fehler → Wiederholen oder Fehler behandeln
-### Prevent Hallucinations +### Halluzinationen verhindern
-

Scenario: Validate customer support responses

+

Szenario: Validierung von Kundendienstantworten

    -
  1. Agent generates response to customer question
  2. -
  3. Guardrails checks against support documentation knowledge base
  4. -
  5. If confidence score ≥ 3 → Send response
  6. -
  7. If confidence score \< 3 → Flag for human review
  8. +
  9. Agent generiert Antwort auf Kundenfrage
  10. +
  11. Guardrails prüft gegen die Wissensdatenbank der Support-Dokumentation
  12. +
  13. Wenn Konfidenzwert ≥ 3 → Antwort senden
  14. +
  15. Wenn Konfidenzwert \< 3 → Für manuelle Überprüfung markieren
-### Block PII in User Inputs +### PII in Benutzereingaben blockieren
-

Scenario: Sanitize user-submitted content

+

Szenario: Bereinigung von benutzergenerierten Inhalten

    -
  1. User submits form with text content
  2. -
  3. Guardrails detects PII (emails, phone numbers, SSN, etc.)
  4. -
  5. If PII detected → Reject submission or mask sensitive data
  6. -
  7. If no PII → Process normally
  8. +
  9. Benutzer reicht Formular mit Textinhalt ein
  10. +
  11. Guardrails erkennt PII (E-Mails, Telefonnummern, Sozialversicherungsnummern usw.)
  12. +
  13. Bei erkannter PII → Einreichung ablehnen oder sensible Daten maskieren
  14. +
  15. Ohne PII → Normal verarbeiten
@@ -222,30 +222,29 @@ Additional outputs by type: