7 Detecting phishing with LLM
This chapter covers
- Using deep learning to detect email phishing
- How does ChatGPT work? How to use it for phishing detection
- Using HuggingFace to access state-of-the-art LLMs
- Using LangChain to detect phishing with any LLM
- Building a phishing detection app using Gradio
. ChatGPT will be remembered as an important turning point in the way we interface with AI in the 21st century. At a high level, it is a chatbot to make conversations with. It can understand and generate human-like text. Anyone (with an email ID) can sign up to access the free version at https://chat.openai.com/. I asked ChatGPT a question – Can we eliminate fraud from this world? And, as you can see in figure 7.1, it generates a detailed answer identifying the challenges in completely eradicating fraud as well as providing foundational measures needed to combat fraud which includes using AI (machine learning) - something this book is all about.
ChatGPT is powered by a deep learning model – a transformer model to be precise – a generative pre-trained transformer (GPT) model to be more precise. The model is trained on huge volumes of text from all over the internet with the objective of language modeling - the task of figuring out the next word given a preceding sequence of words. This is why models like GPT are categorized as large language models (LLMs) - large representing the immense volume of data the model is trained on.