Loading
Loading...
Data Intelligence

AI Data Discovery: How LLMs Find PII and PHI in Your Database

By Rudratic Security Research Team  ·  Published March 17, 2026  ·  10 min read

AI data discovery is the automated process of using large language models (LLMs) to scan enterprise database schemas - table names, column names, data types, and surrounding context - and classify which columns contain sensitive data: PII (personally identifiable information), PHI (protected health information), financial data, authentication secrets, or regulated data subject to GDPR, HIPAA, PCI DSS, or CCPA. Unlike regex-based scanners, LLM-driven discovery understands intent from context and finds sensitive data even when column names are cryptic or abbreviated.

GDPR Article 83 allows fines up to €20 million or 4% of global annual revenue - whichever is higher - for organizations that fail to adequately protect personal data. GDPR Article 30 also mandates a Records of Processing Activities (RoPA), which requires knowing exactly where personal data lives. AI discovery is the only scalable way to produce this inventory across large, heterogeneous database estates.

You can't protect what you don't know exists. That single sentence is the entire reason AI data discovery matters. Every enterprise database holds personally identifiable information (PII), protected health information (PHI), financial data, or authentication secrets - and almost no enterprise can produce an accurate, current list of where those data elements actually live.

In this post we'll explain how AI data discovery works, why large language models are dramatically better at this than the regex-based scanners of the last decade, and how a platform like SWOT DAM 3.0 uses an LLM-driven "Data Sentinel" to classify sensitive columns automatically - even when the column names tell you nothing.

The Problem AI Data Discovery Solves

A modern enterprise database can have hundreds of tables and tens of thousands of columns. The schemas are typically the product of decades of organic growth - different teams, different naming conventions, different abbreviation rules, and a lot of legacy. The result is column names like:

A regex scanner looking for email, amount, dob, ssn, or password will miss every single one. Compliance frameworks, data loss prevention, and breach disclosure laws don't care about your naming convention - they apply regardless. The gap between "what your scanner found" and "what's actually sensitive" is where data breaches hide.

What AI Data Discovery Actually Does

An AI data discovery module takes a different approach. Instead of pattern matching on column names, it sends the full schema context - table names, column names, data types, sample data shape - to a large language model and asks it to classify each column.

The LLM understands intent. It knows that USR_EML_V2 is almost certainly an email column because of the surrounding context: it sits in a USERS table, near columns called USR_NM and USR_PHN. It knows that TX_AMT_GROSS in a table called TRANSACTIONS is a financial amount. The model is reading the schema the way a human DBA would.

The result is a structured classification per column:

Each classification comes with a confidence level (high, medium, low) so analysts can prioritize their review.

How It Works End to End

Inside SWOT DAM 3.0, the "Data Sentinel" module runs as a scheduled job - typically every 24 hours. The flow looks like this:

  1. Iterate every active database collector in the platform.
  2. Connect to the target database with read-only metadata permissions.
  3. Extract the schema: table names, column names, data types, sample row count.
  4. Construct a natural language prompt describing the schema.
  5. Send the prompt to the configured LLM (OpenAI, Google Gemini, or a self-hosted Ollama model).
  6. Parse the structured JSON response identifying sensitive columns.
  7. Diff against the previous scan - flag new sensitive columns as discoveries.
  8. Surface findings in the dashboard with a "new since last scan" indicator.

The 24-hour cadence is configurable. The model provider is configurable - which is important for organizations with data sovereignty requirements.

Run AI Data Discovery on your databases

SWOT DAM 3.0 includes the AI-powered Data Sentinel module out of the box - auto-classifying PII, PHI, financial, and authentication columns across Oracle, MSSQL, PostgreSQL, and MySQL.

Explore SWOT DAM 3.0

Why LLM-Based Discovery Beats Regex

Three reasons:

  1. Context. A regex looks at one column name at a time. An LLM sees the entire schema and uses the surrounding columns as evidence for what each column actually contains.
  2. Obfuscation tolerance. A regex pattern for "email" won't match USR_EML_V2. An LLM does.
  3. Maintenance burden. Regex libraries have to be updated as your business evolves. An LLM-driven classifier generalizes.

Data Sovereignty: Why Provider Choice Matters

The biggest objection most security teams raise to AI data discovery is reasonable: "I don't want my database schema to leave my network." This is a legitimate concern in regulated industries - healthcare, finance, government - and the answer is provider flexibility.

SWOT DAM 3.0 supports three different LLM providers:

For organizations where schema metadata cannot leave the network, the Ollama deployment gives you AI data discovery with no external API call at all. The platform is identical; only the model location changes.

What You Do With Discovery Results

Discovery is the input; the value is in what you do downstream.

The Bottom Line

AI data discovery is the inventory layer that the rest of database security depends on. Without it, you're defending against threats to data you can't fully list. With it, every other control - alerting, PAM, DLP, compliance reporting - gets sharper.

If you're running multiple databases and your current data discovery story is "we ran a regex scanner three years ago," you have a gap worth closing. SWOT DAM 3.0 includes AI-powered discovery as standard - and you can run the model locally if your environment requires it. Book a demo with our team to see it on real schemas.

Frequently Asked Questions About AI Data Discovery

What is the difference between AI data discovery and traditional data classification?

Traditional classification uses regex patterns or keyword lists to match column names - finding "email", "ssn", or "dob". AI data discovery uses an LLM to analyze the full schema context: table names, neighboring columns, data types, and naming patterns together. An LLM identifies USR_EML_V2 as an email column because it reads the context - a regex scanner misses it entirely. AI discovery also handles new or legacy abbreviation styles without requiring manual rule updates.

What types of sensitive data can AI discovery classify?

AI data discovery classifies: PII (names, emails, phone numbers, physical addresses, national ID numbers, dates of birth), PHI (patient identifiers, medical record numbers, diagnoses, treatment information, insurance IDs), Financial data (account numbers, transaction amounts, balances, card numbers, routing numbers), Authentication data (password hashes, API keys, tokens, secrets), and Regulated data mapped to specific compliance frameworks - GDPR, HIPAA, PCI DSS scope, CCPA, and others.

Does AI data discovery require sending schema data to a cloud API?

Not necessarily. SWOT DAM 3.0 supports three LLM providers: OpenAI (cloud API), Google Gemini (cloud API), and Ollama (fully self-hosted, local). For organizations where schema metadata cannot leave the network - common in healthcare, government, and defense - the Ollama deployment runs an open-source model entirely inside your own infrastructure. No external API call is made; the analysis stays within your network perimeter. The platform is identical regardless of which provider you configure.

How often should AI data discovery scans run?

Most enterprise deployments run discovery scans on a 24-hour cadence, with the ability to trigger on-demand scans after major schema changes or application deployments. The scan diffs against the previous result and flags only new sensitive columns as discoveries - so even in databases with thousands of tables, the alert surface is focused on what changed rather than requiring a complete re-review every time.

Which compliance frameworks require sensitive data discovery?

GDPR Article 30 (Records of Processing Activities - requires knowing where personal data lives), HIPAA §164.308(a)(1) (Risk Analysis - requires identifying where ePHI is stored), PCI DSS Requirement 3 (protect stored account data - requires knowing where card data is held), CCPA (businesses must know what personal information they collect and where it is stored), and ISO/IEC 27001:2022 (A.5.12 Classification of information) all require an accurate, current data inventory. AI discovery is the only scalable approach for large database estates.

How does AI data discovery integrate with database activity monitoring?

Discovery and DAM are complementary: discovery identifies which columns contain sensitive data; DAM monitors who accesses those columns and alerts on anomalous behavior. In SWOT DAM 3.0, discovery results feed directly into the alerting engine - newly discovered PII columns automatically generate "alert on bulk SELECT" rules, and the PAM risk engine flags any role touching PHI as high-sensitivity for access control. Discovery is the inventory layer; DAM is the continuous monitoring layer that depends on it.

Sources & References

  1. European Parliament. (2016). GDPR - Regulation (EU) 2016/679, Articles 30 and 83. gdpr-info.eu
  2. HHS Office for Civil Rights. HIPAA Security Rule - §164.308(a)(1) Risk Analysis and Risk Management. hhs.gov/hipaa
  3. PCI Security Standards Council. (2022). PCI DSS v4.0 - Requirement 3: Protect Stored Account Data. pcisecuritystandards.org
  4. State of California. (2018). California Consumer Privacy Act (CCPA) - Cal. Civ. Code §1798.100. oag.ca.gov/privacy/ccpa
  5. IBM Security. (2024). Cost of a Data Breach Report 2024. ibm.com/reports/data-breach

- Rudratic Technologies. Related reading: What is DAM?