LLM API Security Proxy for Prompt Injection and Data Leak Screening
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large Language Models (LLMs) face significant security challenges due to vulnerabilities in their APIs, including sensitive data leaks, prompt injection attacks, data poisoning, insecure output handling, denial-of-service attacks, permission issues, and excessive agency, which threaten the integrity and reliability of the data they process and generate.
Innovation Solution
Implement a system that utilizes a security LLM to generate feature vectors representing API calls, detect security threats, and determine security policies to be applied by a security proxy, incorporating data sanitization, access control, and ongoing vulnerability testing to safeguard LLMs against these attacks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If LLMs are accessed through publicly available APIs, then the models can provide immense value across various sectors, but the models become vulnerable to security threats such as data leaks, prompt injection attacks, and denial-of-service attacks
Solution Approach 1:
The patent introduces a security proxy as an intermediary component between external API calls and the LLM. This proxy acts as a mediator that screens and filters incoming API requests before they reach the LLM, blocking malicious inputs while allowing legitimate requests to pass through. The security proxy thus enables the LLM to remain accessible through public APIs while protecting it from security threats.
Solution Approach 2:
The system performs preliminary security screening of API calls before they are processed by the LLM. By generating feature vectors from API call data and using a security LLM to detect potential threats in advance, the system proactively identifies and blocks malicious requests before they can compromise the LLM, thus preventing security incidents rather than reacting to them.
2Reliability
If security systems are employed to counteract threats, then the security posture improves, but the complexity of the system increases
Solution Approach 1:
The security system is segmented into distinct functional components: a security proxy for initial filtering, feature vector generation for data representation, a security LLM for threat detection, and a security policy determination module for decision-making. This segmentation allows each component to perform its specific function independently, making the overall security system more manageable and maintainable while providing comprehensive protection.
3Adaptability or versatility
If the number of APIs increases to support more services, then the functionality expands, but the difficulty of detecting and measuring security threats increases
Solution Approach 1:
The system transforms the complex, unstructured data from diverse API calls into standardized feature vectors that capture essential characteristics of each request. By changing the representation parameters of API call data into a uniform numerical format, the security LLM can efficiently detect patterns and threats across different API types without being overwhelmed by the diversity and volume of incoming requests.
Data Source
AI summary
Various embodiments include a system. The system comprises processing circuitry. The processing circuitry obtains an Application Programming Interface (API) call that is associated with a Large Language Model (LLM). The processing circuitry generates a feature vector that numerically represents data included in the API call associated with the LLM. The processing circuitry provides the feature vector to a security LLM trained to detect security threats to the LLM. The processing circuitry obtains an output from the security LLM that indicates a security threat to the LLM. The processing circuitry determines a security policy based on the security threat. The processing circuitry provides the security policy to a security proxy that screens the API call.


