AI Frontend Query Clarification and Filtering Against Prompt Attacks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large language model-based chatbots face challenges in accurately interpreting user queries due to inaccurate input requirements, leading to irrelevant responses, and are vulnerable to attacks that exploit their attack surface.
Innovation Solution
An artificial intelligence frontend system with an input filter element that executes an external clarification procedure to refine user queries and includes defense mechanisms against adversarial attacks, such as input transformation and anomaly detection, to enhance query clarity and security.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a large language model-based chatbot directly processes user queries without filtering, then the response speed is fast, but the accuracy of requirement interpretation deteriorates and the system becomes vulnerable to attacks
Solution Approach 1:
The chatbot system is segmented into multiple functional modules: an input frontend with input filter element, a large language model, and an output frontend with output filter element. This segmentation allows the system to maintain security through filtering while preserving the core LLM functionality, resolving the contradiction between security and system complexity.
Solution Approach 2:
The input filter element performs preliminary filtering and clarification of user queries before they reach the large language model. By executing the clarification procedure in advance, the system prevents inaccurate requirement interpretation and potential attacks at the input stage, improving reliability without requiring complex post-processing.
2Measurement precision
If the chatbot uses detailed input clarification procedures, then the accuracy of query interpretation is improved, but the response time increases
Solution Approach 1:
The input filter element performs partial clarification actions by identifying and addressing only the most critical ambiguities in user queries. Rather than exhaustive clarification, the system applies filtering procedures selectively to maintain query interpretation accuracy while minimizing additional response time.
3Reliability
If the chatbot accepts all user inputs without filtering, then the ease of operation is high, but the vulnerability to adversarial attacks increases
Solution Approach 1:
The input filter element acts as an intermediary between the user and the large language model. It automatically filters and clarifies user inputs without requiring users to manually format or validate their queries, thereby maintaining ease of operation while providing security against adversarial attacks through automated filtering procedures.
4Reliability
If the chatbot implements both input and output filtering procedures, then the security against attacks is improved, but the device complexity increases
Solution Approach 1:
The filtering system is segmented into distinct input and output filter elements, each with specific security functions. This segmentation allows the system to implement comprehensive security protection while maintaining modularity, making the complex filtering system easier to manage and maintain without compromising security effectiveness.
Data Source
AI summary
An artificial intelligence frontend system, an artificial intelligence frontend operation method, a computer-readable recording medium with a stored program, and a non-transitory computer program product, where the artificial intelligence frontend operation method includes: executing an external clarification procedure in response to receiving a query by an input frontend to obtain an external clarification query; directing the external clarification query to an input filter element; and executing a filtering procedure by the input frontend on the external clarification query via the input filter element to filter the external clarification query and sending an external clarification query which is filtered to an external chatbot via the input filter element.


