drorrabin commited on
Commit
e240f7b
·
verified ·
1 Parent(s): 43bbba3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -24
README.md CHANGED
@@ -1,24 +1,52 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: text
5
- dtype: string
6
- - name: email_type
7
- dtype: string
8
- splits:
9
- - name: train
10
- num_bytes: 20821235
11
- num_examples: 26946
12
- - name: test
13
- num_bytes: 3307336
14
- num_examples: 3705
15
- download_size: 12901354
16
- dataset_size: 24128571
17
- configs:
18
- - config_name: default
19
- data_files:
20
- - split: train
21
- path: data/train-*
22
- - split: test
23
- path: data/test-*
24
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```markdown
2
+ # 🛡️ Phishing Email Classification Dataset
3
+
4
+ This dataset is curated for fine-tuning LLMs on the task of phishing email detection. It originates from [this Kaggle dataset](https://www.kaggle.com/datasets/subhajournal/phishingemails) and has been transformed to better suit LLM-based classification tasks.
5
+
6
+ ## 📦 Dataset Features
7
+
8
+ - Each row is a labeled email, with either:
9
+ - `safe email` (label = 0)
10
+ - `phishing email` (label = 1)
11
+ - The dataset includes metadata (sender, receiver, date, subject) and cleaned email body.
12
+ - Two main columns:
13
+ - `Email Text`: Complete formatted text including metadata and message content.
14
+ - `label`: Binary label indicating if the email is phishing.
15
+
16
+ ## 🧠 LLM Fine-Tuning Ready
17
+
18
+ Processed using a `phishing_items.py` parser:
19
+ - Truncates or filters emails based on token limits for LLM input (between 30 and 250 tokens).
20
+ - Builds classification prompts in the format:
21
+
22
+ ```
23
+ Is the following email safe or phishing??
24
+
25
+ [email content]
26
+
27
+ Email type is: [safe email/phishing email]
28
+ ```
29
+
30
+ - Optimized for models such as `meta-llama/Meta-Llama-3.1-8B`.
31
+
32
+ ## 🧼 Preprocessing Highlights
33
+
34
+ - Removes non-informative characters (e.g., `=`, `>`, `\`) and extra whitespace.
35
+ - Tokenized with Hugging Face's `AutoTokenizer`.
36
+ - Discards overly short emails (under 120 characters or under 30 tokens).
37
+
38
+ ## 🗂️ Example Usage
39
+
40
+ ```python
41
+ from phishing_items import Item
42
+
43
+ item = Item(data_row)
44
+ if item.include:
45
+ print(item.prompt)
46
+ ```
47
+
48
+ ## 📚 Source
49
+
50
+ - Original dataset: [Kaggle - Phishing Emails](https://www.kaggle.com/datasets/subhajournal/phishingemails)
51
+ - Transformed by: [your GitHub or Hugging Face handle]
52
+ ```