Update README.md
Browse files
README.md
CHANGED
|
@@ -1,24 +1,52 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 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 |
+
```
|