AI Prompt Normalization and Masking for Privacy-Safe Task Learning
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Developers of AI applications face challenges in understanding user interactions without compromising user privacy, as sensitive data in user prompts hinders the development of tailored features.
Innovation Solution
A privacy-preserving analysis pipeline using a large language model (LLM) within a secure computing environment transforms user prompts into normalized formats, applies differential privacy techniques, and generates privacy-preserving summaries of user interactions, which are then aggregated and analyzed to provide insights to developers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If user prompts are made accessible for developer analysis, then understanding of user interactions improves, but user privacy is compromised due to sensitive data exposure
Solution Approach 1:
The patent extracts sensitive information from user prompts through multiple processing stages: first extracting n-grams, then creating masked versions that replace specific entities with placeholders, and finally extracting additional n-grams from the masked prompts. This systematic extraction removes personally identifiable information while preserving interaction patterns for analysis.
Solution Approach 2:
The patent introduces an intermediary processing pipeline between the original user prompts and the analysis output. This pipeline includes normalization, entity masking, and differential privacy mechanisms that act as mediators to transform sensitive data into anonymized insights, allowing analysis without direct exposure of original prompts.
2Object-affected harmful factors
If user prompts are anonymized and made available for analysis, then user privacy is protected, but the quality and detail of insights deteriorate
Solution Approach 1:
The patent segments the analysis process into multiple distinct stages: initial n-gram extraction from normalized prompts, masking of specific entities, second n-gram extraction from masked prompts, and aggregation. This segmentation allows different levels of detail to be captured at different stages, preserving both broad patterns and specific insights while maintaining privacy.
Solution Approach 2:
The patent applies partial anonymization by selectively masking certain entities while preserving others, and performs multiple rounds of n-gram extraction to capture both high-level and detailed interaction patterns. This partial action approach maintains sufficient detail for meaningful analysis while applying just enough anonymization to protect privacy.
3Object-affected harmful factors
If multiple rounds of n-gram extraction and masking are performed, then privacy preservation improves, but processing complexity increases
Solution Approach 1:
The patent performs preliminary normalization of user prompts into a standardized format before extraction, and pre-defines masking rules for different entity types. This preliminary action simplifies subsequent processing rounds by establishing consistent patterns early, reducing the complexity of multiple extraction and masking iterations.
Data Source
AI summary
A data processing system implements obtaining user prompts s that include instructions to an AI application to perform one or more tasks; storing the user prompts in a prompts datastore in a secure computing environment; analyzing the user prompts using an LLM operating within the secure computing environment to generate normalized prompts based on the user prompts; extracting first n-grams from the normalized prompts using differentially private n-gram extraction that preserves user-level privacy; generating masked normalized prompts by comparing the normalized prompts with the first n-grams and replacing, with a placeholder n-gram, n-grams of the normalized prompts that do not match an n-gram of the first n-grams; extracting second n-grams from the masked normalized prompts using the differentially private n-gram extraction that preserves user-level privacy; outputting the second n-grams from the secure computing environment; and storing the second n-grams in an anonymized prompts datastore outside of the secure computing environment.


