Dynamic language model prompts for fraud detection
By combining a generative language module and a prompt manager in a chatbot system to dynamically update language model prompts, the problem of lack of specific understanding and high cost of generative language models in fraud detection in existing technologies is solved, achieving more reliable and efficient fraud detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BITDEFENDER IPR MANAGEMENT
- Filing Date
- 2024-12-19
- Publication Date
- 2026-06-16
AI Technical Summary
Existing fraud detection methods based on generative language models lack specific understanding of online fraud and are costly, making it difficult to provide reliable and user-friendly fraud detection solutions.
A chatbot system is adopted, which combines a generative language module (GLM) and a prompt manager to dynamically update language model prompts. Fraud detection is performed through inline editing technology, and code snippets are triggered by flag words to update prompts and make judgments.
It improves the reliability and efficiency of fraud detection, reduces computing resource requirements, provides a user-friendly fraud detection solution, and adapts to changes in online fraud methods.
Smart Images

Figure CN122228503A_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] This application claims the benefit of U.S. Provisional Patent Application No. 63 / 612,405, filed December 20, 2023, entitled “Dynamic Inline Editing of Language Model Prompts,” the contents of which are incorporated herein by reference. Background Technology
[0003] This invention relates to computer security, and more particularly to the prevention of online fraud, such as phishing.
[0004] Online fraud (especially in the form of phishing and identity theft) poses a growing threat to internet users worldwide. Sensitive personal information (such as usernames, IDs, passwords, social security and medical records, bank and credit card details) obtained through fraudulent means by international criminal networks operating on the internet is used to withdraw private funds and / or further sold to third parties. In addition to the direct economic losses caused to individuals, online fraud leads to a series of unwanted side effects, such as increased security costs for companies, higher retail prices and bank fees, lower stock values, lower wages, and reduced tax revenue.
[0005] The explosive growth of mobile computing and online services has fueled online fraud, with millions of devices (such as smartphones and tablets) constantly connecting to the internet and acting as potential targets. In a typical example of phishing, users receive fraudulent communications masquerading as legitimate messages from service providers (such as banks, telephone companies, online retailers, etc.). These messages may report fictitious problems with the user's account or recent orders and invite the user to contact the corresponding service provider via a link included in the message. The link may lead to a fake interface (e.g., a webpage) used by online criminals to steal sensitive data (such as login credentials and credit card numbers). Accessing such links may further expose users to the risk of installing malware.
[0006] Various security software programs can be used to detect fraudulent websites and / or phishing messages. However, using such software may require the installation of a local security agent on the user's computing device, and may further necessitate a certain level of understanding of online communications, computer security, and / or types of online threats, which is expected to exceed the knowledge of the average user. Furthermore, the methods used by cybercriminals to trick users into disclosing sensitive information are constantly evolving, thus requiring users and systems to continuously adapt.
[0007] Modern anti-fraud systems and methods increasingly rely on artificial intelligence (AI), and specifically on generative language models, such as ChatGPT® from OpenAI, Inc. A typical example of such methods involves developing language model cues containing text samples (e.g., suspicious messages received by a client) and feeding the corresponding cues as input to the language model. The model then processes the cues and responds with another text indicating whether the corresponding text sample indicates fraud. However, to date, such methods have proven less reliable than classical anti-fraud approaches. Typical language models are pre-trained on general text corpora and therefore largely lack specific knowledge of online fraud. Furthermore, designing, training, and operating large language models requires significant investment in computational resources and expertise, making the development of such models specifically for fraud detection potentially cost-effective. Therefore, there has been ongoing interest in developing reliable, cost-effective, and user-friendly methods for combating online fraud using AI. Summary of the Invention
[0008] According to one aspect, a computer system includes at least one hardware processor configured to execute a chatbot, the chatbot being configured to output a determination in natural language indicating whether a received target message indicates fraud. The chatbot includes a prompt manager communicatively coupled to a generative language module (GLM). The GLM is configured to receive prompts in natural language from the prompt manager and, in response, output predicted tokens to the prompt manager, the predicted tokens including possible continuations of the received prompt. The prompt manager is configured to formulate the prompts to instruct the GLM to perform a fraud detection task based on the target message. The prompt manager is further configured to determine whether the predicted tokens include predetermined flag tokens, and, in response, if the predicted tokens include the flag tokens, to initiate the execution of a code segment, wherein execution of the code segment results in an update of the prompt. The prompt manager is further configured to transmit the updated prompt to the GLM and determine the determination based on the output generated by the GLM in response to the updated prompt.
[0009] According to another aspect, a computer-implemented fraud detection method includes employing at least one hardware processor to execute a chatbot configured to output a determination in natural language indicating whether a received target message indicates fraud. The chatbot includes a prompt manager communicatively coupled to a GLM (Guided Message Manager). The GLM is configured to receive prompts in natural language from the prompt manager and, in response, output predicted tokens to the prompt manager, the predicted tokens including possible continuations of the received prompt. Executing the prompt manager includes formulating the prompts to instruct the GLM to perform a fraud detection task based on the target message. Executing the prompt manager further includes determining whether the predicted tokens include predetermined flag tokens, and, in response, if the predicted tokens include the flag tokens, then executing a code segment, wherein executing the code segment results in an update of the prompt. Executing the prompt manager further includes transmitting the updated prompt to the GLM and determining the determination based on the output generated by the GLM in response to the updated prompt.
[0010] According to another aspect, a non-transitory computer-readable media storage instruction, when executed by at least one hardware processor of a computer system, causes the computer system to form a chatbot, the chatbot being configured to output a determination in natural language indicating whether a received target message indicates fraud. The chatbot includes a prompt manager communicatively coupled to a GLM. The GLM is configured to receive prompts in natural language from the prompt manager and, in response, output predicted tokens to the prompt manager, the predicted tokens including possible continuations of the received prompt. The prompt manager is configured to formulate the prompts to instruct the GLM to perform a fraud detection task based on the target message. The prompt manager is further configured to determine whether the predicted tokens include predetermined flag tokens, and, in response, if the predicted tokens include the flag tokens, to initiate the execution of a code segment, wherein execution of the code segment results in an update of the prompt. The prompt manager is further configured to transmit the updated prompt to the GLM and determine the determination based on the output generated by the GLM in response to the updated prompt. Attached Figure Description
[0011] The foregoing aspects and advantages of the invention will be better understood after reading the following detailed description and referring to the accompanying drawings, wherein:
[0012] Figure 1 Exemplary components of a system for preventing online fraud according to some embodiments of the present invention are shown.
[0013] Figure 2 Exemplary sequences of steps performed by a Generative Language Module (GLM) according to some embodiments of the present invention are shown.
[0014] Figure 3 Exemplary operation of the GLM according to some embodiments of the present invention is described.
[0015] Figure 4 The sequence of inference steps performed by GLM is shown according to some embodiments of the present invention.
[0016] Figure 5 Exemplary language model (LM) prompts are shown according to some embodiments of the present invention.
[0017] Figure 6 An exemplary instruction cache is shown that associates flag terms with LM instructions and code fragments according to some embodiments of the present invention.
[0018] Figure 7 Exemplary sequence of steps performed by the prompt manager module according to some embodiments of the present invention is shown.
[0019] Figure 8 Another exemplary sequence of steps, performed by the prompt manager, to update the LM prompt between successive inferences, according to some embodiments of the present invention, is shown.
[0020] Figure 9 This section describes exemplary alternative LM prompt changes corresponding to different outputs of generative language modules according to some embodiments of the present invention.
[0021] Figure 10 Alternative exemplary systems for preventing online fraud are demonstrated according to some embodiments of the present invention.
[0022] Figure 11 Exemplary logic hints are provided according to some embodiments of the present invention.
[0023] Figure 12 Another exemplary sequence of steps performed by the prompt manager according to some embodiments of the present invention is shown.
[0024] Figure 13 Exemplary hardware configurations of computer systems programmed to perform some of the methods described herein are shown.
[0025] Figure 14 This describes an exemplary dialog interface that enables the prevention of online fraud according to some embodiments of the present invention.
[0026] Figure 15 This section presents another example of a logical prompt designed to detect fake news, based on some embodiments of the invention.
[0027] Figure 16 Explanation of the process according to some embodiments of the present invention Figure 15 The exemplary evolution of LM hints resulting from logical hints in the text.
[0028] Figure 17 This presents another example of a logical prompt designed to detect bullying and / or hate speech, according to some embodiments of the invention.
[0029] Figure 18 Demonstrating the process according to some embodiments of the present invention Figure 17 The exemplary evolution of LM hints caused by logical hints in the text. Detailed Implementation
[0030] In the following description, it should be understood that all referenced connections between structures may be direct operational connections or indirect operational connections via intermediate structures. A set of elements comprises one or more elements. Any reference to an element should be understood to refer to at least one element. Multiple elements comprise at least two elements. Any use of 'or' implies non-exclusivity. Unless otherwise required, any described method steps do not necessarily need to be performed in the specific order stated. A first element derived from a second element (e.g., data) encompasses a first element equal to the second element, as well as a first element generated by processing the second element and optionally other data. Making a determination or decision based on parameters encompasses making a determination or decision based on parameters and optionally other data. Unless otherwise indicated, an indicator of quantity / data may be the quantity / data itself, or an indicator different from the quantity / data itself. A computer program is a sequence of processor instructions that performs a task. The computer program described in some embodiments of the invention may be a standalone software entity or a sub-entity (e.g., a subroutine, a library) of another computer program. The database or knowledge base described herein represents any organized, searchable collection of data. Computer-readable media encompasses non-transitory media, such as magnetic, optical, and semiconductor storage media (e.g., hard disk drives, optical disks, flash memory, DRAM), and communication links, such as conductive cables and fiber optic links. According to some embodiments, the present invention particularly provides a computer system comprising hardware (e.g., one or more processors) programmed to perform the methods described herein, and a computer-readable medium coded with instructions to perform the methods described herein.
[0031] The following description illustrates embodiments of the invention by way of example and not necessarily by way of limitation.
[0032] Figure 1Exemplary components and operation of a fraud prevention system according to some embodiments of the present invention are shown. The illustrated system includes a secure chatbot 10 communicatively coupled to a messaging system 14. Components of the chatbot 10 may be embodied as computer programs executing on a hardware processor of a computer system, such as a server computer system performing fraud prevention transactions with multiple client front-end devices, as described in detail below. However, those skilled in the art will recognize that some or all of the functionality of the chatbot 10 may also be implemented in dedicated hardware, such as a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC), or in a combination of hardware and software.
[0033] In some embodiments, chatbot 10 includes an artificial intelligence (AI) system configured to engage in dialogue (i.e., message exchange) with a user in a natural language (NL) (e.g., English or Chinese). Chatbot 10 may be further configured to determine whether a user faces a computer security threat, such as online fraud, malware, etc., based on the content of the corresponding dialogue. Alternatively or additionally, chatbot 10 may perform other services, such as automatic categorization of online content (e.g., detecting online advertising, fake news, and AI-generated content). Some embodiments of chatbot 10 are further configured to provide users with various other information, such as answering general questions and providing advice on various computer security topics, such as malware, spam, communication privacy, securing online payments, parental controls, etc. Chatbot 10 may further recommend that users purchase computer security software, manage users' subscriptions to various computer security services, answer billing questions, or in any other way act as a user-friendly interface between the user and the computer security service provider.
[0034] exist Figure 1 In the exemplary fraud prevention scenario described herein, a user may ask chatbot 10 whether a message he / she recently received might be fraudulent. Chatbot 10 may receive a copy of the corresponding message (described as exemplary target message 15), perform the fraud detection process described in detail below, and return a response message 16 including the results of the process to the user.
[0035] In some embodiments, the chatbot 10 interacts with a human user via a user interface displayed on the front-end device 12. Figure 1The exemplary front-end device 12 includes personal computers, laptop computers, tablet computers, mobile telecommunications devices (e.g., smartphones), media players, televisions, game consoles, home appliances (e.g., refrigerators, thermostats, smart heating and / or lighting systems), and wearable devices (e.g., smartwatches, sports and fitness equipment), etc. A basic user interface according to some embodiments includes a communication interface that enables a user to interact with the chatbot 10 in natural language, such as by asking questions, transmitting and / or requesting various data, and / or receiving the results of various computer security tasks. The exemplary communication interface described herein... Figure 16 The communication interface can be integrated with other computer security functions, such as a dashboard for configuring and displaying various security settings and / or for displaying the current security status of the front-end device 12. In exemplary embodiments, the user interface may display indicators such as whether device 12 contains malware, whether device 12 is currently connected to a Virtual Private Network (VPN), etc. Other exemplary content displayed by the respective user interface may include indicators of the status and / or details of the user account / Service Level Agreement (SLA) / subscription for using the secure chatbot 10 or other security software. The user interface described herein can be organized in any manner known in the art, such as including various visual elements (e.g., dials, meters, charts), each indicating the value of the current security settings and / or the value of the monitored quantity. Some visual aspects of the user interface may be customizable, such as the color scheme, location, and content of various screen areas.
[0036] In other exemplary embodiments, a user can interact with chatbot 10 via a communication interface of an online messaging application running on front-end device 12. Online messaging herein encompasses peer-to-peer messaging as well as messaging via public chat rooms, forums, social media websites, etc. Examples of online messaging include the exchange of Short Message Service (SMS) messages, email message sequences, and message sequences exchanged via instant messaging applications such as WhatsApp Messenger®, Telegram®, WeChat®, and Facebook® Messenger®. Other exemplary online messaging includes content on Facebook® Walls, chat on online forums such as Reddit® and Discord®, and a set of comments on blog posts. Exemplary online messaging applications according to embodiments of the invention include client-side examples of mobile applications such as WhatsApp®, Facebook®, Instagram®, and Snapchat®, and server-side software performing the corresponding messaging operations. Other examples of online messaging applications include examples of email clients and internet browsers.
[0037] For clarity, this description will focus on a communication interface that enables users to engage in natural language conversations via typing. In other words, the communication between the user and the secure chatbot 10 described herein is primarily in text form. However, those skilled in the art will appreciate that this aspect is not intended to be limiting. The described systems and methods are adaptable to handling any combination of audio messages (spoken conversations), video messages, or carrier media. In such embodiments, the chatbot 10 may be configured to directly process the corresponding type of input, or alternatively, to convert the type of user-provided input into text before applying some of the methods described herein. Furthermore, in some embodiments, the communication interface described herein allows users to attach various types of media files (e.g., images / screenshots, audio files, such as recorded voice messages, etc.) to text messages.
[0038] like Figure 1 Some embodiments described herein employ a messaging system 14 to transmit messages between front-end device 12 and secure chatbot 10. Messaging system 14 generally refers to any messaging and electronic communication functionality beyond the scope of this invention. For example, messaging system 14 may represent hardware and / or software implementing conventional electronic communication services, such as email services, short message services (SMS), and instant messaging services like WhatsApp®, iMessage®, and Microsoft Teams®. Messaging system 14 may, for example, aggregate messages from multiple front-end devices 12, route such messages, and / or selectively deliver such messages to their intended destinations. In some exemplary embodiments, front-end device 12 may invoke a local example of a conventional online messaging application to enable a user to send and / or receive messages 15 to 16 from device 12. Furthermore, chatbot 10 may transmit and / or receive corresponding messages via application programming interface (API) calls to remote network services exposed by messaging system 14. The messages themselves may be routed by messaging system 14 via a third-party server simultaneously between front-end device 12 and the computer implementing fraud prevention system 10.
[0039] The format of the actual data exchanged during messaging may vary depending on the messaging platform, protocol, and / or application, but generally, this may include the encoding of text and / or media files (e.g., images, movies, sound, etc.). The text portion may include text written in natural language, as well as other alphanumeric and / or special characters (e.g., emojis). The encoding of messages 15 and 16 may further include identifiers of the sender and receiver of the respective message, as well as a timestamp indicating the time of transmission of the respective message. This metadata enables the chatbot 10 to associate each message with an ongoing conversation and maintain the conversational context of each conversation, for example, by arranging messages sequentially according to their respective timestamps.
[0040] Some embodiments of chatbot 10 can maintain multiple concurrent conversations with various users on various topics. Internally, chatbot 10 can represent each conversation as a separate data structure (e.g., an object with multiple data fields) identified by a unique conversation ID. The conversation object can be defined according to any data standard known in its field and may contain a user ID identifying the front-end device 12 and / or the individual user of the corresponding device. The conversation object may further contain multiple message indicators, each corresponding to an individual message exchanged within the corresponding conversation. Each individual message indicator may further contain an identifier of the sender and / or receiver, the text content of the corresponding message, and a timestamp indicating the time of sending and / or receiving the corresponding message. In alternative embodiments, the conversation object may include a concatenation of the text content of all messages in the corresponding conversation, with individual messages arranged in the order of transmission according to their respective timestamps. The message indicators may further contain a set of media indicators, such as a copy of an image / video / audio file appended to the corresponding message, or the network address / URL of the corresponding media file. Some embodiments maintain a conversation active as long as the message count of the session does not exceed a predetermined value, as long as the time elapsed since its first message does not exceed a predetermined time threshold, and / or as long as the time elapsed since its latest message does not exceed another predetermined time threshold.
[0041] In order to engage in natural language conversations with human users, chatbot 10 ( Figure 1Some embodiments of the present invention include a generative language module (GLM) 40 to generate synthetic sentences, questions, and / or answers. GLM 40 includes implementations of computational models of natural language, such as a set of artificial neural networks pre-trained on a corpus of text formulated in the corresponding natural language. Exemplary language models include probabilistic n-gram grammar models, language models implemented using recurrent neural networks, and large language models (LLMs) implemented using generative pre-trained transformers (GPTs). Language module 40 is considered 'generative' herein because it is configured to take a sequence of words (e.g., a sentence or a question) as input and, in response, automatically generate another sequence of words (e.g., a reasonable continuation or reply) based on the input sequence of words. The structural and operational details of GLM 40 are beyond the scope of this invention. GLM 40 can be implemented using any method known in the field of artificial intelligence. In some embodiments, GLM 40 implements examples of pre-trained off-the-shelf LLMs, such as GPT-3 from OpenAI, LLaMA from MetaAI, and Mistral from Mistral AI.
[0042] GLM 40 operation in Figures 2 to 3 The explanation is as follows. For example... Figure 3 As typically shown, GLM 40 is configured to receive a language model (LM) cue 22 comprising the sequence of lemmas 24a to d, and in response, outputs a predicted lemma 26 determined by the LM cue 22, the predicted lemma 26 comprising possible continuations of the sequence of lemmas 24a to d from the LM cue 22. A set of computations performed by GLM 40 to produce individual predicted lemmas (excluding the LM initialization steps described below) is collectively represented herein as a single inference step. When the architecture of GLM 40 is based on a neural network, such computations may include matrix multiplication and evaluation of a set of activation functions, etc.
[0043] Exemplary tokens 24a to d and 26 may include individual words, but may also include numbers, punctuation marks, special characters, abbreviations, acronyms (e.g., LOL, ROFL), emoticons, and network addresses, Universal Record Identifiers (URIs), and URLs. Some tokens may contain multiple words, such as phrases. Some GLM 40s are further configured to input fragments of computer code. For example, individual tokens 24a to d and 26 may contain computer instructions, variable names and values, mathematical symbols, etc.
[0044] Figure 2 This document illustrates a sequence of steps performed by GLM 40 during a fraud detection process according to some embodiments of the present invention. The fraud detection process includes developing an initial LM hint, initializing GLM 40, and performing a sequence of inference steps until a termination condition is met. LM hint 22 may be updated between successive inference steps, as described in detail below.
[0045] In step 102 ( Figure 2 In this context, GLM 40 receives LM prompt 22. (The sentence appears to be incomplete and requires further context.) Figure 1 In some embodiments described herein, LM hints 22 are received from a hint manager module 30, the operation of which is described in detail below. Step 104 determines whether the current LM hint is an initial hint, and if so, step 106 initializes the GLM 40 in preparation for inference. Initialization may include operations such as memory allocation and loading necessary data structures into memory (e.g., a set of synaptic weights determined during training). A further step 108 may perform lexicalization of the LM hint 22, which includes decomposing the LM hint 22 into individual lexicals according to a predetermined vocabulary and rule set, and representing each lexical as a vector of numbers. In an exemplary embodiment, lexicalization may determine a one-hot encoding of an individual lexical, where each lexical is represented as an Nx1 binary vector, which is zero except for a 1 in the Mth row, where N is the size of the vocabulary (typically several thousand words / lexicals), and M is the position of the corresponding lexical in the vocabulary.
[0046] Next, step 110 computes the lexical embeddings of all lexical units of the initial LM prompt. In this context, embeddings represent the internal representation of an individual lexical unit, including a set of coordinates of the corresponding lexical unit in an abstract multidimensional space commonly referred to as the embedding space. The size (dimensionality) of a typical embedding space ranges from several thousand to tens of thousands. In an exemplary embodiment using a deep neural network, GLM 40 comprises a mezzanine structure of interconnected neural network layers. A first subset of these layers collectively operate as an encoder, taking each lexical unit of the LM prompt 22 as input and computes the embedding of the corresponding lexical unit, i.e., projecting each corresponding lexical unit into the embedding space. In a typical embodiment, step 110 includes a matrix multiplication between the numerical representation of the corresponding lexical unit determined in step 108 and a matrix of predetermined synaptic weights during training of GLM 40. In some embodiments, step 110 further determines the positional embedding indicating the location of each lexical unit 24a to d within the LM prompt 22.
[0047] After initialization, lexicalization, and embedding, GLM 40 iteratively traverses a series of consecutive inferences until a termination condition is met (step 114 returns "yes"). At each inference step, step 116 determines the predicted lexical units (see...). Figure 3 (Word 26 in the context). In embodiments using deep neural networks, another set of network layers of GLM 40 acts as a decoder, computing the predicted word 26 based on multiple word embeddings from LM cue 22. Such computing may again involve matrix multiplication of word embeddings with synaptic weights determined through training.
[0048] In some embodiments, the LM hint 22 is updated between successive inference steps, and a new loop begins from step 102. However, when the initial LM hint is not processed, some embodiments can save computational resources by reusing some of the lexical embeddings already computed in previous inference steps. Figure 2 As explained, when step 104 returns "No", step 112 may simply lexicalize and embed any new lexicals found in the LM prompt. Some embodiments further update the position embedding to reflect any changes in the position of individual lexicals within the LM prompt.
[0049] In such Figure 4 In the conventional language model application described herein, after each inference, a new LM hint is generated by appending the current predicted lexical to the previous LM hint. The new LM hint is then fed back into the language model for new inference. Thus, the exemplary LM hint can progressively evolve from version 22a to version 22e over four consecutive inference steps. The sequence of predicted lexical terms generated during the fraud detection process (e.g., Figure 4 The exemplary lexical sequences 26a to e) in this paper are considered as predicted lexical sequences 27.
[0050] In contrast to such conventional prompts, in some embodiments of the invention, the LM prompt 22 can be updated between successive inference steps in a manner that is different from, and potentially more substantial than, simply appending the currently predicted lexical. Exemplary modifications to the LM prompt 22 include inserting, replacing, and deleting selected lexicals. Lexicals can be inserted at various locations within the LM prompt 22, rather than at the end. Furthermore, the type of prompt modification (e.g., insertion, deletion) and the content (the actual inserted and / or deleted lexicals) are determined by computation performed outside the GLM itself. Some explicit examples are given below. Moreover, it is crucial that modifications to the LM prompt 22 are performed inline, i.e., on an already ingested prompt, without requiring the reinitialization of the GLM 40 (as opposed to submitting a completely new prompt and causing the GLM 40 to reinitialize). Thus, some embodiments attempt to extend the functionality of conventional chatbots and improve their performance while benefiting from the computational savings described above.
[0051] In some embodiments, the prompt manager 30 ( Figure 1The prompt manager 30 is configured to receive target message 15 and formulate initial LM prompts based on target message 15. The prompt manager 30 is further configured to feed LM prompts 22 to GLM 40, receive the output of GLM 40, and dynamically update prompts 22 based on received predicted terms 26. In some embodiments, dynamically updating LM prompts 22 encompasses the initial execution and the actual execution of a set of code snippets to modify LM prompts 22. The prompt manager 30 may be further configured to guide the execution of GLM 40, for example, by causing GLM 40 to perform one or more inference steps and / or by causing GLM 40 to pause execution at selected times / inference steps.
[0052] Figure 5 An example of an LM prompt 22f transmitted from the prompt manager 30 to the GLM 40 is shown. The prompt 22f contains at least a portion of a target message 15 received by the chatbot 10 as part of the current fraud detection process. The prompt 22f further contains a set of instructions 19 for the GLM 40, formulated in natural language. The instructions 19 instruct the GLM 40 to perform specific text processing and / or semantic analysis tasks on the corresponding target message. In a fraud detection application, the instructions 19 may require the GLM 40 to perform fraud detection-related tasks, such as determining whether the target message indicates fraud, determining whether the target message is a joke, determining the emotion of the target message (e.g., love, hate, anger, threat, etc.), formulating a summary of the target message, assigning the target message to one of a set of predetermined categories, and extracting various fraud-indicating characteristics of the corresponding target message (e.g., whether the message requests money or personal information, whether the message offers items for sale, etc.).
[0053] LM hint 22f further includes a set of flag words 29a to 29b. These flag words represent specific words whose presence in the output of GLM 40 (i.e., in the predicted word sequence 27) is detected and interpreted by the hint manager 30, as described in further detail below. Exemplary flag words include specific words, keywords, or character sequences (e.g., flag word 29b), specific word sequences, attribute-value pairs (e.g., flag word 29a), and tuples of attribute values, etc. In alternative embodiments, flag words may be identified based on whether they contain predetermined special characters (e.g., #, $, etc.). In some embodiments as illustrated, instruction 19 further instructs GLM 40 to output at least one indicated flag word in response to performing the indicated task or as part of performing the indicated task. Some flag words (e.g., ...) Figure 5 The lexical element 29b in the LM prompt can act as a placeholder or a hint within the prompt, indicating a specific location for future inline modifications of the corresponding LM prompt (e.g., the location of the lexical insertion as shown in the example below).
[0054] In some embodiments, detecting a flag word within the output of GLM 40 causes the prompt manager 30 to initiate execution of a specific code segment (i.e., a computer program) associated with the corresponding flag word. Figure 1 and 6 Some embodiments described herein include an instruction cache 32 that stores multiple code segments and maintains a mapping that associates code segments with flag words, thereby enabling selective identification of code segments based on flag words and / or vice versa. In a simple embodiment, each flag word 29c to d is mapped to at least one corresponding GLM instruction 19a to b. Such mapping may result in the insertion of a corresponding instruction into the LM hint in response to the detection of the associated flag word. For example, in Figure 6 In the example described, detecting the flag word 29d within the output of GLM 40 will cause instruction 19b to be inserted into the LM hint. Furthermore, in the example described, detecting the flag word 29d will further cause the execution of code snippets 3 and 4.
[0055] The code snippets described herein can be implemented using any process useful in detecting online fraud, ranging from simple text manipulation, such as inserting or deleting tokens from LM prompts, to extracting data from LM prompts and / or output token sequences 27 and combining such data with other fraud-indicating features of the text message, such as the sender's identity or address, the message's timestamp, indicators of whether the message contains hyperlinks, etc. The final determination can then be passed back to GLM40 along with instructions on generating explanations, user suggestions, information, etc., regarding the specific type of fraud.
[0056] Figure 7 An exemplary sequence of steps performed by a prompt manager 30 according to some embodiments of the present invention is shown. The sequence of steps 122 to 124 listens for and analyzes the incoming target message 15. When a message is received (step 124 returns "Yes"), in step 126, the prompt manager 30 may formulate an initial LM prompt based on the target message 15. Step 126 may include, for example, formulating an LM instruction 19 and inserting a set of flag words (see...). Figure 5The actual instructions and / or markers may depend on the type / category of the target message and / or may further vary based on message metadata, such as the identity of the sender and / or receiver of the corresponding message, timestamps, the receiver's geographic location, etc. Then, in some embodiments, the sequence of steps 128 to 134 may be repeatedly iterated until a termination condition is met. Exemplary termination conditions include reaching a predetermined count of inference steps (e.g., generating 200 consecutive predicted terms), generating a specific predicted term (e.g., a period '.'), etc. In some embodiments, termination may be induced by explicitly instructing GLM 40 to stop.
[0057] Steps 128 to 130 transmit LM hint 22 to generative language module 40 and initiate the execution of the inference steps. When the termination condition is met, the sequence of steps 136 to 138 can formulate and output response message 16, which may contain at least a portion of the currently predicted lexical sequence 27. When the result of the current fraud detection procedure indicates the likelihood of fraud, response message 16 may further include an explanation or description of the corresponding type of fraud, as well as a set of recommendations, instructions, and / or suggestions for the user on how to respond to or mitigate the corresponding threat. Conversely, when the target message is considered benign, response message 16 may include suggestions on how to avoid online fraud.
[0058] If the termination condition is not met (step 132 returns "No"), in step 134, the prompt manager 30 may update the LM prompt 22 based on the current output of GLM 40 (e.g., based on the current predicted term 26). Figure 8 This describes an exemplary sequence of steps performed by the prompt manager 30, which details the inline dynamic editing of the LM prompt 22. Figure 7 In step 134), in step 142, some embodiments append the current output of GLM 40 to LM cue 22. Step 144 may parse the predicted lexical sequence 27 to determine if any flag lexical is present. If no flag lexical is detected in the output of GLM 40 (step 146 returns "No"), then some embodiments will determine that the LM update is complete and effectively continue to... Figure 7 Step 128 in the process.
[0059] If the predicted term sequence 27 (i.e., the output of GLM 40) contains at least one flag term, then step 148 can identify at least one code segment based on the corresponding flag term, for example, by looking up instruction cache 32 (see above regarding...). Figure 6(Description of the above). Then, step 150 may initiate the execution of the identified code snippet. Step 150 may cover the actual execution of the corresponding code snippet and also transmit the request to execute the corresponding code snippet to another computing module, which may or may not be executed on the local machine. Calling such an external module may use any method known in the relevant field. In one such instance, the corresponding code snippet is executed remotely as a network service, in which case step 150 may include specifying an HTTP request to a URL specific to the corresponding code snippet. The corresponding HTTP request may include a set of parameter values extracted from and / or determined based on the current content of the predicted lexical sequence.
[0060] In step 152, the prompt manager 30 may formulate a set of supplementary lexical units for insertion into the LM prompt 22 based on the result of executing the identified code snippet. Exemplary supplementary lexical units may include a new set of LM instructions from the GLM 40, various parameter values calculated from the corresponding code snippet, and other flag lexical units, etc. Some examples are given below. Then, a further step 154 may insert the corresponding supplementary lexical units into the LM prompt 22. In some embodiments where the flag lexical units identified in step 144 act as placeholders, the supplementary lexical units are precisely inserted into the LM prompt 22 at the positions of the corresponding flag lexical units. In some embodiments, step 156 may then delete the corresponding flag lexical units and / or other lexical units (as indicated in the corresponding code snippet) from the predicted lexical sequence 27 and / or from the LM prompt 22.
[0061] Figures 7 to 8 The sequence of steps described herein enables various advanced computations to be performed using GLM 40, namely computations that would be impossible or unreliable if performed using only regular prompts that update LM prompts by the current output of the appended generative language module. For example, some code snippets stored in instruction cache 32 can jointly implement a decision tree via dynamic LM instructions 19.
[0062] Figure 9 This describes a basic implementation of the IF clause according to some embodiments of the present invention. More complex calculations can be implemented in a similar manner. The exemplary initial LM prompt 22g contains instructions for selectively outputting flag words 29c to d respectively, depending on whether the target message is fraudulent. As mentioned above regarding Figures 5 to 6As shown, exemplary marker element 29c (decision: 1) can be associated with LM instruction 19a, while marker element 29d (decision: 0) can be associated with LM instruction 19b. Therefore, in response to GLM 40 returning a decision: 1, the LM hint is updated from version 22g to version 22h, or in response to GLM 40 returning a decision: 0, it is updated from version 22g to version 22j, thus effectively implementing the IF clause. Then, LM hint 22h or 22j is resubmitted to GLM 40 as input for the next inference step.
[0063] The above disclosure primarily describes a fraud detection system in which a code snippet for manipulating LM prompt 22 is predetermined and preloaded into a secure chatbot 10. However, in alternative embodiments, the code snippet as described herein may be received as part of the input to the chatbot 10, such as... Figure 10 As described, the prompt creator module 18 packages the target message 15 together with a selected code snippet for performing a computer security process into a logical prompt 20 that is transmitted to the chatbot 10. In other words, the input to the chatbot 10 may contain computer code in the form of code snippets. However, contrary to conventional language model operations, the corresponding computer code is not passed to the language model, but is instead used by the prompt manager 30 to manipulate the LM prompt. In other words, in embodiments of the invention, the computer code contained in the logical prompt 20 is not intended to be interpreted or executed by the language model itself, but is instead used by the prompt manager 30 to perform inline dynamic editing of the input to the corresponding language model.
[0064] exist Figure 11 The illustration describes an exemplary logic hint 20a according to some embodiments of the present invention. Logic hint 20a includes code snippet 25, which includes computer code for dynamically updating LM hint 22. The illustrated code snippet implementation... Figure 9 The example fraud detection process is shown in the document. Segment 25 can be defined in any coding language or specification, such as bytecode, Python, or a version of Javascript. This could be in JSON or Extensible Markup Language (XML), etc. Alternatively, fragment 25 may contain location indicators (e.g., file path, network address, URL) for editing the computer program used to edit the LM prompt 22. Code fragment 25 can be separated from the rest of the logic prompt by specific tags. Figure 11 In the example, code snippet 25 is enclosed in...<llmi ...> Between the <\llmi ...> tags. Those skilled in the art will understand that the illustrated formatting is intended merely as an example and does not limit the scope of the invention.
[0065] Code snippet 25 can be developed and kept up-to-date by the computer security operator and stored in a code repository available to the prompt creator 18. Different code snippets can be developed for different types or categories of target messages, for different tasks (e.g., fraud detection and fake news detection), and for different users or user categories (e.g., based on service subscription, based on the corresponding user's geographic location, etc.).
[0066] Figure 12 An exemplary sequence of steps is shown, performed by a prompt manager 30 configured to receive logical prompts 20 in an embodiment. Steps 162 to 164 may listen for logical prompts 20. When a logical prompt is detected, in step 166, some embodiments initialize the LM prompt with a copy of the received logical prompt. Then, in a further step 168, the logical prompt 20 may be parsed to identify code snippets 25. For each code snippet, in step 172, some embodiments may save the corresponding code snippet to a code repository (e.g., instruction cache 32). Step 172 may additionally or alternatively create a pointer to the corresponding code snippet, thus enabling the prompt manager 30 to selectively trigger execution of the corresponding code snippet. Step 174 may associate the corresponding code snippet and / or pointer with a specific flag word, as indicated in the logical prompt 20. Then, in a further step 176, flag words may be inserted into the initial LM prompt 22 according to the logical prompt 20. Some flag words act as placeholders; in such cases, code snippets 25 may indicate the location for inserting the corresponding flag word. For example, some embodiments may replace code segment 25 within LM hint 22 with associated flag words. In other words, the corresponding flag words may be inserted into LM hint 22 at the position where segment 25 is located within logical hint 20. Alternative embodiments may not remove code segment 25 from LM hint 22, but instead include a set of instructions that cause GLM 40 to completely ignore the corresponding code segment.
[0067] When all code snippets in logic hint 20 have been processed (step 170 returns "No"), hint manager 30 may continue feeding the initial LM hint to GLM 40. Hint manager 30 may then iterate through the sequence of steps 178 to 184 for each of the multiple inference steps until a termination condition is met (e.g., until step 182 returns "Yes"). Step 180 may begin with individual inference steps performed by GLM 40, resulting in the output of predicted terms. If the termination condition is not met, then in step 184, hint manager 30 may update the LM hint based on the corresponding predicted terms. Execution of step 184 may include... Figure 8 The exemplary steps described above. When the termination condition is met, the sequence of steps 186 to 188 can be formulated and response message 16 can be output, for example, as described above regarding... Figure 7As described.
[0068] Figure 13 Exemplary hardware configurations of a computer system 80, programmed to perform some of the methods described herein, are shown. System 80 typically embodies various computing devices, such as... Figure 1 The front-end device 12 and the server computer system that executes the example of the secure chatbot 10 are described. The device described is a personal computer; other devices (such as servers, mobile phones, tablet computers, and wearable devices) may have slightly different configurations.
[0069] Processor 82 includes physical means (e.g., a microprocessor, a multi-core integrated circuit formed on a semiconductor substrate) configured to perform computational and / or logical operations using a set of signals and / or data. Such signals or data may be encoded in the form of processor instructions (e.g., machine code) and delivered to processor 82.
[0070] Processor 82 is typically characterized by an instruction set architecture (ISA), which specifies the corresponding processor instruction set (e.g., x86 family and ARM® family) and register size (e.g., 32-bit and 64-bit processors). The architecture of processor 82 can further vary depending on its intended primary use. While the central processing unit (CPU) is a general-purpose processor, the graphics processing unit (GPU) can be optimized for image / video processing and parallel computing (e.g., implementations of some neural network architectures). Processor 82 may further include application-specific integrated circuits (ASICs), such as the Tensor Processing Unit (TPU) from Google®, Inc., and Neural Processing Units (NPUs) from various manufacturers. TPUs and NPUs may be particularly well-suited for AI applications as described herein. For example, selected portions of the GLM 40 can execute on a GPU or an NPU.
[0071] Memory unit 83 may include volatile computer-readable media (e.g., dynamic random access memory - DRAM, GPU memory) that stores data / signal / instruction codes accessed or generated by processor 82 during operation. Input device 84 may include a computer keyboard, mouse, microphone, etc., and includes corresponding hardware interfaces and / or adapters that allow users to introduce data and / or instructions into computer system 80. Output device 85 may include a display device (e.g., monitor, speaker, etc.) and hardware interfaces / adapters, such as graphics cards, enabling the corresponding computing facility to transmit data to the user. In some embodiments, input and output devices 84 to 85 share common hardware (e.g., touchscreen). Storage device 86 includes computer-readable media that implements non-volatile storage, retrieval, and writing of software instructions and / or data. Exemplary storage devices include magnetic disks and optical disks and flash memory devices, as well as removable media, such as CDs and / or DVDs and drives. Network adapter 87 includes dedicated hardware that enables computer system 80 to connect to electronic communication networks and / or to other devices / computer systems for data transmission and reception.
[0072] Controller hub 90 typically represents multiple system, peripheral, and / or chipset buses, and / or all other circuitry that enables communication between processor 82 and the remaining hardware components of computer system 80. For example, controller hub 90 may include memory controllers, input / output (I / O) controllers, and interrupt controllers. Depending on the hardware manufacturer, some of these controllers may be incorporated into a single integrated circuit and / or integrated with processor 82. In another example, controller hub 90 may include a northbridge connecting processor 82 to memory 83, and / or a southbridge connecting processor 82 to devices 84, 85, 86, and 87.
[0073] The exemplary systems and methods described above enable the efficient use of AI systems (such as large language models (LLMs)) to perform complex professional tasks, such as protecting users from online fraud.
[0074] In contrast to many conventional anti-fraud solutions, some embodiments of the present invention employ chatbots to interact with users in a friendly, conversational manner. Chatbots can assist users with various tasks, such as determining if a user is under online threat (e.g., phishing), providing advice on computer security issues, and answering questions about subscriptions, accounts, bills, etc. In some embodiments, the chatbot mimics popular messaging or social media platforms. Users of [the relevant application] can therefore access it through the user interface of the corresponding application. Figure 14This describes a demonstrative user interface as described. In other words, users do not need to install or learn any new software to perform fraud analysis. Furthermore, users can submit questions and data related to any communication application or platform via a single chatbot interface. For example, users can use... Examples of applications related to anti-fraud chatbots are related to communication applications (e.g., Chatbots can interact with messages received via email clients, SMS, etc. They can automatically identify user needs, guide users to provide relevant data for analysis, and then relay the analysis results, explanations, recommendations, and suggestions back to the user to protect them from online fraud.
[0075] Chatbots implementing Large Language Models (LLMs) have rapidly become a popular technology solution for interacting with users in a variety of situations and applications. Advantages include extending the reach of the target technology to users lacking technical or computational backgrounds, and reducing operational costs by replacing human customer service operators with AI agents. Some advanced chatbots (such as those from OpenAI Inc.) These chatbots can answer computer security questions and analyze data to determine if a user is a target of a computer security threat. However, research shows that such chatbots sometimes provide incorrect or misleading answers, or their answers depend heavily on how the question is formulated. More importantly, their mastery of highly specific computer security questions is only as good as the training corpus they ingest. In other words, if the training corpus does not contain training instances relevant to a specific question or situation, the corresponding chatbot may not return the correct answer or assessment. This problem is particularly acute in the field of computer security, where the methods employed by malware and online scammers are constantly evolving. Therefore, generalized training corpora and methodologies are relatively unlikely to keep pace with the threat landscape.
[0076] In principle, pre-trained LLMs can be further trained to specifically address computer security problems, such as using specially constructed and maintained text corpora containing instances of online fraud, such as known phishing attempts delivered via email, SMS, and social media platforms. However, while such additional training may improve the performance of the corresponding LLM in detecting online fraud, training an LLM typically incurs enormous computational costs. Furthermore, additional training does not address a fundamental problem: LLMs are extremely complex systems, often with billions of tunable parameters, and their behavior is inherently opaque and unpredictable.
[0077] Current LLM-based chatbots have also been shown to be vulnerable to malicious manipulation, often referred to in the field as adversarial attacks. Typical examples involve carefully crafted inputs to the LLM to cause it to malfunction, such as producing incorrect output, unexpected output (also known as hallucinations), or no output at all.
[0078] In addition to the aforementioned drawbacks, several computer experiments have shown that typical LLM-based chatbots often fail to properly solve more complex problems and / or logical operations, such as navigating decision trees with many possible outcomes depending on the input content. Solving such problems in the conventional way involves including all instructions for navigating the decision tree (e.g., distinguishing all possible cases) in a single prompt. However, LLMs may fail to follow such complex instructions, primarily due to their limited attention span. For example, they may selectively and unpredictably follow instructions, leading to logically invalid, contradictory, or completely erroneous conclusions. Furthermore, some commercial LLM services charge based on the length of the prompt (i.e., the number of lexical units), so relatively long and complex prompts can incur significant costs.
[0079] Various workarounds have been proposed to address this problem. One exemplary strategy, known as cue linking, involves presenting the LLM with individual cue sequences, each cue formulated based on the LLM's response to previous cue. In a decision tree instance, each individual cue may represent a single branch or branch point. Such cuees can be dynamically generated based on the characteristics of the target text and the responses to previous cue. In other words, the decision-making process can preferably be guided along a specific path traversing the decision tree, where each step of the decision-making process is determined by the result of the previous step. However, in conventional cue linking, each successive cue is treated as a separate new submission, ultimately resulting in significant costs when the corresponding LLM is billed per cue.
[0080] In contrast to such conventional solutions, some embodiments are capable of dynamically inline updating the input to the corresponding language model. This allows a single prompt to be submitted to the LLM, and then progressively adjusted based on the LLM output, without requiring reinitialization of the entire language model. In one such instance, the initial formulation of the prompt may instruct the LLM to perform a first task. The prompt can then be inlined to instruct the LLM to perform another task selected based on the output of the first task. Conventional LLMs already perform inline updates of input prompts, typically by appending the latest LLM output to the existing input prompt. In contrast to this conventional prompt update, some embodiments update the input prompt more substantially, updating it within the corresponding prompt except at the end. Some portions of the prompt may be removed, while new content may be added. Furthermore, in embodiments, the content of such prompt modifications is determined based on the results of computations performed outside the LLM itself.
[0081] Some embodiments further submit a set of prompt editing instructions in the form of code snippets directly embedded in the chatbot prompts. While some conventional LLMs are capable of receiving, executing, and otherwise manipulating computer code, in embodiments of the invention, the code snippets embedded in the input prompts are not intended to be executed by the LLM itself, but are used to dynamically update the LLM prompts. In exemplary embodiments, a prompt manager, distinct from the computer module implementing the LLM, is responsible for executing the prompt editing instructions. The prompt manager may remove such code snippets from the input prompts before submitting the corresponding prompt to the LLM itself. Bundling LLM prompts with prompt editing instructions into a single logical prompt, as described herein, offers several advantages over conventional prompt management. For example, logical prompts improve portability and promote readability and code maintainability by keeping all resources in one place.
[0082] A substantial advantage of the systems and methods presented in this paper is their ability to solve problems involving complex computations and / or complex logical operations more efficiently than conventional methods that use multiple individual LLM hints. Primarily, they allow for the use of a single, relatively short LLM hint to solve such problems, which substantially reduces the financial and computational costs associated with using the corresponding LLM. For example, the proposed method allows the use of out-of-the-box, general-purpose, pre-trained LLMs to perform computations of arbitrary range and complexity, where the language and generalization capabilities of the LLM can be combined with additional computations performed by a hint manager and / or any other computational modules, software, or services. In one such instance aimed at preventing online fraud, an LLM can be used to extract a set of features or preliminary judgments about target text, which are then passed to dedicated anti-fraud software that generates a final judgment.
[0083] The significant reduction in computational cost achieved by embodiments of the present invention stems from avoiding the need to recompile the internal representations of individual lexical units in the LLM prompt. This relies on the observation that the inline updates described herein preserve most of the existing prompt lexical units (and thus most of the LLM's internal state). A typical prompt consists of hundreds or thousands of individual lexical units. As described herein, an inline update of a prompt can only change a few lexical units at a time, effectively representing a fraction of the entire LLM prompt. Therefore, once the LLM computes the internal representations / embeddings of the lexical units belonging to the initial LLM prompt, further changes to the corresponding prompt may only require a relatively small update to the internal LLM state. Conversely, submitting a completely new LLM prompt typically resets the entire internal state of the LLM, which may require recompiling hundreds or thousands of lexical embeddings. Other time and cost savings come from avoiding redundant data transfer between the LLM and other components of the system. Such savings can be significant when the LLM is accessed remotely, for example, as a network service.
[0084] While much of the above disclosure pertains to detecting online fraud, those skilled in the art will recognize that the described systems and methods are suitable for other applications beyond the traditional scope of computer security, such as detecting bullying, hate speech, fake news, and AI-generated content. Such embodiments may use a single, dynamically evolving LM cue to instruct the GLM 40 to perform a sequence of tasks specific to the respective application. The output of each task may be signaled via task-specific flag words. Each flag word may in turn trigger the execution of a word-specific code snippet, resulting in an inline update of the LM cue, as described in detail above.
[0085] Figure 15 and 16 This description illustrates an exemplary embodiment for determining whether target text contains fake news. Exemplary logic hint 20b contains a code snippet matching the @dprompt tag. In response to receiving hint 20b, hint manager 30 may formulate an initial LM hint 22k, which causes GLM 40 to perform a first fake news detection task (determining an initial judgment indicating whether the corresponding target text is likely fake news). Hint manager 30 then scans the output of GLM 40 (via predicted lexical sequence 27a) to find the flag lexical 'initial_verdict'. When GLM 40 evaluates initial_verdict to 1, manager 30 updates the LM hint from version 22k to version 22m, where some content in LM hint 22k is removed and a newline is inserted, instructing GLM 40 to perform another fake news detection task (determining whether the target text is likely a brochure or similar). The code snippet included in logic hint 20 further replaces the lexical 'initial_verdict: 1' with 'verdict: 1'. Then, Manager 30 triggers GLM 40 to perform a new inference step and scans for the new flag eponym 'fp_pamphlet' within the output of GLM 40. Item 22n illustrates an exemplary evolution of the LM hint when GLM 40 evaluates 'fp_pamphlet' to 0.
[0086] Figures 17 to 18 Another exemplary application illustrating the described system and method for detecting bullying and / or hate speech is provided. In such embodiments, the secure chatbot 10 may be used as an online moderator to analyze the content of online conversations, social media walls, etc. In another exemplary embodiment, the messaging system 14 may incidentally extract the content of online conversations conducted by vulnerable parties (e.g., children, members of minority groups, etc.) and transmit the corresponding content to the chatbot 10 for analysis. The identification of bullying based on the corresponding conversation may trigger an alarm, such as transmitting a warning to parents, teachers, etc.
[0087] Figure 17 The exemplary logic hint 20c contains a code snippet between matching @dprompt lexicons, and the code snippet indicates that GLM 40 selectively outputs exemplary flag lexicons 29e to g based on the results of various corresponding tasks. Figure 18 Demonstrating the processing according to some embodiments of the present invention Figure 17 The exemplary evolution of the LM prompt caused by logical prompt 20c is described below. In response to receiving prompt 20c, prompt manager 30 may formulate an initial LM prompt 22p, which causes GLM 40 to perform a first hate speech detection task (determining an initial judgment indicating whether the corresponding target text is obscene and harmful). Prompt manager 30 then scans the output of GLM 40 (after predicting the lexical sequence 27d) to find the flag lexical 29e. When GLM 40 evaluates assessment_obscene_harmful to 1, manager 30 updates the LM prompt from version 22p to version 22q, where some content of LM prompt 22p is removed and a new line is inserted, instructing GLM 40 to perform another hate speech detection task (determining whether the target text is appropriate). Manager 30 then triggers GLM 40 to perform a new inference step and scans for new flag lexical 29g within the output of GLM 40. Item 22r illustrates an exemplary version of the LM prompt when GLM 40 evaluates 'fp_decent' to 0.
[0088] It will be apparent to those skilled in the art that the above embodiments can be modified in various ways without departing from the scope of the invention. Therefore, the scope of the invention should be determined by the appended claims and their legal equivalents.
Claims
1. A computer system comprising at least one hardware processor configured to execute a chatbot, the chatbot being configured to output a determination in natural language indicating whether a received target message indicates fraud, the chatbot including a prompt manager communicatively coupled to a generative language module (GLM), wherein: The GLM is configured to: Receive prompts specified in the natural language from the prompt manager, and In response, predicted terms are output to the cue manager, the predicted terms including possible continuations of the received cue; and The prompt manager is configured to: The prompt is designed to instruct the GLM to perform a fraud detection task based on the target message. Determine whether the predicted lexical unit includes the predetermined marker lexical unit. In response, if the predicted term includes the flag term, then the starting code snippet is executed, wherein executing the code snippet results in an update of the prompt. The updated prompt is transmitted to the GLM, and The determination is made based on the output generated by the GLM in response to the updated prompt.
2. The computer system of claim 1, wherein the prompt manager is configured to formulate the prompt to instruct the GLM to determine whether the target message indicates fraud.
3. The computer system of claim 2, wherein the prompt manager is configured to formulate the prompt to further instruct the GLM to output the flag word in response to the GLM determining that the target message indicates fraud.
4. The computer system of claim 3, wherein the prompt manager is configured to formulate the prompt to further instruct the GLM to output another predetermined flag word in response to the GLM determining that the target message does not indicate fraud.
5. The computer system according to claim 1, wherein: The prompt manager is configured to further include placeholder words in the prompt; and The update of the prompt includes inserting a set of supplementary lexical units into the prompt at the position of the placeholder lexical unit.
6. The computer system of claim 1, wherein the update of the prompt includes an action selected from a group consisting of inserting a plurality of supplementary morphemes into the prompt and deleting a set of morphemes from the prompt.
7. The computer system of claim 1, wherein the update of the prompt includes inserting a supplementary lexical sequence into the prompt, the supplementary lexical sequence instructing the GLM to insert another predetermined marker lexical into the prompt.
8. The computer system according to claim 1, wherein: The prompt manager is configured to formulate the prompts, instructing the GLM to output the flag words based on the results of the fraud detection task; and The update indicated in the prompt instructed the GLM to perform another fraud detection task.
9. The computer system of claim 1, wherein the prompt manager is configured to select the code segment from a plurality of predetermined code segments based on the flag morphemes.
10. The computer system of claim 1, wherein the marker morpheme comprises attribute-value pairs.
11. A computer-implemented fraud detection method comprising employing at least one hardware processor of a computer system to execute a chatbot, the chatbot being configured to output a determination in natural language indicating whether a received target message indicates fraud, the chatbot including a prompt manager communicatively coupled to a generative language module (GLM), wherein: The GLM is configured to: Receive prompts specified in the natural language from the prompt manager, and In response, predicted terms are output to the cue manager, the predicted terms including possible continuations of the received cue; and Executing the prompt manager includes: The prompt is designed to instruct the GLM to perform a fraud detection task based on the target message. Determine whether the predicted lexical unit includes the predetermined marker lexical unit. In response, if the predicted term includes the flag term, then the starting code snippet is executed, wherein executing the code snippet results in an update of the prompt. The updated prompt is transmitted to the GLM, and The determination is made based on the output generated by the GLM in response to the updated prompt.
12. The method of claim 11, wherein executing the prompt manager includes formulating the prompt to instruct the GLM to determine whether the target message indicates fraud.
13. The method of claim 12, wherein executing the prompt manager includes formulating the prompt to further instruct the GLM to output the flag word in response to the GLM determining that the target message indicates fraud.
14. The method of claim 13, wherein executing the prompt manager includes formulating the prompt to further instruct the GLM to output another predetermined flag word in response to the GLM determining that the target message does not indicate fraud.
15. The method according to claim 11, wherein: Executing the prompt manager includes specifying the prompt to further include placeholder words; and The update of the prompt includes inserting a set of supplementary lexical units into the prompt at the position of the placeholder lexical unit.
16. The method of claim 11, wherein the updating of the prompt includes an action selected from a group consisting of inserting a plurality of supplementary words into the prompt and deleting a set of words from the prompt.
17. The method of claim 11, wherein the update of the prompt includes inserting a supplementary lexical sequence into the prompt, the supplementary lexical sequence instructing the GLM to insert another predetermined marker lexical into the prompt.
18. The method according to claim 11, wherein: Executing the prompt manager includes formulating the prompt to instruct the GLM to output the flag words based on the results of the fraud detection task; and The update indicated in the prompt instructed the GLM to perform another fraud detection task.
19. The method of claim 11, wherein the prompt manager is configured to select the code segment from a plurality of predetermined code segments based on the flag morphemes.
20. The method of claim 11, wherein the marker terminology comprises attribute-value pairs.
21. A non-transitory computer-readable medium storing instructions, when executed by at least one hardware processor of a computer system, to cause the computer system to form a chatbot, the chatbot being configured to output a determination in natural language indicating whether a received target message indicates fraud, the chatbot including a prompt manager communicatively coupled to a generative language module (GLM), wherein: The GLM is configured to: Receive prompts specified in the natural language from the prompt manager, and In response, predicted terms are output to the cue manager, the predicted terms including possible continuations of the received cue; and The prompt manager is configured to: The prompt is designed to instruct the GLM to perform a fraud detection task based on the target message. Determine whether the predicted lexical unit includes the predetermined marker lexical unit. In response, if the predicted term includes the flag term, then the starting code snippet is executed, wherein executing the code snippet results in an update of the prompt. The updated prompt is transmitted to the GLM, and The determination is made based on the output generated by the GLM in response to the updated prompt.