Icon

3. Fraud_​detection-Prompting_​OpenAI

Asking LLM if there is any potentially suspicious activityand why. Detecting Suspicious Activity: LLM Prompt + Comparison to Other EmailsHere, we split up our emails into two sets, based on which were selected by the user: - Selected emails -> Perform fraud detection - Non-selected emails -> The 'reference group'. (We will compare the selected emails to these as a way to detect suspicious activity, the assumption being that these are 'good' emails). The full process is as follows:We store the non-selected emails (reference emails) in the vector database. This will generate and store the embeddings (along with the email text) in the vector database, behind-the-scenes. Then, for each of the selected emails, we find a small set of similar emails from the vector database (i.e. the non-selected reference set).Now that we have all of the selected emails along with some other similar emails (for each), we then create an LLM prompt with all this information. We provide the LLM with the selected email, along with similar emails, and ask the LLM something roughly like "Please tell me if and what suspicious activity there is in this specific email text, where these other emails have been deemed as acceptable".The LLM will generate an answer, which can then be read in the final output table. Select emailsRight click -> InteractiveView, Select some rows thenclick 'Apply' Optionally, save vector store and load up later. To loadup, specify the path and connect the 'Model Reader tothe 'Vector Store Retriever' Right Click ->'InteractiveView'to view LLM's answer incolumn 'Response' Node 3Node 899Node 900Save the reference emailsin the vector DBGather similar emailsfor each selected-emailfrom the reference email setNode 904Node 905Node 923Node 924Node 925Take onlyNON user-selectedrowsTake onlyuser-selectedrowsNode 928Create Text Prompt:Combine email textswith promptNode 931Node 932User canselect whichemails toanalyseIf there is no emailbody, the emailis removed. OPENAI_API_KEY(Set 'Password' in node settings,can leave 'Username' blank)Node 986 Local File BrowserConfiguration OpenAI LLMConnector OpenAIAuthenticator FAISS VectorStore Creator Vector StoreRetriever OpenAI EmbeddingsConnector String Manipulation LLM Prompter Model Writer Model Reader Rule-basedRow Filter Rule-basedRow Filter String Manipulation String Manipulation Column Filter Table View(JavaScript) Table View(JavaScript) Missing Value CredentialsConfiguration PST Reader Asking LLM if there is any potentially suspicious activityand why. Detecting Suspicious Activity: LLM Prompt + Comparison to Other EmailsHere, we split up our emails into two sets, based on which were selected by the user: - Selected emails -> Perform fraud detection - Non-selected emails -> The 'reference group'. (We will compare the selected emails to these as a way to detect suspicious activity, the assumption being that these are 'good' emails). The full process is as follows:We store the non-selected emails (reference emails) in the vector database. This will generate and store the embeddings (along with the email text) in the vector database, behind-the-scenes. Then, for each of the selected emails, we find a small set of similar emails from the vector database (i.e. the non-selected reference set).Now that we have all of the selected emails along with some other similar emails (for each), we then create an LLM prompt with all this information. We provide the LLM with the selected email, along with similar emails, and ask the LLM something roughly like "Please tell me if and what suspicious activity there is in this specific email text, where these other emails have been deemed as acceptable".The LLM will generate an answer, which can then be read in the final output table. Select emailsRight click -> InteractiveView, Select some rows thenclick 'Apply' Optionally, save vector store and load up later. To loadup, specify the path and connect the 'Model Reader tothe 'Vector Store Retriever' Right Click ->'InteractiveView'to view LLM's answer incolumn 'Response' Node 3Node 899Node 900Save the reference emailsin the vector DBGather similar emailsfor each selected-emailfrom the reference email setNode 904Node 905Node 923Node 924Node 925Take onlyNON user-selectedrowsTake onlyuser-selectedrowsNode 928Create Text Prompt:Combine email textswith promptNode 931Node 932User canselect whichemails toanalyseIf there is no emailbody, the emailis removed. OPENAI_API_KEY(Set 'Password' in node settings,can leave 'Username' blank)Node 986 Local File BrowserConfiguration OpenAI LLMConnector OpenAIAuthenticator FAISS VectorStore Creator Vector StoreRetriever OpenAI EmbeddingsConnector String Manipulation LLM Prompter Model Writer Model Reader Rule-basedRow Filter Rule-basedRow Filter String Manipulation String Manipulation Column Filter Table View(JavaScript) Table View(JavaScript) Missing Value CredentialsConfiguration PST Reader

Nodes

Extensions

Links