Llm Output Privacy Risk logo

Llm Output Privacy Risk

Community
mukul975
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.

Overview

Publishermukul975
RepositoryPrivacy-Data-Protection-Skills
Skill namellm-output-privacy-risk
Stars
279
Forks
59
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mukul975 on GitHub. Read the source before you install it.

Installation

Install the Llm Output Privacy Risk AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git /tmp/Privacy-Data-Protection-Skills
mkdir -p .claude/skills
cp -r /tmp/Privacy-Data-Protection-Skills/plugins/ai-privacy-governance-skills/skills/llm-output-privacy-risk .claude/skills/llm-output-privacy-risk
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Llm Output Privacy Risk in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Llm Output Privacy Risk on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Llm Output Privacy Risk is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Llm Output Privacy Risk AI skill do?

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.

Why use Llm Output Privacy Risk on TypingMind?

Because you install it once and use it with any model. Llm Output Privacy Risk is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Llm Output Privacy Risk in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mukul975/Privacy-Data-Protection-Skills/tree/main/plugins/ai-privacy-governance-skills/skills/llm-output-privacy-risk. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Llm Output Privacy Risk?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Llm Output Privacy Risk?

As many as you like. As long as a model supports skills, you can use Llm Output Privacy Risk with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Llm Output Privacy Risk AI skill free?

Yes. It is published on GitHub by mukul975 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇