# US 2025/0384162 A1 · Preserving privacy and security of enterprise data for generative artificial intelligence enabled applications

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0384162 A1
- Document ID: US20250384162A1
- Status: Published application
- Kind: A1
- Application number: 19/207,512
- Filed: 2025-05-14
- Published: 2025-12-18
- Earliest claimed: 2024-06-14
- Assignees: Tata Consultancy Services Limited
- Applicants: Tata Consultancy Services Limited
- Inventors: Sandipan MAITI; Basudeb ACHARYA; Ratnamala MANNA; Anagha Nikhil MEHROTRA; Syed MOIN
- Web page: https://patentgrep.com/patent/US20250384162A1

## CPC

- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06F 21/6254: {by anonymising data, e.g. decorrelating personal data from the owner's identification}
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06N 3/045: Combinations of networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/0475: Generative networks
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 3/094: Adversarial learning
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure herein addresses the problem of data security and privacy by providing a system and method for preserving privacy and security of enterprise data for generative artificial intelligence enabled applications. The system of the present disclosure enables removing all personal identifiable information (PII) and sensitive data by masking them in outgoing data keeping meaning of context and instructions same. A masked output is obtained as a response from external models. The response is further unmasked and an actual output is obtained for an end user. In this way, the system of the present disclosure protects an enterprise data from going out and keeps them secure and confidential. The system of the present disclosure also takes care of prompt injection, checks for truthfulness of the answers based on a given context, checks for malicious code in external model response and performs model scanning for not being compromised.

## Claims

### Claim 1

A processor implemented method, comprising:
receiving, via one or more processors, a plurality of data pertaining to one or more generative artificial intelligence (Gen AI) enabled applications deployed in a network;
preprocessing, via the one or more processors, the plurality of data to obtain a plurality of preprocessed data by performing at least one of: (i) a first set of filtering operations on the plurality of data, and (ii) a masking operation on the plurality of data based on one or more predefined user configurations, wherein the one or more filtering operations comprises (i) a prompt injection detection, (ii) a profanity detection, and (iii) toxicity and bias detection;
inputting, via the one or more processors, the plurality of preprocessed data to at least one of (i) a large language model, and (ii) an artificial intelligence based model, to obtain a masked output generated for the plurality of data, wherein each of the at least one of (i) the large language model, and (ii) the artificial intelligent based model comprises one or more configuration layers;
performing, via the one or more processors, an unmasking operation on the masked output generated for the plurality of data to obtain an actual output corresponding to the plurality of data; and
performing, via the one or more processors, a second set of filtering operations on the actual output corresponding to the plurality of data to obtain a final secured actual output corresponding to the plurality of data, wherein the second set of filtering operations comprises at least one of: (i) a code and a model scanning mechanism (ii) a contextual correctness detection, (iii) a profanity detection, and (iv) toxicity and bias detection.

### Claim 2 (depends on 1)

The processor implemented method of claim 1, wherein the masking operation on the plurality of data is performed by:
tokenizing and classifying the plurality of data into a plurality of classes using a fine-tuned on-premise LLM as a classifier; and
masking a class from the plurality of classes corresponding to the plurality of data in accordance with the one or more predefined user configurations.

### Claim 3 (depends on 1)

The processor implemented method of claim 1, wherein the first set of filtering operations are performed on the plurality of data to disable passing of a plurality of sensitive data through an enterprise network.

### Claim 4 (depends on 1)

The processor implemented method of claim 1, wherein the second set of filtering operations are performed to identify a plurality of non-context based sensitive output data through the enterprise network.

### Claim 5 (depends on 1)

The processor implemented method of claim 1, wherein the first set of filtering operations and the second set of filtering operations ensure preserving privacy and security of the plurality of data.

### Claim 6 (depends on 1)

The processor implemented method of claim 1, wherein the contextual correctness detection is performed based on a contextual correctness score.

### Claim 7

A system comprising
a memory storing instructions;
one or more communication interfaces; and
one or more hardware processors coupled to the memory via the one or more communication interfaces, wherein the one or more hardware processors are configured by the instructions to:
receive a plurality of data pertaining to one or more generative artificial intelligence (Gen AI) enabled applications deployed in a network;
preprocess the plurality of data to obtain a plurality of preprocessed data by performing at least one of: (i) a first set of filtering operations on the plurality of data, and (ii) a masking operation on the plurality of data based on one or more predefined user configurations, wherein the one or more filtering operations comprises (i) a prompt injection detection, (ii) profanity detection, and (iii) toxicity and bias detection;
input the plurality of preprocessed data to at least one of (i) a large language model, and (ii) an artificial intelligence based model, to obtain a masked output generated for the plurality of data, wherein each of the at least one of (i) the large language model, and (ii) the artificial intelligent based model comprises one or more configuration layers;
perform an unmasking operation on the masked output generated for the plurality of data to obtain an actual output corresponding to the plurality of data; and
perform a second set of filtering operations on the actual output corresponding to the plurality of data to obtain a final secured actual output corresponding to the plurality of data, wherein the second set of filtering operations comprises at least one of: (i) a code and a model scanning mechanism (ii) contextual correctness detection, (iii) profanity detection, and (iv) toxicity and bias detection.

### Claim 8 (depends on 7)

The system of claim 7, wherein the masking operation on the plurality of data is performed by:
tokenizing and classifying the plurality of data into a plurality of classes using a fine-tuned on-premise LLM as a classifier; and
masking a class from the plurality of classes corresponding to the plurality of data in accordance with the one or more predefined user configurations.

### Claim 9 (depends on 7)

The system of claim 7, wherein the first set of filtering operations on the plurality of data are performed to disable passing of a plurality of sensitive data through an enterprise network.

### Claim 10 (depends on 7)

The system of claim 7, wherein the second set of filtering operations are performed to identify a plurality of non-context based sensitive output data through the enterprise network.

### Claim 11 (depends on 7)

The system of claim 7, wherein the first set of filtering operations and the second set of filtering operations ensure preserving privacy and security of the plurality of data.

### Claim 12 (depends on 7)

The system of claim 7, wherein the contextual correctness detection is performed based on a contextual correctness score.

### Claim 13

One or more non-transitory machine-readable information storage mediums comprising one or more instructions which when executed by one or more hardware processors cause:
receiving a plurality of data pertaining to one or more generative artificial intelligence (Gen AI) enabled applications deployed in a network;
preprocessing the plurality of data to obtain a plurality of preprocessed data by performing at least one of: (i) a first set of filtering operations on the plurality of data, and (ii) a masking operation on the plurality of data based on one or more predefined user configurations, wherein the one or more filtering operations comprises (i) a prompt injection detection, (ii) a profanity detection, and (iii) toxicity and bias detection;
inputting the plurality of preprocessed data to at least one of (i) a large language model, and (ii) an artificial intelligence based model, to obtain a masked output generated for the plurality of data, wherein each of the at least one of (i) the large language model, and (ii) the artificial intelligent based model comprises one or more configuration layers;
performing an unmasking operation on the masked output generated for the plurality of data to obtain an actual output corresponding to the plurality of data; and
performing a second set of filtering operations on the actual output corresponding to the plurality of data to obtain a final secured actual output corresponding to the plurality of data, wherein the second set of filtering operations comprises at least one of: (i) a code and a model scanning mechanism (ii) a contextual correctness detection, (iii) a profanity detection, and (iv) toxicity and bias detection.

### Claim 14 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the masking operation on the plurality of data is performed by:
tokenizing and classifying the plurality of data into a plurality of classes using a fine-tuned on-premise LLM as a classifier; and
masking a class from the plurality of classes corresponding to the plurality of data in accordance with the one or more predefined user configurations.

### Claim 15 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the first set of filtering operations are performed on the plurality of data to disable passing of a plurality of sensitive data through an enterprise network.

### Claim 16 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the second set of filtering operations are performed to identify a plurality of non-context based sensitive output data through the enterprise network.

### Claim 17 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the first set of filtering operations and the second set of filtering operations ensure preserving privacy and security of the plurality of data.

### Claim 18 (depends on 13)

The one or more non-transitory machine-readable information storage mediums of claim 13, wherein the contextual correctness detection is performed based on a contextual correctness score.
