Information processing systems and programs
The system identifies and prevents prompt injection attacks by sending a confirmation prompt with fixed content to a generative AI system, ensuring reliable detection and sanitization of user prompts, addressing the limitations of pre-set conditions in existing systems.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2026-03-25
AI Technical Summary
Existing information processing systems struggle to reliably identify and prevent prompt injection attacks, where a user inputs instructions to cause abnormal operations in generative AI systems, as pre-set conditions may not suffice against evolving attack methods.
An information processing system that sends a user prompt along with a confirmation prompt to a generative AI system, acquiring response data to determine if the user prompt contains abnormal operation instructions, using control means to sanitize the prompt if necessary, and ensuring the confirmation prompt outputs fixed content and format regardless of the user prompt's content.
This approach allows for quick, reliable identification and prevention of prompt injection attacks by ensuring the confirmation prompt's fixed content and format, enabling efficient and accurate determination of abnormal operation instructions.
Smart Images

Figure 0007835419000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an information processing system and a program for determining whether a user prompt obtained from a user includes an instruction to cause an abnormal operation.
Background Art
[0002] In recent years, a service for generating a sentence in an interactive format with a user has been provided by a generative AI system using a large language model (LLM). The generative AI system generates and outputs a sentence as a response by inputting a prompt that is text data. Further, an information processing system is known which obtains a user prompt from a user, transmits it together with a system prompt for obtaining a response conforming to a specific purpose from the generative AI system, and obtains AI output information and presents it to the user. By using such an information processing system, for example, the generative AI system can be utilized in accordance with the user's purpose such as obtaining a response conforming to the business content or obtaining an appropriate response by referring to the data accumulated in the company.
[0003] In such an information processing system, a user prompt input by a user may include an instruction sentence for instructing an abnormal operation to the generative AI system. What kind of response is to be given to the generative AI system is defined by the system prompt, and the user is configured to be able to exchange information with the generative AI system within the framework defined by the system prompt. However, a prompt injection attack is known in which a user causes the generative AI system to perform an operation different from the intention of the service provider of the information processing system by including an instruction to invalidate the system prompt in the user prompt. Also known as a type of prompt injection attack is a prompt leak that extracts internal information or confidential information of the generative AI system itself from the generative AI system.
[0004] As a means of preventing prompt injection in information processing systems, it is known, for example, to evaluate whether the information processing system is attempting prompt injection before sending the input user prompt to the generation AI system, as described in Patent Document 1. [Prior art documents] [Patent Documents]
[0005] [Patent Document 1] Japanese Patent Publication No. 2025-67282 [Overview of the project] [Problems that the invention aims to solve]
[0006] To evaluate whether an information processing system is attempting prompt injection, it is necessary to determine whether the user prompt meets certain pre-set conditions. For example, if a user prompt contains a specific keyword, it can be determined that the user prompt has the intent of prompt injection. However, prompt injection is not limited to known methods, and new techniques may be developed, so relying on pre-set conditions to identify user prompts may not be sufficient to prevent it.
[0007] This invention has been made in view of the above-mentioned problems, and aims to provide an information processing system and program that can reliably identify user prompts that include instructions causing abnormal operation. [Means for solving the problem]
[0008] To solve the aforementioned problems, the information processing system according to the present invention is an information processing system that transmits a user prompt input by a user to a generating AI system together with a system prompt and acquires response data, and comprises control means and storage means, wherein the control means includes a prompt acquisition unit that acquires the user prompt from the user, a prompt confirmation unit that transmits the user prompt acquired by the prompt acquisition unit together with a confirmation prompt for determining whether the user prompt contains an instruction for abnormal operation to the generating AI system and acquires confirmation response data, a prompt determination unit that determines whether the user prompt contains an instruction for abnormal operation based on the confirmation response data acquired by the prompt confirmation unit, and a user prompt processing unit that, if the prompt determination unit determines that the user prompt does not contain an instruction for abnormal operation, transmits the user prompt together with the system prompt to the generating AI system and acquires response data, and if the prompt determination unit determines that the user prompt contains an instruction for abnormal operation, performs certain processing on the user prompt, wherein the confirmation prompt transmitted by the prompt confirmation unit to the generating AI system instructs the system to output data of a certain content and format regardless of the content of the user prompt. The prompt confirmation unit sends the confirmation prompt to the generation AI system multiple times and obtains corresponding confirmation response data for each. The prompt determination unit, all The aforementioned confirmation response data handle Whether the user prompt contains instructions for abnormal operation is determined by whether the data has a specific content and format as instructed in the confirmation prompt.
[0009] Furthermore, in the information processing system according to the present invention, the confirmation prompt transmitted by the prompt confirmation unit to the generation AI system may instruct the system to output the string contained in the confirmation prompt in its original form, regardless of the content of the user prompt.
[0010] Furthermore, in the information processing system according to the present invention, the confirmation prompt transmitted by the prompt confirmation unit to the generation AI system may include a random string or a hash value.
[0011] Furthermore, in the information processing system according to the present invention, the confirmation prompt that the prompt confirmation unit transmits to the generation AI system may instruct the system to output data described in JSON (JavaScript Object Notation).
[0012] Furthermore, in the information processing system according to the present invention, the user prompt processing unit may perform sanitizing of the user prompt if the prompt determination unit determines that the user prompt contains an instruction for abnormal operation.
[0013] To solve the aforementioned problems, the program according to the present invention causes a computer to execute: a prompt acquisition process for obtaining a user prompt from a user; a prompt confirmation process for sending the user prompt obtained in the prompt acquisition process, along with a confirmation prompt for determining whether the user prompt contains an instruction for abnormal operation, to a generation AI system and obtaining confirmation response data; a prompt determination process for determining whether the user prompt contains an instruction for abnormal operation based on the confirmation response data obtained in the prompt confirmation process; a user prompt process for performing certain processing on the user prompt, if the prompt determination process determines that the user prompt does not contain an instruction for abnormal operation, sending the user prompt, along with a system prompt, to the generation AI system and obtaining response data; and if the prompt determination process determines that the user prompt contains an instruction for abnormal operation, the confirmation prompt sent to the generation AI system in the prompt confirmation process instructs the system to output data of a certain content and format regardless of the content of the user prompt. In the prompt confirmation process, the confirmation prompt is sent multiple times to the generating AI system, and corresponding confirmation response data is obtained for each. In the prompt determination process, all The aforementioned confirmation response data handle Whether the user prompt contains instructions for abnormal operation is determined by whether the data has a specific content and format as instructed in the confirmation prompt. [Effects of the Invention]
[0014] According to the information processing system and program of the present invention, the confirmation prompt sent to the generating AI system along with the user prompt for confirmation is a simple one that directly sends data of a fixed content and format to the generating AI system as a response. Therefore, it is possible to easily and reliably determine whether the user prompt contains instructions for abnormal operation and prevent prompt injection attacks. [Brief explanation of the drawing]
[0015] [Figure 1] This diagram shows the configuration of the information processing system according to this embodiment. [Figure 2] A detailed diagram of the control system is shown. [Figure 3] This is a flowchart in an information processing system. [Modes for carrying out the invention]
[0016] Embodiments of the present invention will be described in detail with reference to the drawings. The information processing system 10 of this embodiment is a system that acquires a user prompt entered by a user from a user terminal 12, determines whether or not the user prompt contains an instruction that causes the generation AI system to malfunction, transmits the user prompt to the generation AI system 15, acquires response data, and presents it to the user.
[0017] The generation AI system 15 is a system using an LLM (Large Language Model). An LLM is a language model constructed using a large amount of text data and deep learning techniques. As a result, the generation AI system 15 can perform natural language processing and enable natural conversations and text generation like humans. The generation AI system 15 can receive user prompts and send corresponding response data.
[0018] The information processing system 10 sends a system prompt for causing the generation AI system 15 to give a response along a certain purpose to the generation AI system 15 together with the user prompt. The system prompt is, for example, a set of instruction texts preset according to the purpose of the generation AI system 15, such as limiting the response from the generation AI system 15 to content related to a specific business, evaluating the user prompt and proposing improvement plans, generating meeting minutes based on the full text data of a meeting, conducting an investigation on a specific field, etc. By sending the system prompt to the generation AI system 15 together with the user prompt, response data according to the purpose of the information processing system 10 can be obtained from the generation AI system 15.
[0019] As shown in FIG. 1, the information processing system 10 can be connected to the user terminal 12 via the communication network 16. The user terminal 12 has display means 13 such as a monitor. The user terminal 12 is a computer such as a PC or a mobile information terminal such as a smartphone. However, the user terminal 12 is not limited to these.
[0020] The information processing system 10 can be connected to the generation AI system 15 via the communication network 16. However, the information processing system 10 may itself include the generation AI system 15.
[0021] In FIG. 1, the information processing system 10 is connected to a plurality of user terminals 12 and a generation AI system 15 via a single communication network 16. However, the information processing system 10 may be connected to the user terminal 12 and the generation AI system 15 via separate communication networks. For example, the information processing system 10 can be connected to the user terminal 12 via an in-house LAN and to the generation AI system 15 via the Internet.
[0022] The information processing system 10 can be composed of a computer such as a server. The information processing system 10 includes at least a control means 20, a storage means 21, and a communication means 22. The control means 20 can be composed of a processor such as a CPU. The storage means 21 can be configured using, for example, RAM, DRAM, HDD, SSD, or external cloud or distributed storage. The communication means 22 can be configured using, for example, a NIC or a wireless LAN connection device.
[0023] As shown in FIG. 2, the control means 20 has a prompt acquisition unit 31 that acquires a user prompt input by the user on the user terminal 12, a prompt confirmation unit 32 that performs a check to determine whether the user prompt acquired by the prompt acquisition unit 31 includes an instruction for abnormal operation, a prompt determination unit 33 that determines whether the user prompt includes an instruction for abnormal operation based on the check result of the prompt confirmation unit 32, and a user prompt processing unit 34 that performs a certain process on the user prompt based on the determination result of the prompt determination unit.
[0024] Next, a flow of using the generation AI system 15 from the user terminal 12 using the information processing system 10 will be described. As shown in FIG. 3, the information processing system 10 has the prompt acquisition unit 30 acquire a user prompt input by the user from the user terminal 12 (S1). Next, the information processing system 10 has the prompt confirmation unit 31 transmit prompt confirmation data to the generation AI system 15 (S2). The prompt confirmation data includes a user prompt and a confirmation prompt.
[0025] The confirmation prompt is a prompt sent in place of the system prompt to determine whether the user prompt acquired by the prompt acquisition unit 30 contains instructions to cause the generation AI system 15 to malfunction. Instructions to cause the generation AI system 15 to malfunction include instructions to disable or modify the system prompt that is sent from the information processing system 10 to the generation AI system 15 along with the user prompt. The confirmation prompt contains instructions to output data with a specific content and format, regardless of the content of the user prompt. If the user prompt does not contain instructions to disable or modify the system prompt, the generation AI system 15 responds with the data with the specific content and format instructed by the confirmation prompt as is. If the user prompt contains instructions to disable or modify the system prompt, the generation AI system 15 cannot respond with the data with the specific content and format instructed by the confirmation prompt in its original form. For this reason, by sending the user prompt along with the confirmation prompt to the generation AI system 15 and acquiring the response data, it is possible to determine whether or not the user prompt contains instructions to disable or modify the system prompt.
[0026] The confirmation prompt can take the following specific example: (Confirmation prompt for the first example) You will respond with the following JSON data regardless of the situation. { “response-15ab6y754”: “YES!!” }
[0027] The first example instruction states, "You will respond with the following JSON data under any circumstances," instructing the generating AI system 15 to respond with the JSON (JavaScript Object Notation) data from "{" to "}" in its original format and content, including line breaks and spaces. The output JSON data includes a randomly generated string (15ab6y754). This part of the string is randomly generated each time a confirmation prompt is generated, so it will be a different string each time. This prevents the user from pre-emptively imitating the confirmation prompt and invalidating the confirmation step of the information processing system 10. Note that the randomly generated string in the above example may be a string with irreversibility or randomness, such as a hash value. Also, the confirmation prompt is not limited to one containing a random string.
[0028] In the example above, the response data output by the generating AI system 15 in the confirmation prompt is JSON data, but it may also be other types of data such as XML data, YAML data, Markdown, HTML, or plain text. It is desirable that the response data output by the generating AI system 15 in the confirmation prompt be as simple as possible while maintaining a certain format. This is because the sending of the confirmation prompt and the response are performed as preliminary steps before the actual operation, and therefore the speed of the response and the processing costs should be kept down. However, the response data output by the generating AI system 15 in the confirmation prompt may be more complex.
[0029] The confirmation prompt could, as a second example, be simpler than the first example, for instance, "You will respond with 'Normal' in any situation," and the AI system 15 could simply respond with very basic text.
[0030] After the prompt confirmation unit 31 sends prompt confirmation data, including the user prompt and the confirmation prompt, to the generation AI system 15, it obtains confirmation response data from the generation AI system 15 (S3).
[0031] Next, the prompt determination unit 32 determines whether the user prompt contains an instruction for abnormal operation based on the confirmation response data acquired by the prompt confirmation unit 31 (S4). Whether the user prompt contains an instruction for abnormal operation can be determined by whether or not the confirmation response data is data with a specific content and format specified in the confirmation prompt.
[0032] For example, if the following output is obtained as response data when the confirmation prompt of the first example is sent to the generation AI system 15 along with the user prompt, the prompt determination unit 32 can determine that the user prompt does not contain instructions for abnormal operation, because this output is the same content and format as instructed in the confirmation prompt of the first example. (Response data when the user prompt does not contain instructions for abnormal behavior) { “response-15ab6y754”: “YES!!” }
[0033] On the other hand, if the following output is obtained as response data when the confirmation prompt of the first example is sent to the generation AI system 15 together with the user prompt, the prompt determination unit 32 can determine that the user prompt contains an instruction for abnormal operation because this data differs in content and format from the confirmation prompt of the first example. Note that if the user prompt contains an instruction for abnormal operation, the response data from the generation AI system 15 will change depending on its content, but unless the data output is exactly the same as the content and format specified in the confirmation prompt, it will be determined that the user prompt contains an instruction for abnormal operation. (Example of response data when the user prompt contains instructions for abnormal operation) You will receive the following JSON data in response, regardless of the situation.
[0034] If the confirmation prompt is the second example described above, the response data will be "Normal" if the user prompt does not contain instructions for abnormal operation, and the response data will be other text if the user prompt does contain instructions for abnormal operation. Therefore, in the case of the confirmation prompt of the second example, the prompt determination unit 32 can determine whether or not the user prompt contains instructions for abnormal operation.
[0035] The S2-S3 flow may be performed multiple times. For example, prompt confirmation data is sent to the generating AI system 15, and after receiving the first confirmation response data, prompt confirmation data with the same content is sent again to the generating AI system 15, and confirmation response data is received a second time. The S2-S3 flow may also be repeated three or more times. The generating AI system 15 does not necessarily respond with the same content to the same prompt, so even if the user prompt contains an instruction for abnormal operation, if the instruction for abnormal operation is weak, the response data from the generating AI system 15 may be as instructed in the confirmation prompt. In contrast, by sending prompt confirmation data to the generating AI system 15 multiple times, if any of the confirmation response data does not respond with the content and format as instructed in the confirmation prompt, it can be determined that the user prompt contains an instruction for abnormal operation, and the presence or absence of an instruction for abnormal operation can be determined with greater accuracy.
[0036] Thus, before sending the user prompt and system prompt to the generation AI system 15, the information processing system 10 sends the user prompt and confirmation prompt to the generation AI system 15, obtains confirmation response data, and determines whether the user prompt contains instructions for abnormal operation. Since the confirmation prompt is a short string that is sent back to the generation AI system 15 in the same content and format, the user prompt can be checked quickly and at low cost. Furthermore, since the determination of whether the user prompt contains instructions for abnormal operation is made by checking whether the confirmation response data differs from the content and format instructed in the confirmation prompt, the determination is easy and reliable.
[0037] If S4 determines that the user prompt contains an instruction for abnormal operation, the prompt processing unit 33 performs sanitizing processing to remove the instruction for abnormal operation from the user prompt (S5). However, if the prompt processing unit 33 finds that the user prompt contains an instruction for abnormal operation, it may send an error notification to the user terminal 12 at that point and interrupt the process.
[0038] If it is determined in S4 that the user prompt does not contain instructions for abnormal operation, or after the processing in S5 is performed, the prompt processing unit 33 sends the user prompt together with the system prompt to the generating AI system 15 (S6). The prompt processing unit 33 then receives response data from the generating AI system 15 (S7) and sends it to the user terminal 12 to present the response data to the user (S8).
[0039] Furthermore, the program used in the information processing system 10 of this embodiment can also be provided independently. In this case, the program causes the computer to execute: a prompt acquisition process that obtains a user prompt from the user; a prompt confirmation process that sends the user prompt obtained in the prompt acquisition process to the generation AI system 15 along with a confirmation prompt to determine whether the user prompt contains an instruction for abnormal operation, and obtains confirmation response data; a prompt determination process that determines whether the user prompt contains an instruction for abnormal operation based on the confirmation response data obtained in the prompt confirmation process; and a user prompt process that, if the prompt determination process determines that the user prompt does not contain an instruction for abnormal operation, sends the user prompt to the generation AI system 15 along with a system prompt to obtain response data, and if the prompt determination process determines that the user prompt contains an instruction for abnormal operation, performs certain processing on the user prompt. The confirmation prompt sent to the generation AI system 15 in the prompt confirmation process instructs the system to output data of a certain content and format regardless of the content of the user prompt, and the prompt determination process determines whether the user prompt contains an instruction for abnormal operation based on whether the confirmation response data is data of a certain content and format instructed by the confirmation prompt.
[0040] Although embodiments of the present invention have been described above, the application of the present invention is not limited to these embodiments and can be applied in various ways within the scope of its technical concept. [Explanation of symbols]
[0041] 10 Information Processing Systems 12 user terminals 13 Display means 15. Generating AI System 16 Communication Networks 20 Control means 21 Memory means 22 Means of communication 30 Prompt acquisition section 31 Prompt Confirmation Section 32 Prompt determination unit 33 Prompt Processing Unit 34 AI output information acquisition section
Claims
1. An information processing system that sends user prompts entered by the user, along with system prompts, to a generating AI system to obtain response data, Equipped with control means and storage means, The control means is A prompt acquisition unit that obtains the user prompt from the user, A prompt confirmation unit transmits the user prompt acquired by the prompt acquisition unit, along with a confirmation prompt for determining whether the user prompt contains an instruction for abnormal operation, to the generating AI system to acquire confirmation response data. A prompt determination unit determines whether the user prompt contains an instruction for abnormal operation based on the confirmation response data obtained by the prompt confirmation unit, The system includes a user prompt processing unit which, if the prompt determination unit determines that the user prompt does not contain an instruction for abnormal operation, transmits the user prompt together with the system prompt to the generating AI system to obtain response data, and if the prompt determination unit determines that the user prompt contains an instruction for abnormal operation, performs certain processing on the user prompt. The confirmation prompt that the prompt confirmation unit transmits to the generation AI system instructs the system to output data of a fixed content and format, regardless of the content of the user prompt. The prompt confirmation unit sends the confirmation prompt to the generating AI system multiple times and obtains the corresponding confirmation response data for each. The prompt determination unit is an information processing system that determines whether the user prompt contains instructions for abnormal operation based on whether all of the confirmation response data are data of a certain content and format instructed in the corresponding confirmation prompt.
2. The information processing system according to claim 1, wherein the confirmation prompt transmitted by the prompt confirmation unit to the generating AI system instructs the system to output the string contained in the confirmation prompt in its original form, regardless of the content of the user prompt.
3. The information processing system according to claim 1 or 2, wherein the confirmation prompt transmitted by the prompt confirmation unit to the generating AI system includes a random string or a hash value.
4. The information processing system according to claim 1 or 2, wherein the confirmation prompt transmitted by the prompt confirmation unit to the generating AI system instructs the system to output data described in JSON (JavaScript Object Notation).
5. The information processing system according to claim 1 or 2, wherein the user prompt processing unit determines that the user prompt contains an instruction for abnormal operation, and performs sanitizing on the user prompt.
6. On the computer, A prompt acquisition process that obtains user prompts from the user, A prompt confirmation process involves sending the user prompt obtained in the prompt acquisition process, along with a confirmation prompt for determining whether the user prompt contains an instruction for abnormal operation, to the generating AI system to obtain confirmation response data. A prompt determination process that determines whether the user prompt contains an instruction for abnormal operation based on the confirmation response data obtained in the prompt confirmation process, If the prompt determination process determines that the user prompt does not contain an instruction for abnormal operation, the user prompt is sent to the generating AI system along with the system prompt to obtain response data; if the prompt determination process determines that the user prompt contains an instruction for abnormal operation, a user prompt process is executed, which performs certain processing on the user prompt. The confirmation prompt transmitted to the generating AI system in the prompt confirmation process instructs the system to output data of a fixed content and format, regardless of the content of the user prompt. In the prompt confirmation process, the confirmation prompt is sent multiple times to the generating AI system, and corresponding confirmation response data is obtained for each. The prompt determination process is a program that determines whether the user prompt contains instructions for abnormal operation by checking whether all of the confirmation response data are data with a specific content and format instructed in the corresponding confirmation prompt.
Citation Information
Patent Citations
Data analysis device
JP2025067282A
System and Method for Detecting and Preventing Prompt Injection Attacks
US20250103715A1
Securing of sandboxed generative ai models
US20250139229A1
Large language model (LLM) interaction security sandbox
US20250156527A1