Table of Contents
Fetching ...

SafeGPT: Preventing Data Leakage and Unethical Outputs in Enterprise LLM Use

Pratyush Desai, Luoxi Tang, Yuqiao Meng, Zhaohan Xi

TL;DR

SafeGPT tackles data leakage and unethical-output risks in enterprise LLM use by introducing a two-sided guardrail architecture that gates input prompts and polices outputs, enhanced by human-in-the-loop feedback. The input side uses pattern matching, enterprise NER, and knowledge graphs to detect structured secrets and contextual risks, applying block, warn, or redact actions. The output side employs classifiers for bias and policy compliance, along with automated remediation and occasional human review. Experiments on synthetic datasets show high precision/recall and substantial leakage reduction, with end-to-end improvements in compliance and user satisfaction. This approach offers a practical, auditable framework for safer, enterprise-grade LLM deployments.

Abstract

Large Language Models (LLMs) are transforming enterprise workflows but introduce security and ethics challenges when employees inadvertently share confidential data or generate policy-violating content. This paper proposes SafeGPT, a two-sided guardrail system preventing sensitive data leakage and unethical outputs. SafeGPT integrates input-side detection/redaction, output-side moderation/reframing, and human-in-the-loop feedback. Experiments demonstrate SafeGPT effectively reduces data leakage risk and biased outputs while maintaining satisfaction.

SafeGPT: Preventing Data Leakage and Unethical Outputs in Enterprise LLM Use

TL;DR

SafeGPT tackles data leakage and unethical-output risks in enterprise LLM use by introducing a two-sided guardrail architecture that gates input prompts and polices outputs, enhanced by human-in-the-loop feedback. The input side uses pattern matching, enterprise NER, and knowledge graphs to detect structured secrets and contextual risks, applying block, warn, or redact actions. The output side employs classifiers for bias and policy compliance, along with automated remediation and occasional human review. Experiments on synthetic datasets show high precision/recall and substantial leakage reduction, with end-to-end improvements in compliance and user satisfaction. This approach offers a practical, auditable framework for safer, enterprise-grade LLM deployments.

Abstract

Large Language Models (LLMs) are transforming enterprise workflows but introduce security and ethics challenges when employees inadvertently share confidential data or generate policy-violating content. This paper proposes SafeGPT, a two-sided guardrail system preventing sensitive data leakage and unethical outputs. SafeGPT integrates input-side detection/redaction, output-side moderation/reframing, and human-in-the-loop feedback. Experiments demonstrate SafeGPT effectively reduces data leakage risk and biased outputs while maintaining satisfaction.
Paper Structure (23 sections, 5 figures, 2 tables)

This paper contains 23 sections, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Overview of data leakage and policy violation risks.
  • Figure 2: SafeGPT two-sided guardrail architecture.
  • Figure 3: Illustrative example of SafeGPT intercepting a prompt containing a live API key and guiding the user to sanitize the input before generating debugging assistance.
  • Figure 4: Example of adaptive redaction, where a proprietary project reference is replaced with a placeholder token to prevent IP exposure while preserving task utility.
  • Figure 5: Example of output-side enforcement, where biased language in a generated response is detected and reframed to ensure ethical and policy-compliant content.