Terminal device and secure query method for external LLM service
By combining Small Language Model (SLM) on the terminal device with a cloud-based LLM, the security and data privacy issues of the cloud-based LLM are solved by using SLM to process private data, generate private prompts, and correct the answers of the cloud-based LLM. This enables efficient and secure AI responses on the terminal device.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MACRONIX INTERNATIONAL CO LTD
- Filing Date
- 2024-12-09
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, there are security concerns and data privacy issues when language generation models (LLMs) are computed in the cloud. Furthermore, the answers from cloud-based LLMs may be illusory, making it impossible to effectively utilize their powerful reasoning capabilities on terminal devices while protecting data privacy.
By combining a Small Language Model (SLM) on the terminal device with a cloud-based LLM, the solution utilizes SLM to process private data and generate private prompts, while correcting the responses from the cloud-based LLM to ensure that data is not uploaded to the cloud. This is combined with Search Augmentation (RAG), prompt engineering, and model fine-tuning techniques to improve response accuracy.
This enables the use of the powerful inference capabilities of cloud-based LLM on terminal devices while protecting data privacy, improving the accuracy and security of AI responses and avoiding the exposure of private data to the cloud.
Smart Images

Figure CN122019694A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a secure query method for external LLM services, and a terminal device for performing a secure query method for external LLM services. Background Technology
[0002] The application and demand for generative artificial intelligence (GAI) have grown rapidly recently, with increasing demand for its use in terminal devices such as smartphones, edge devices, and portable devices. Given the enormous potential for widespread application of GAI, such as OpenAI's ChatGPT which generates native answers to various questions based on large language models (LLMs), the computational and memory overhead of such LLMs is quite high. Furthermore, known LLM services can only be used in the cloud, raising security concerns and requiring essential internet connectivity.
[0003] Furthermore, LLM is known to be prone to illusions, meaning that due to limitations in training data, model bias, or the inherent complexity of language, LLM may produce answers that are actually incorrect or meaningless. Additional data may be used as a prompt to reduce the illusions of LLM, but this also raises security concerns, as the additional data could be confidential (private) files, graphics, or images that must be uploaded to the cloud. Therefore, there is a need for technologies that can improve the accuracy of AI responses while obtaining AI answers from LLM services without uploading private data to the cloud. Summary of the Invention
[0004] This invention describes a technique for secure querying of terminal devices with SLM and private data that works in conjunction with LLM services provided by cloud servers or external computing systems.
[0005] A first aspect of the present invention is an edge device. The edge device includes a user interface configured to receive AI queries. The edge device also includes a processor coupled to the user interface. The edge device also includes a memory coupled to the processor and configured to store private data. The edge device also includes a neural engine coupled to the processor and configured to execute a first language generation model. The edge device also includes a communication module coupled to the processor. The processor is configured to process the private data to obtain a private prompt when an AI query is input from the user interface. The processor is also configured to transmit the AI query to a second language generation model on an external server via the communication module. The processor is also configured to receive an initial response generated by the second language generation model via the communication module. The processor is also configured to input the initial response and the private prompt to the first language generation model to obtain a final response. The second language generation model has a greater number of model parameters than the first language generation model.
[0006] A second aspect of the invention is a secure query method for external LLM services. The secure query method includes receiving an AI query via a user interface of a terminal device. It also includes processing private data stored in the terminal device's memory based on the AI query by the terminal device's processor to obtain private prompts. Furthermore, it includes transmitting the AI query to a second language generation model of the external LLM service via the terminal device's communication module. The secure query method also includes receiving an initial response generated by the second language generation model based on the AI query via the communication module. Finally, it includes inputting the initial response and private prompts to a first language generation model executed by the terminal device's neural engine to obtain a final response generated by the terminal device's first language generation model. The second language generation model has a greater number of model parameters than the first language generation model.
[0007] A third aspect of the present invention is a secure query method for an external LLM service. The secure query method includes receiving an AI query via a user interface of a terminal device. The secure query method also includes processing private data stored in the terminal device's memory based on the AI query by the terminal device's processor to obtain private hints. The secure query method also includes determining whether the terminal device meets the answer requirements of the AI query based on the capabilities of a first language generation model executed by the terminal device's neural engine. The secure query method also includes directly inputting the AI query and private hints to the first language generation model when it is determined that the terminal device meets the answer requirements of the AI query, to obtain a first final answer generated by the terminal device's first language generation model. The secure query method also includes transmitting the AI query to a second language generation model of an external LLM service via the terminal device's communication module when it is determined that the terminal device does not meet the answer requirements of the AI query. The secure query method also includes receiving an initial answer generated by a second language generation model of an external LLM service based on the AI query via the communication module. The secure query method also includes inputting the initial answer and private hints to the terminal device's first language generation model to obtain a final answer generated by the terminal device's first language generation model. The number of model parameters in a second language generation model is greater than the number of model parameters in a first language generation model.
[0008] Embodiments of the above-described technology include methods, systems, circuits, computer program products, and computer-readable media. In one example, a method may include the actions described above. In another example, a computer program product is adapted to be implemented in a non-transitory machine-readable medium, which stores instructions executable by one or more processors. The instructions are used to cause the one or more processors to perform the actions described above. A computer-readable medium stores instructions. The instructions are used to cause the one or more processors to perform the actions described above when executed by the one or more processors.
[0009] To provide a better understanding of the above and other aspects of the present invention, specific embodiments are described below in conjunction with the accompanying drawings. Other features, aspects, and advantages will become apparent from the description, drawings, and claims. Attached Figure Description
[0010] Figure 1 A functional block diagram illustrating an example terminal device coupled to an external LLM service according to one or more embodiments of the present invention is shown.
[0011] Figure 2A and Figure 2B A functional block diagram of an example terminal device illustrating an execution decision model and a Retrieval Augmented Generation (RAG) for private suggestions according to one or more embodiments of the present invention is shown.
[0012] Figure 3 A flowchart illustrating an example security query procedure for external LLM services according to one or more embodiments of the present invention is shown.
[0013] Figure 4 A flowchart illustrating another example security query procedure for external LLM services according to one or more embodiments of the present invention is shown.
[0014] Similar reference numerals or names in the various figures denote the same elements. It should also be understood that the various exemplary embodiments shown in the figures are merely illustrative representations and are not necessarily drawn to scale.
[0015] Explanation of reference numerals in the attached figures:
[0016] 100: Terminal device
[0017] 110: User Interface
[0018] 111: AI Query
[0019] 120: Processor
[0020] 121: RAG
[0021] 122: Vector Database
[0022] 123: Decision Model
[0023] 130: Memory
[0024] 131: Private Data
[0025] 132: Private Hint
[0026] 140: Neural Engine
[0027] 141: SLM
[0028] 142: SLM's answer
[0029] 150: Communication Module
[0030] 200: Cloud server
[0031] 210: LLM Services
[0032] 211: LLM Answer
[0033] 300, 400: Program
[0034] S310~S350, S410~S470: Steps Detailed Implementation
[0035] There is a conflict between the capabilities and security of language models. For example, using native small language model (SLM) solutions on terminal or edge devices offers undeniable security and lower complexity and power consumption. However, due to the weaker reasoning capabilities of SLMs, complex AI (artificial intelligent) queries are likely to be misinterpreted by the SLM, potentially leading to stylistic issues or nonsensical responses. Conversely, compared to native SLM solutions on terminal devices, cloud-based LLM services may offer greater capabilities and cost-effectiveness. However, due to security concerns, the lack of uploaded private data or information to guide LLM responses may result in hallucination issues. Alternatively, private data or information may need to be uploaded and exposed to the cloud to improve the accuracy of LLM responses.
[0036] According to the technology provided by this invention, if an AI query is determined to be a difficult problem (more difficult to solve by the SLM of the terminal device), the AI query answer from the LLM service in the cloud can be implemented as input to the SLM, which can be modified by the SLM of the terminal device based on specific knowledge in private or confidential data. Therefore, the quality and correctness of the LLM service's answer can be improved without exposing private or confidential data in the cloud.
[0037] Figure 1A functional block diagram of an example terminal device 100 coupled to an external LLM service 210 according to one or more embodiments of the present invention is shown. The terminal device 100 includes a user interface 110, a processor 120, a memory 130, a neural engine 140, and a communication module 150. The processor 120 is coupled to the user interface 110, the memory 130, the neural engine 140, and the communication module 150. The processor 120 may be a central processing unit (CPU), a graphics processing unit (GPU), a general-purpose microprocessor, an application-specific microcontroller, or other types of AI accelerators of the terminal device 100. The memory 130 may be non-volatile memory for long-term storage of instructions and / or data, or some other suitable non-volatile memory device or storage device. Terminal device 100 is wired or wirelessly coupled to cloud server 200 via communication module 150, enabling terminal device 100 to access LLM service 210 of cloud server 200 via the Internet or intranet. In some embodiments, LLM service 210 of cloud server 200 can be accessed via a web browser as an interface for inputting data (e.g., AI query 111) to or reading data (e.g., LLM answer 211) from LLM service 210 of cloud server 200. Simultaneously, LLM service 210 of cloud server 200 can reference publicly available data via a web browser as part of the input data (e.g., AI query 111) to improve the quality of the LLM service's answer, without uploading any private data to cloud server 200. The cloud server 200 referred to herein is merely an example of a computing system with high computing power for LLM services. In other cases, terminal device 100 can also be coupled to other external computing systems running LLM services to obtain LLM responses without uploading any private data.
[0038] User interface 110 can receive AI query 111 from the user and respond with SLM answer 142 as the final result of the AI query 111 calculation. To obtain SLM answer 142, when AI query 111 is input, processor 120 can process AI query 111 and access private data 131 stored in memory 130 to obtain private hint 132 based on AI query 111. Simultaneously, AI query 111 is also uploaded by communication module 150 to the LLM service 210 of cloud server 200. Then, communication module 150 receives the LLM answer 211 generated by LLM service 210 based on AI query 111, and processor 120 enables the LLM answer 211 and private hint 132 to be input to SLM 141, which is included and executed by neural engine 140, to obtain SLM answer 142 generated by SLM 141. Private hint 132 may be a text or a combination of instructions, provided to SLM 141 to trigger a specific response or action to improve the accuracy of SLM response 142 corresponding to AI query 111. In some implementations, SLM 141 modifies LLM response 211 based on private hint 132 to generate SLM response 142 for improving the accuracy of the AI response. In some implementations, the number of parameters included by SLM 141 is less than the number of parameters included by LLM service 210; for example, LLM substantially includes 175 billion parameters, while SLM 141 substantially includes 3.8 billion parameters.
[0039] In some implementations, prompt engineering may be performed by processor 120, applied to private data 131 stored in memory 130, to obtain private prompt 132 based on AI query 111. Private prompt 132 may guide SLM 141 to correct the LLM response 211 generated by LLM service 210 to have a more accurate output (SLM response 142) corresponding to AI query 111. For example, private prompt 132 may be programmed from private data 131 in natural language to guide SLM 141.
[0040] In some implementations, model fine-tuning may be performed by processor 120, applying private data 131 stored in memory 130 to obtain private hints 132 based on AI query 111. Model fine-tuning provides the benefit of utilizing the knowledge and representations learned from the private data 131 corresponding to AI query 111. In the example of model fine-tuning, a matching pre-trained model is first selected based on AI query 111 and private data 131. The architecture of the pre-trained model can then be modified, or the frozen or unfrozen layers of the pre-trained model can be determined. The modified pre-trained model can then be trained based on AI query 111 and private data 131 to achieve better results, such as private hints 132.
[0041] In some implementations, Retrieval Augmented Generation (RAG) may be performed by processor 120 to obtain an embedding vector for retrieving private data 131 stored in memory 130, thereby obtaining private hints 132. An example of a final apparatus for performing RAG for private hints will be referred to in... Figure 2A and Figure 2B The following is a detailed explanation.
[0042] Figure 2A and Figure 2B A functional block diagram of an example terminal device 100 illustrating an execution decision model 123 and a Retrieval Augmented Generation (RAG) 121 for private prompts 132 according to one or more embodiments of the present invention is shown. (Different from...) Figure 1 Example, in Figure 2A and Figure 2B In the example, the processor 120 of the terminal device 100 executes the decision model 123 and the RAG 121 for the private prompt 132.
[0043] Reference to Figure 2ATo obtain an SLM response 142, when AI query 111 is input, processor 120 processes AI query 111 and executes decision model 123 to determine whether terminal device 100 meets the resolution requirement of AI query 111 based on the capabilities of SLM 141. Specifically, decision model 123 determines whether terminal device 100's SLM 141 itself is capable of processing AI query 111 with a specific level of accuracy without using LLM service 210. For example, decision model 123 could be a small artificial neural network to predict the response quality of the local SLM 141. If the predicted response quality (score) is below a predefined threshold, AI query 111 is first sent to LLM service 210 of cloud server 200. Figure 2A In this scenario, decision model 123 determines that terminal device 100 does not meet the answer requirements of AI query 111, meaning that the SLM 141 of terminal device 100 itself is not capable of processing AI query 111 with the required accuracy. AI query 111 is then transmitted by communication module 150 to LLM service 210 of cloud server 200. Simultaneously, RAG 121 is executed by processor 120 to obtain an embedding vector for retrieving private data 131 stored in memory 130, thereby obtaining the private hint 132. The embedding vector is generated from vector database 122 that embeds AI query 111 and private data 131. Next, communication module 150 receives LLM answer 211 generated by LLM service 210 based on AI query 111, and processor 120 enables LLM answer 211 and private hint 132 to be input to SLM 141 to obtain SLM answer 142 generated by SLM 141.
[0044] Reference to Figure 2B ,At Figure 2B In this scenario, decision model 123 determines that terminal device 100 meets the answer requirements of AI query 111, meaning that the SLM 141 of terminal device 100 is capable of processing AI query 111 with a certain level of accuracy. AI query 111 is then directly input into SLM 141. Similarly, RAG 121 is executed by processor 120 to obtain an embedding vector for retrieving private data 131 stored in memory 130, resulting in private hint 132. The embedding vector is generated from vector database 122 that embeds AI query 111 and private data 131. Then, along with AI query 111, private hint 132 is input into SLM 141 to directly obtain SLM answer 142 generated by SLM 141.
[0045] Figure 3 A flowchart illustrating an example security query procedure 300 for an external LLM service according to one or more embodiments of the present invention is provided. In step S310, the user interface of the terminal device receives an AI query. In step S320, the processor of the terminal device processes private data stored in the memory of the terminal device to obtain a private hint based on the AI query. In step S330, the communication module of the terminal device transmits the AI query to the external LLM service. In step S340, the communication module of the terminal device receives an LLM response generated by the external LLM service based on the AI query. In step S350, the LLM response and the private hint are input to the SLM executed by the neural engine of the terminal device to obtain an SLM response generated by the SLM of the terminal device.
[0046] Figure 4 A flowchart illustrating another example security query procedure 400 for an external LLM service according to one or more embodiments of the present invention is shown. In step S410, the user interface of the terminal device receives an AI query. In step S420, the processor of the terminal device processes private data stored in the memory of the terminal device to obtain private hints based on the AI query. In step S430, the processor of the terminal device determines whether the terminal device meets the answer requirements of the AI query based on the capabilities of the SLM 141 executed by the neural engine of the terminal device. When it is determined that the terminal device meets the answer requirements of the AI query, in step S470, the AI query and private hints are input to the SLM of the terminal device to obtain an SLM answer generated by the SLM. When it is determined that the terminal device does not meet the answer requirements of the AI query, in step S440, the communication module of the terminal device transmits the AI query to the external LLM service. In step S450, the communication module of the terminal device receives the LLM answer generated by the external LLM service based on the AI query. In step S460, the LLM response and private prompt are input to the SLM executed by the neural engine of the terminal device to obtain the SLM response generated by the SLM of the terminal device.
[0047] In certain settings, SLM modifies LLM responses based on proprietary hints to generate SLM responses.
[0048] In certain settings, the processor can perform hint engineering on private data stored in memory to obtain private hints based on AI queries.
[0049] In certain settings, the processor can perform model fine-tuning applied to private data stored in memory to obtain private hints based on AI queries.
[0050] In certain settings, the processor can perform retrieval enhancement generation to obtain embedding vectors for retrieving private data stored in memory, thus providing private hints. These embedding vectors are generated from a vector database that embeds AI queries and private data.
[0051] In certain configurations, the SLM includes fewer parameters than the LLM served by the LLM. The LLM actually includes 175 billion parameters, while the SLM actually includes 3.8 billion parameters.
[0052] In summary, the technology according to various embodiments of the present invention provides a combination of a local SLM on a terminal device and a global LLM on a cloud server, which leverages the powerful inference capabilities and rich knowledge of the cloud-based LLM without exposing private data or information. Specifically, it sends a query to the cloud-based LLM without including private information, then uses the local SLM (with RAG, hints, engineering, or model fine-tuning) to correct, revise, or supplement the LLM's answer based on the local private data. That is, it uses a more powerful cloud-based LLM to understand more complex specific rules and / or phenomena for AI queries, and then uses the local SLM and private data or information to perform the remaining calculations to obtain a more accurate answer.
[0053] This invention, along with other examples, can be implemented as one or more computer program products. For example, one or more modules of computer program instructions encoded on a computer-readable medium are executed by or control the operation of a data processing apparatus. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, or a combination thereof. The term "data processing apparatus" includes all means, devices, and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. In addition to hardware, this apparatus may include program code that establishes the execution environment of the computer program in question, such as program code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination thereof.
[0054] Computer programs (also known as programs, software, software applications, instruction code, or program code) can be written in any form of programming language, including compiled or interpreted languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored as part of a file containing other programs or data (e.g., one or more instruction codes stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., a file containing one or more modules, subroutines, or portions of program code). A computer program can be configured to execute on one or more computers. These computers may be located in one place or distributed across multiple locations and interconnected via a communication network.
[0055] The programs and logic flows described herein can be executed by one or more programmable processors that execute one or more computer programs to perform the functions described herein. The programs and logic flows can also be executed by special purpose logic circuitry, and the devices can also be implemented by special purpose logic circuitry, for example, field programmable gate arrays (FPGAs) or application-specific integrated circuits (ASICs).
[0056] Processors suitable for executing computer programs include, for example, both general-purpose microprocessors and special-purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor receives instructions and data from read-only memory or random access memory, or both. The basic elements of a computer may include a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer may also include or be operatively coupled to one or more mass storage devices for storing data, to receive data from, or to transfer data to, or both of these mass storage devices. Examples of such mass storage devices are magnetic disks, magneto-optical disks, or optical disks. However, a computer does not necessarily need to have such devices. Computer-readable media suitable for storing computer program instructions and data may include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks. Processors and memory may be supplemented by or incorporated into special-purpose logic circuitry.
[0057] While this document may describe many details, these details should not be construed as limiting the scope of the invention as claimed or potentially claimed, but rather as descriptions of features specific to particular embodiments. Certain features described herein in separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments. Furthermore, although multiple features may be described above as operating in certain combinations and even initially claimed in this manner, one or more features from the claimed combinations may in some cases be excluded from the said combinations, and the claimed combinations may be for sub-combinations or variations thereof. Similarly, although multiple operations are depicted in a specific order in the figures, it should not be construed that these operations must be performed in the specific order shown or in sequential order, or that all described operations must be performed to achieve the desired result.
[0058] Only a few examples and implementations have been described. Variations, modifications, and enhancements based on the examples and implementations, as well as other implementations, can be made according to the disclosure.
[0059] In summary, although the present invention has been disclosed above with reference to preferred embodiments and exemplary details, it is understood that these examples are intended to illustrate the invention and not to limit it. Those skilled in the art to which this invention pertains can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of this invention shall be determined by the appended claims.
Claims
1. A terminal device, comprising A user interface is set up to receive an AI query; A processor is coupled to this user interface; A memory, coupled to the processor and configured to store private data; A neural engine, coupled to the processor and configured to execute a first language generation model; and A communication module is coupled to the processor. The processor is configured as follows: When an AI query is entered from the user interface, the private data is processed based on the AI query to obtain a private suggestion. The communication module transmits the AI query to a second language generation model on an external server. The communication module receives an initial response generated by the second language generation model. The initial answer and the private prompt are input into the first language generation model to obtain a final answer. The second language generation model has a greater number of model parameters than the first language generation model.
2. The terminal device of claim 1, wherein the processor executes a decision model configured to determine whether the terminal device meets the answer requirement of the AI query based on the capability of the first language generation model executed by the neural engine of the terminal device.
3. The terminal device according to claim 1, wherein the first language generation model modifies the initial answer according to the private prompt to generate the final answer.
4. The terminal device of claim 1, wherein the processor is configured to execute a prompting process applied to the private data stored in the memory to obtain the private prompt based on the AI query.
5. The terminal device of claim 1, wherein the processor is configured to perform a model fine-tuning applied to the private data stored in the memory to obtain the private prompt based on the AI query.
6. The terminal device of claim 1, wherein the processor is configured to perform a retrieval enhancement generation to obtain an embedding vector for retrieving the private data stored in the memory, thereby obtaining the private hint. The embedding vector is generated from a vector database that embeds the AI query and the private data.
7. A secure query method for external LLM services, comprising: An AI query is received by a user interface of a terminal device; A processor of the terminal device processes private data stored in a memory of the terminal device based on the AI query to obtain a private prompt; The AI query is transmitted from a communication module of the terminal device to a second language generation model on an external server; The communication module receives an initial response generated by the second language generation model based on the AI query. as well as The initial answer and the private prompt are input into a first language generation model executed by a neural engine of the terminal device to obtain a final answer generated by the first language generation model of the terminal device. The second language generation model has a greater number of model parameters than the first language generation model.
8. The secure query method of claim 7, wherein obtaining the final answer generated by the first language generation model of the terminal device includes correcting the initial answer according to the private prompt to generate the final answer.
9. The secure query method of claim 7, wherein processing the private data stored in the memory of the terminal device to obtain the private prompt includes having the processor configured to execute a prompt engineering applied to the private data stored in the memory to obtain the private prompt based on the AI query.
10. The secure query method of claim 7, wherein processing the private data stored in the memory of the terminal device to obtain the private prompt includes the processor being configured to perform a model fine-tuning applied to the private data stored in the memory to obtain the private prompt based on the AI query.
11. The secure query method of claim 7, wherein processing the private data stored in the memory of the terminal device to obtain the private hint includes the processor being configured to perform a search enhancement generation to obtain an embedding vector for retrieving the private data stored in the memory to obtain the private hint. The embedding vector is generated from a vector database that embeds the AI query and the private data.
12. A secure query method for external LLM services, comprising: An AI query is received by a user interface of a terminal device; A processor of the terminal device processes private data stored in a memory of the terminal device based on the AI query to obtain a private prompt; The processor of the terminal device determines whether the terminal device meets the answer requirements of the AI query based on the capability of a first language generation model executed by a neural engine of the terminal device; When it is determined that the terminal device meets the answer requirements of the AI query, the AI query and the private prompt are directly input into the first language generation model to obtain a final answer generated by the first language generation model of the terminal device. When it is determined that the terminal device does not meet the answer requirements of the AI query, a communication module of the terminal device transmits the AI query to a second language generation model of the external LLM service. The communication module receives an initial response generated by the second language generation model of the external LLM service based on the AI query; as well as The initial answer and the private prompt are input into the first language generation model of the terminal device to obtain the final answer generated by the first language generation model of the terminal device. The second language generation model has a greater number of model parameters than the first language generation model.
13. The secure query method of claim 12, wherein the final answer obtained from the first language generation model includes modifying the initial answer according to the private hint to generate the final answer.
14. The secure query method of claim 12, wherein processing the private data stored in the memory of the terminal device to obtain the private prompt includes having the processor configured to execute a prompt engineering applied to the private data stored in the memory to obtain the private prompt based on the AI query.
15. The secure query method of claim 12, wherein processing the private data stored in the memory of the terminal device to obtain the private prompt includes having the processor configured to perform a model fine-tuning applied to the private data stored in the memory to obtain the private prompt based on the AI query.
16. The secure query method of claim 12, wherein processing the private data stored in the memory of the terminal device to obtain the private hint includes the processor being configured to perform a search enhancement generation to obtain an embedding vector for retrieving the private data stored in the memory to obtain the private hint. The embedding vector is generated from a vector database that embeds the AI query and the private data.