LLM Query Manager for Real-Time Confidential Prompt Leakage Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large language models (LLMs) are vulnerable to prompt recovery attacks, which expose confidential information, and existing methods are inadequate for real-time detection and prevention of such leaks due to the vast number of queries and varied phrasing possibilities.
Innovation Solution
Implementing an LLM query manager with an LLM firewall that logs confidential information, compares LLM responses against this information, and sets a leakage detection signal to block responses containing sensitive data, using techniques like string matching algorithms to identify overlaps.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If human review of individual user queries is performed, then detection accuracy of prompt recovery attacks is improved, but processing speed and productivity deteriorate due to the large number of queries
Solution Approach 1:
The patent replaces manual human review with an automated machine learning model that analyzes queries and responses for prompt recovery attacks. The system uses trained models to detect patterns and similarities between user queries and confidential instructions, enabling high-speed automated detection without sacrificing accuracy.
Solution Approach 2:
The patent introduces an intermediary detection system that sits between the user query and the LLM response. This intermediary layer analyzes the interaction to detect prompt recovery attempts, allowing automated detection while maintaining the ability to identify subtle attack patterns that would be difficult to catch with simple rule-based systems.
2Reliability
If blocking attacks prior to reaching the LLM is implemented, then security is improved, but feasibility deteriorates due to the number of different ways users can phrase prompt recovery attacks
Solution Approach 1:
The patent performs preliminary analysis of the user query and LLM response pair to detect prompt recovery attacks. By analyzing the interaction after the LLM responds but before the response is returned to the user, the system can identify attacks that attempt to extract confidential instructions without requiring complex pre-filtering of all possible attack variations.
Solution Approach 2:
The patent uses feedback from the LLM response to detect prompt recovery attacks. The system compares the user query with the LLM response to identify suspicious patterns where the response may be leaking confidential instructions. This feedback mechanism enables the detection of diverse attack phrasings without requiring explicit knowledge of each attack variant.
3Ease of operation
If context information and instructions are added to queries, then LLM response quality is improved, but security deteriorates due to potential leakage of confidential information
Solution Approach 1:
The patent uses feedback analysis to detect when confidential context information or instructions are inadvertently leaked in the LLM response. By comparing the user query with the LLM response and analyzing for suspicious patterns, the system can identify when added context or instructions have been exposed, allowing the system to maintain high-quality responses while monitoring for security issues.
Data Source
AI summary
A method includes receiving, at a server from a user device, a user query to a large language model (LLM), creating an LLM query from the user query and an application context, gathering confidential information from the LLM query, and sending the LLM query to the LLM. The method includes receiving, from the LLM, an LLM response to the LLM query, comparing the LLM response to the confidential information to generate comparison result, and setting a leakage detection signal based on comparison result.


