IP Library › Granted Patent US 12,488,134
Granted Patent B2
US 12,488,134 · App. 18/467,167 · Granted Dec 2, 2025

Data security in large language models

Inventors: Suresh Pasumarthi (Bangalore, IN); Shiva Prasad Nayak (Bangalore, IN)
Assignee: SAP SE
G06F21/6227G06F40/295G06F40/40
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,488,134
App. No.
18/467,167
Granted
Dec 2, 2025
Kind
B2
Abstract

Certain aspects of the disclosure concern a computer-implemented method for improved data security in large language models. The method includes receiving a prompt query entered through a user interface, extracting a plurality of named entities from the prompt query and classifying the plurality of named entities into respective entity classes, tagging the plurality of named entities to be security compliant or security noncompliant based on the respective entity classes, and responsive to finding that one or more named entities are tagged to be security noncompliant, generating an alert on the user interface.

Claims (64)

1 . A computer-implemented method for improved data security in large language models, the method comprising:

receiving a prompt query entered through a user interface of a runtime data security check microservice;

extracting, in runtime, using a pre-trained custom named entity recognition (NER) model generated from a domain-specific annotated knowledge base, a plurality of named entities from the prompt query and classifying the plurality of named entities into respective entity classes;

tagging, in runtime, by the runtime data security check microservice, the plurality of named entities to be security compliant or security noncompliant based on the respective entity classes;

determining, in runtime, by the runtime data security check microservice, whether to allow submission of the prompt query to a large language model based on the tagging of the named entities, comprising:

responsive to finding that none of the named entities is tagged to be security noncompliant, submitting the prompt query to the large language model; and

responsive to finding that one or more named entities are tagged to be security noncompliant, generating, in runtime, an alert on the user interface, and rejecting submission of the prompt query to the large language model, or enabling a user to override the tagging of one or more named entities and submit the prompt query to the large language model,

wherein the annotated knowledge base is generated by applying a generic NER tool to extract a first set of named entities from unstructured data included in a text corpus, classifying the first set of named entities into a first set of entity classes, and tagging the first set of entity classes with corresponding security compliance or noncompliance attributes.

2 . The method of claim 1 , further comprising highlighting, in runtime, on the user interface the plurality of named entities extracted from the prompt query.

3 . The method of claim 2 , wherein the highlighting comprises generating a first visual cue for one or more named entities that are tagged to be security noncompliant and generating a second visual cue for remaining named entities that are tagged to be security compliant, the second visual cue being different from the first visual cue.

4 . The method of claim 1 , further comprising:

responsive to finding that none of the named entities is tagged to security noncompliant,

storing the prompt query in a prompt log.

5 . The method of claim 1 , further comprising:

receiving annotations for the one or more named entities that are tagged to be security noncompliant;

and

storing the prompt query and the annotations in a prompt log.

6 . The method of claim 1 , further comprising training the custom NER model using the domain-specific annotated knowledge base.

7 . The method of claim 6 , wherein training the custom NER model comprises:

extracting a second set of named entities from structured data included in the text corpus based on a schema defining fields or attributes of the structured data;

classifying the second set of named entities into a second set of entity classes based on the schema;

tagging the second set of entity classes with flags indicating security compliance or security noncompliance; and

saving the second set of named entities, the second set of entity classes, and the flags in the domain-specific annotated knowledge base.

8 . The method of claim 7 , wherein extracting the first set of named entities from unstructured data and the second set of named entities from structured data is performed periodically according to a predefined schedule, wherein each extraction is limited to text data that has been newly added to the text corpus since a previous extraction of named entities from the text corpus.

9 . The method of claim 7 , wherein extracting the first set of named entities from unstructured data and the second set of named entities from structured data is performed on-demand, wherein each extraction is limited to text data that has been newly added to the text corpus since a previous extraction of named entities from the text corpus.

10 . The method of claim 7 , wherein tagging the first set of entity classes and the second set of entity classes is limited to entity classes that have not been previously saved in the domain-specific annotated knowledge base.

11 . A computing system for improved data security in large language models, the system comprising:

memory;

one or more hardware processors coupled to the memory; and

one or more computer readable storage media storing instructions that, when loaded into the memory, cause the one or more hardware processors to perform operations comprising:

receiving a prompt query entered through a user interface of a runtime data security check microservice;

extracting, in runtime, using a pre-trained custom named entity recognition (NER) model generated from a domain-specific annotated knowledge base, a plurality of named entities from the prompt query and classifying the plurality of named entities into respective entity classes;

tagging, in runtime, by the runtime data security check microservice, the plurality of named entities to be security compliant or security noncompliant based on the respective entity classes;

determining, in runtime, by the runtime data security check microservice, whether to allow submission of the prompt query to a large language model based on the tagging of the named entities, comprising:

responsive to finding that none of the named entities is tagged to be security noncompliant, submitting the prompt query to the large language model; and

responsive to finding that one or more named entities are tagged to be security noncompliant, generating, in runtime, an alert on the user interface, and rejecting submission of the prompt query to the large language model, or enabling a user to override the tagging of one or more named entities and submit the prompt query to the large language model,

wherein the annotated knowledge base is generated by applying a generic NER tool to extract a first set of named entities from unstructured data included in a text corpus, classifying the first set of named entities into a first set of entity classes, and tagging the first set of entity classes with corresponding security compliance or noncompliance attributes.

12 . The system of claim 11 , wherein the operations further comprise highlighting, in runtime, on the user interface the plurality of named entities extracted from the prompt query.

13 . The system of claim 12 , wherein the highlighting comprises generating a first visual cue for one or more named entities that are tagged to be security noncompliant and generating a second visual cue for remaining named entities that are tagged to be security compliant, the second visual cue being different from the first visual cue.

14 . The system of claim 11 , wherein the operations further comprise:

responsive to finding that none of the named entities is tagged to security noncompliant,

storing the prompt query in a prompt log.

15 . The system of claim 11 , wherein the operations further comprise:

receiving annotations for the one or more named entities that are tagged to be security noncompliant;

and

storing the prompt query and the annotations in a prompt log.

16 . The system of claim 11 , wherein the operations further comprise training the custom NER model using the domain-specific annotated knowledge base.

17 . The system of claim 16 , wherein training the custom NER model comprises:

extracting a second set of named entities from structured data included in the text corpus based on a schema defining fields or attributes of the structured data;

classifying the second set of named entities into a second set of entity classes based on the schema;

tagging the second set of entity classes with flags indicating security compliance or security noncompliance; and

saving the second set of named entities, the second set of entity classes, and the flags in the domain-specific annotated knowledge base.

18 . The system of claim 17 , wherein extracting the first set of named entities from unstructured data and the second set of named entities from structured data is performed periodically according to a predefined schedule, wherein each extraction is limited to text data that has been newly added to the text corpus since a previous extraction of named entities from the text corpus.

19 . The system of claim 17 , wherein extracting the first set of named entities from unstructured data and the second set of named entities from structured data is performed on-demand, wherein each extraction is limited to text data that has been newly added to the text corpus since a previous extraction of named entities from the text corpus.

20 . One or more non-transitory computer-readable media having encoded thereon computer-executable instructions causing one or more processors to perform a method for improved data security in large language models, the method comprising:

receiving a prompt query entered through a user interface of a runtime data security check microservice;

extracting, in runtime, using a pre-trained custom named entity recognition (NER) model generated from a domain-specific annotated knowledge base, a plurality of named entities from the prompt query and classifying the plurality of named entities into respective entity classes;

highlighting, in runtime, on the user interface the plurality of named entities extracted from the prompt query;

tagging, in runtime, by the runtime data security check microservice, the plurality of named entities to be security compliant or security noncompliant based on the respective entity classes;

determining, in runtime, by the runtime data security check microservice, whether to allow submission of the prompt query to a large language model based on the tagging of the named entities, comprising:

responsive to finding that none of the named entities is tagged to be security noncompliant, submitting the prompt query to the large language model; and

responsive to finding that one or more named entities are tagged to be security noncompliant, generating, in runtime, an alert on the user interface, and rejecting submission of the prompt query to the large language model, or enabling a user to override the tagging of one or more named entities and submit the prompt query to the large language model,

wherein the annotated knowledge base is generated by applying a generic NER tool to extract a first set of named entities from unstructured data included in a text corpus, classifying the first set of named entities into a first set of entity classes, and tagging the first set of entity classes with corresponding security compliance or noncompliance attributes,

wherein the highlighting comprises generating a first visual cue for one or more named entities that are tagged to be security noncompliant and generating a second visual cue for remaining named entities that are tagged to be security compliant, the second visual cue being different from the first visual cue.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 19, 2023
From: PASUMARTHI, SURESH; NAYAK, SHIVA PRASAD
To: SAP SE
Reel/Frame 064957/0274 →
Continuity (1)
Related Publication 20250094619A1 · Mar 20, 2025
References Cited (9)
US 20210319897A1 · Howard · 2021 [cited by examiner]
US 20210406977A1 · Ramachandran · 2021 [cited by examiner]
US 20220321594A1 · Formicola · 2022 [cited by examiner]
US 20240403416A1 · Sharpe · 2024 [cited by examiner]
US 20250088517A1 · Davraev · 2025 [cited by examiner]
Wikipedia, “Named-entity recognition,” https://en.wikipedia.org/wiki/Named-entity_recognition, 7 pages (accessed Jul. 17, 2023). [cited by applicant]
“spaCy 101: Everything you need to know,” https://spacy.io/usage/spacy-101, 35 pages (accessed Aug. 18, 2023). [cited by applicant]
Oommen, Guiding Large Language Models towards Task-Specific Inference—Prompt Design and Soft Prompts, https://towardsdatascience.com/guiding-a-hugh-language-model-Im-to-perform-specific-tasks-prompt-design-and-soft-prom… [cited by applicant]
Wikipedia, “Large language model,” https://en.wikipedia.org/wiki/Large_language_model, 18 pages (accessed Aug. 18, 2023). [cited by applicant]