TechByteByByte

Data Leakage

Sensitive data ending up somewhere it shouldn't — and the real, documented case of Samsung engineers accidentally handing their own confidential source code to OpenAI, three times, in under a month.

#data-leakage#samsung#privacy#responsible-ai-phase

The Data Poisoning article covered malicious data going deliberately into a model. This article covers the reverse concern — sensitive data unintentionally coming out, or ending up somewhere it was never supposed to be: data leakage.

The simple definition

Data leakage refers to sensitive or confidential information becoming exposed through an AI system, either by a model memorizing and later reproducing training data it shouldn’t, or by users themselves unintentionally sharing private information with a system that retains it. Recall from the Overfitting article’s discussion, back in the Generalization phase, of a model memorizing specific training examples rather than learning general patterns.

Data leakage is closely related — a model that has memorized specific sensitive details from its training data can, under the right prompting, reproduce them, but the more common, everyday version of this problem doesn’t even require memorization at all.

Why the everyday version of this problem is often the more urgent one

Recall from the API and product documentation covered throughout this glossary’s discussion of how services like ChatGPT actually work. Many AI products, by default, retain user conversations, sometimes using them for further training or human review — meaning anything a user types, including genuinely confidential information, can end up stored on a company’s servers, reviewed by human trainers, or even absorbed into a future model’s training data. This doesn’t require any malicious attack at all — it’s simply what happens when confidential information is typed into a system not designed to keep it fully private.

flowchart LR
    A[Employee pastes confidential code into an AI chatbot to get help] --> B[Chatbot provider retains the conversation]
    B --> C[Data may be reviewed by human trainers or used in future training]
    C --> D[Confidential information is now outside the company's control]

The real story: Samsung’s own engineers leaked their own secrets, three times

This deserves to be told in full, because it’s a genuine, widely reported, and remarkably concrete illustration of exactly this everyday risk. In April 2023, Samsung Electronics’ semiconductor division permitted its engineers to use ChatGPT to help troubleshoot technical problems.

Within less than a month, three separate, documented incidents occurred: one engineer pasted the actual, confidential source code of a program used to identify defective chip-manufacturing equipment directly into ChatGPT and asked it to find and fix an error; another engineer uploaded code designed to identify faulty equipment and asked for optimization help; a third employee shared an entire internal meeting recording, asking ChatGPT to convert it into presentation notes.

Because ChatGPT’s own privacy policy explicitly stated that user conversations “may be reviewed by our AI trainers to improve our systems,” Samsung’s proprietary source code and confidential meeting content had, in a very real, documented sense, left the company’s control the moment it was typed in — with no technical way to recall or delete it afterward.

Samsung responded by limiting employee prompts to 1,024 bytes, and ultimately banned employee use of generative AI tools entirely, a policy other major companies — including Amazon, JPMorgan, and Goldman Sachs — soon adopted in some form as well.

ANALOGY vs. TECHNICAL REALITY

Analogy: Think of an employee asking a knowledgeable outside consultant for help debugging a problem, and, in the course of explaining the issue clearly, accidentally reading aloud the company’s actual, confidential formula or trade secret — the consultant genuinely didn’t ask for it, and may not even have wanted it, but once it’s been said aloud to someone outside the company, it can’t be un-said.

Where this breaks down: A human consultant is bound by professional norms, and often a formal confidentiality agreement, about what they do with information they weren’t supposed to receive.

An AI chatbot has no comparable, enforceable obligation by default — recall from the Guardrails article’s discussion of practical, deployed safeguards — unless a company has specifically negotiated an enterprise agreement with stronger data-handling guarantees, ordinary user input is genuinely, contractually eligible to be retained and reviewed, exactly as Samsung’s engineers discovered.

A concrete example, layered

For a simple beginner example: a student pasting their unpublished, original research draft into a free AI writing tool to get feedback is taking on a genuine, if often overlooked, risk that their draft’s specific content could be retained and potentially surface in some form in the tool’s future outputs.

For a production example: the Samsung case, referenced throughout this article, directly triggered a broader, real, industry-wide shift — many companies now offer or require employees to use enterprise-tier AI products specifically negotiated with contractual guarantees that customer data won’t be used for further model training, a direct, structural response to exactly the risk Samsung’s incidents made concrete.

How OpenAI itself responded, concretely

It’s worth naming the specific, real product changes that followed, since OpenAI’s response is a genuine, documented case of a company redesigning its product in direct reaction to this exact failure mode. Within weeks of the Samsung reporting, OpenAI added a “Data Controls” toggle letting any user turn off chat history and model training entirely, and announced a new ChatGPT Business tier that, like its existing API, would not train on customer conversations by default.

The trade-off was real and disclosed upfront: turning off training also disabled chat history, forcing users to choose between convenience and privacy rather than getting both automatically. Anthropic took a stricter default position from the outset, committing not to train on user conversations across its products except in narrow, specifically disclosed cases (safety review, explicit user reports, or explicit opt-in) — two genuinely different resolutions to the same underlying problem, reflecting different default trade-offs between product convenience and data privacy.

Why this connects directly to the RAG & Retrieval phase’s own concerns

It’s worth tying this back explicitly, since it’s a genuine, related risk covered earlier in this glossary. Recall from the Knowledge Base article’s discussion of building a company-specific RAG system — if a company’s knowledge base itself contains sensitive or improperly access-controlled documents, a retrieval system built on top of it can inadvertently leak that content to users who query for it, a structurally similar data leakage risk operating through a different mechanism than the Samsung case’s direct chatbot input.

“Data leakage” has three common meanings

The surrounding conversation determines which meaning is intended:

  1. Machine-learning evaluation leakage: information from the validation or test period accidentally enters training.
  2. Privacy leakage: a model or application reveals sensitive training, prompt, account, or retrieved data.
  3. Operational leakage: private information is copied into a service, log, analytics system, URL, or tool call that should not receive it.

A numerical training example

Suppose a hospital predicts whether a patient will be readmitted. A feature called follow_up_call_completed is recorded only after the patient leaves. If that future information appears in training, test accuracy may look like 98%. In real use, the value does not exist when the prediction must be made, so performance may fall sharply.

Correct timeline: information available now -> prediction -> future outcome
Leaky timeline:   future outcome information ----^ enters the features

The model did not become intelligent. It was accidentally given part of the answer.

How leakage can happen in GPT or Gemini applications

A user may paste a secret into a prompt. A RAG retriever may fetch a document the user is not authorized to see. An agent may place a secret in a tool argument or URL. A logging system may store complete conversations longer than intended. Useful defenses include permission checks before retrieval, secret detection, data minimization, redaction, short retention, encrypted storage, separated tenant indexes, output checks, and audit logs. The application must enforce these controls outside the language model; asking the model to “please keep this secret” is not an access-control system.

Data leakage is different from hallucination

A hallucination invents unsupported information. Leakage exposes information that is real but should not have been available or revealed. A single response can contain either problem, so teams test factual grounding and privacy separately.

Common misconception

Hold the idea in your head

Ask two questions whenever information moves through an AI application:

  1. Was the system allowed to read this information?
  2. Was the system allowed to reveal it to this person or service?
Private document -> permission check -> retrieval -> model -> output check -> user

A missing check anywhere in that path can cause leakage. The model provider’s privacy controls matter, but the application developer must also protect databases, vector stores, logs, tool calls, and user accounts.

Simple rule: access must be checked before data enters the prompt, not only after the model writes an answer.

A frequent beginner assumption: that data leakage specifically requires a sophisticated hacking attack or a malicious insider deliberately trying to steal information. As the Samsung case directly demonstrates, this isn’t accurate — every documented incident involved well-intentioned engineers simply trying to get help with their actual jobs, with no malicious intent whatsoever; the leakage happened purely because of how the underlying AI product’s data-retention policy worked, not because of any deliberate wrongdoing.

Where this fits in what comes next

You now understand both directions data can leak — memorized training data surfacing unexpectedly, and users’ own input ending up somewhere it shouldn’t. The next article, Model Poisoning, returns to a deliberate, malicious attack — but this time targeting the model itself directly, rather than the data it trains on or the data it might leak.

In one sentence

Data leakage happens when sensitive information becomes exposed through an AI system, whether through a model’s own memorization or through users’ input being retained by a service that wasn’t designed to keep it fully private, and Samsung’s own real, documented 2023 incident — three separate confidentiality breaches by well-meaning engineers within a single month — remains the standard, widely cited real-world reference point for exactly this risk.

Verified sources

Author
TechByteByByte Editorial Team
Reviewed by
TechByteByByte Admin
Published
Last reviewed