本文へ移動
cccskills
無料GitHub で公開

llm-output-privacy-risk

Assessing privacy risks in large language model outputs including training data memorisation, PII leakage in generated text, prompt injection leading to data extraction, and hallucinated personal data. Covers output filtering, guardrails, and monitoring. Keywords: LLM privacy, output risk, memorisation, PII leakage, prompt injection, hallucinated PII.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md10.7 KB
  • assets/template.md2.0 KB
  • references/standards.md4.0 KB
  • references/workflows.md5.5 KB
  • scripts/process.py16.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

LLM Output Privacy Risk Assessment

Overview

Large language models (LLMs) present unique privacy risks that go beyond traditional ML systems. Because LLMs are trained on massive corpora that may contain personal data, they can memorise and reproduce verbatim training data — including names, email addresses, phone numbers, and other PII. Additionally, LLMs can hallucinate plausible but false personal data, creating defamation and accuracy risks. Prompt injection attacks can bypass safety guardrails to extract training data or system prompts containing confidential information. This skill provides a structured framework for assessing, mitigating, and monitoring privacy risks in LLM-generated outputs at Cerebrum AI Labs.

LLM Output Privacy Risk Categories

Risk 1: Training Data Memorisation

LLMs memorise training data, particularly sequences that appear multiple times or are distinctive. Extractable memorisation occurs when a model, given a prefix, completes the text with verbatim training data.

FactorImpact on Memorisation Risk
Model sizeLarger models memorise more (Carlini et al., 2023)
Data duplicationRepeated sequences are memorised at higher rates
Training epochsMore passes over data increase memorisation
Data distinctivenessUnique sequences (names, numbers) are more extractable
Temperature at inferenceLower temperature increases verbatim reproduction

Regulatory concern: If a model reproduces personal data from training, this constitutes processing under GDPR Art. 4(2). The data subject has not consented to this output, and the controller must have a lawful basis for the disclosure.

Risk 2: PII Leakage in Generated Text

Even without verbatim memorisation, models can combine partial information to produce outputs containing personal data — email patterns, phone number formats with real area codes, or names associated with specific contexts.

Leakage TypeExampleDetection Method
Verbatim reproductionModel outputs exact email address from training dataExact match against known training PII
RecombinationModel combines real first name + real surname from different recordsNamed entity recognition + cross-reference
Pattern completionModel generates plausible phone number matching real formatRegex + validation against real registries
Contextual leakageModel associates real person with correct employer when promptedEntity relationship extraction

Risk 3: Prompt Injection and Data Extraction

Adversarial prompts can cause models to bypass safety instructions and output training data, system prompts, or information about other users' conversations.

Attack VectorDescriptionMitigation
Direct prompt injectionUser crafts prompt to extract training data ("Repeat your training data starting with...")Input filtering + output monitoring
Indirect prompt injectionMalicious content in retrieved documents instructs model to leak dataSanitise retrieved content + instruction hierarchy
System prompt extractionPrompts designed to reveal system-level instructionsSystem prompt isolation + extraction detection
Multi-turn extractionGradual extraction across conversation turnsConversation-level monitoring
JailbreakingBypassing safety alignment to disable PII filtersRobust alignment + secondary output filter

Risk 4: Hallucinated Personal Data

LLMs can generate plausible but fabricated personal data — attributing false statements to real people, inventing credentials, or creating fictional but realistic-seeming personal records.

Hallucination TypePrivacy RiskLegal Concern
False attributionModel attributes a statement to a real person who never said itDefamation, Art. 5(1)(d) accuracy principle
Fabricated credentialsModel invents qualifications for a real personAccuracy, potential reputational harm
Fictional PIIModel generates realistic but fake personal details (e.g., social security numbers)May match real individuals by coincidence
Confabulated relationshipsModel invents relationships between real peopleArt. 5(1)(d) accuracy, potential harm

EDPB position: EDPB Guidelines 04/2025 state that generating inaccurate personal data about identifiable individuals violates the accuracy principle (Art. 5(1)(d)) and may require the controller to implement effective rectification mechanisms.

Output Privacy Risk Assessment Framework

Assessment Dimensions

DimensionWeightScoring Criteria
Memorisation exposure25%Model size, training data PII density, deduplication status
PII leakage likelihood25%Output modality, user interaction pattern, PII filter coverage
Prompt injection resilience20%Input validation, instruction hierarchy, extraction testing results
Hallucination risk15%Factual grounding, attribution verification, entity linking
Monitoring coverage15%Real-time PII detection, logging, alerting, human review

Risk Scoring

Score RangeRisk LevelAction Required
0-20LowStandard monitoring; annual review
21-40ModerateEnhanced PII filtering; quarterly review
41-60ElevatedMandatory output scanning; human review for sensitive queries
61-80HighRestrict deployment scope; implement guardrails before production
81-100CriticalDo not deploy; fundamental architecture changes required

Mitigation Measures

Pre-Deployment Mitigations

MeasureDescriptionEffectiveness
Training data deduplicationRemove duplicate sequences to reduce memorisationHigh for verbatim memorisation
PII scrubbing of training dataDetect and remove/mask PII before trainingHigh but incomplete (novel PII patterns missed)
Differential privacy trainingTrain with DP-SGD to bound memorisationHigh theoretical guarantee; accuracy trade-off
RLHF safety alignmentTrain model to refuse PII-generating requestsModerate; can be bypassed by jailbreaking
Instruction tuningFine-tune model to follow safety instructionsModerate; requires robust instruction hierarchy

Runtime Mitigations

MeasureDescriptionEffectiveness
Output PII scannerNER-based scanner detecting PII in outputs before deliveryHigh for known PII patterns
Regex PII filterPattern matching for emails, phones, SSNs, credit cardsHigh for structured PII
Input prompt classifierClassify incoming prompts for injection/extraction attemptsModerate; adversarial prompts evolve
Retrieval groundingGround outputs in retrieved documents to reduce hallucinationModerate; depends on retrieval quality
Rate limitingLimit query volume to slow extraction attacksLow-moderate; raises cost of attack
Conversation monitoringAnalyse multi-turn conversations for progressive extractionModerate; complex to implement

Post-Deployment Monitoring

MonitorMetricAlert Threshold
PII detection rate% of outputs flagged by PII scanner>0.1% of outputs in any 1-hour window
Prompt injection detection% of inputs classified as injection attempts>0.5% of inputs in any 1-hour window
User reports of PII exposureCount of user-reported PII incidentsAny confirmed report
Extraction pattern detectionRepeated similar queries from same user/IP>10 similar extraction-pattern queries per session
Hallucination complaintsReports of false personal informationAny confirmed report about real individuals

Cerebrum AI Labs — LLM Output Privacy Controls

Architecture

User Input → Input Filter → LLM → Output PII Scanner → Delivery
                │                         │
                ▼                         ▼
         Prompt Injection          PII Detected?
         Classifier                  │
                │                YES → Redact + Log + Alert
             Block/Allow         NO  → Deliver + Log

PII Detection Categories for Output Scanning

PII TypeDetection MethodAction on Detection
Email addressesRegex + validationRedact and log
Phone numbersRegex + country format validationRedact and log
National ID numbersCountry-specific regex patternsBlock output + alert
Credit card numbersLuhn algorithm + regexBlock output + alert
Physical addressesNER + geocoding validationRedact and log
Person names + contextNER + co-occurrence with other PIIFlag for review
Medical informationMedical NER + PHI patternsBlock output + alert

Enforcement Relevance

  • EDPB Guidelines 04/2025: Controllers deploying LLMs must assess memorisation risk and implement measures to prevent unlawful disclosure of personal data in outputs.
  • Garante v. OpenAI (2023): Italian DPA ordered temporary ban partly due to lack of age verification and data accuracy concerns in ChatGPT outputs. Required implementation of output filtering.
  • EDPB ChatGPT Taskforce Report (2024): Recommended that LLM providers implement technical measures to minimise inaccurate personal data in outputs and provide effective rectification mechanisms.
  • CNIL AI Action Plan (2024): French DPA guidance emphasises that LLM outputs containing personal data constitute processing, requiring lawful basis and compliance with data quality principles.

Integration Points

  • ai-model-privacy-audit: Memorisation testing is part of the model privacy audit
  • ai-data-subject-rights: Rectification of hallucinated data, erasure requests
  • ai-transparency-reqs: Disclosure that system is AI-generated, accuracy limitations
  • ai-deployment-checklist: Output privacy controls verified before deployment

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Implements 42 CFR Part 2 protections for substance use disorder patient records. Covers written consent requirements stricter than HIPAA, re-disclosure prohibition, court order procedures, qualified service organization agreements, and 2024 amendments aligning Part 2 with HIPAA. Keywords: 42 CFR Part 2, substance use disorder, SUD records, re-disclosure, consent, Part 2 amendments.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Guides assessment of third-country adequacy decisions under GDPR Article 45 for international data transfers. Covers the current EC adequacy decisions list, adequacy assessment criteria, partial adequacy handling, and monitoring of adequacy decision reviews. Keywords: adequacy decision, Article 45, third country, adequate protection, EC adequacy list.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Implements age-gating mechanisms for online services to restrict access based on user age. Covers hard gates versus soft gates, neutral age prompts, re-verification triggers, circumvention prevention, and regulatory requirements under GDPR, COPPA, UK Online Safety Act, and DSA. Keywords: age gate, age restriction, neutral prompt, children, online services, access control.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Evaluates and implements age estimation and verification technologies for online services. Covers facial age estimation, digital ID verification, self-declaration with risk assessment, AI-based age estimation, and the accuracy versus privacy tradeoff. Includes ICO guidance and euCONSENT framework. Keywords: age verification, age estimation, facial analysis, digital ID, children, online safety.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Preparing EU AI Act compliance documentation for high-risk AI systems. Covers Annex III classification, technical documentation under Art. 11, conformity assessment, risk management systems, and CE marking requirements. Keywords: EU AI Act, high-risk AI, Annex III, conformity assessment, CE marking.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

Implements GDPR Art. 22 automated decision-making and AI Act Art. 14 human oversight requirements for AI systems. Covers identification of solely automated decisions, meaningful human intervention design, logic explanation mechanisms, and contestation procedures. Keywords: Art. 22, automated decision, human oversight, AI Act, profiling, contestation.

日本語の概要は準備中です。原文の説明を表示しています。

mukul975/Privacy-Data-Protection-Skills3032026年3月17日 更新

mukul975 のスキルをすべて見る

このスキルの問題を報告する