Icon

LLM Fraud_​detection - Prompting

Asking LLM if there is any potentially suspicious activity and 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.

Too many rows for demo

Take a sample

Optionally, save vector store and load up later. To load up, specify the path and connect the 'Model Reader to the 'Vector Store Retriever'
Right Click -> 'Interactive View'to view LLM's answer in column 'Response'
OpenAI Authenticator
OpenAI LLM Connector
Table View (JavaScript)
CSV Reader
Save the reference emailsin the vector DB
FAISS Vector Store Creator
Model Writer
LLM Prompter
OpenAI Embeddings Connector
Gather similar emailsfor each selected-emailfrom the reference email set
Vector Store Retriever
Model Reader
String Manipulation
String Manipulation
Create Text Prompt:Combine email textswith prompt
String Manipulation
Row Sampling
OPENAI_API_KEY(Set 'Password' in node settings,can leave 'Username' blank)
Credentials Configuration
Column Filter
If there is no emailbody, the emailis removed.
Missing Value

Nodes

Extensions

Links