The problem
An AI phishing email detector using Claude Fable 5.2 is a desktop/web tool that takes a pasted email — headers, body, links and attachment names — and returns a verdict of phishing, suspicious or legitimate, with a 0–100 risk score, six per-signal scores and a plain-English explanation. It pairs a small local rule-based pre-screen with Claude Fable 5.2, released on 9 November 2026, combining fast deterministic checks with a model that reads intent, tone and deception. Phishing remains one of the cheapest ways into an account: one convincing fake bank or invoice email can trick a user into handing over an OTP or opening a malicious attachment. Blacklist filters miss freshly registered lookalike domains and newly worded lures. A language model reads the email the way a careful human would — checking the sender domain, the link destination and the manufactured urgency — and explains its reasoning in plain language.
Paste the full email with headers, body and links into the web app.
Follow the working sequence
How it works
A pasted email travels through two stages before a verdict appears: a fast local pre-screen, then a Claude Fable 5.2 reasoning pass. The user pastes the email — From, subject, body, headers and attachment names — or loads a sample. The pre-screen extracts the sender domain and every link, scans for urgency and threat phrases, flags risky attachment extensions such as .exe or .zip, and compares any brand name against that brand's real domain, producing six signal scores in the browser. Those scores and the raw email are then sent to Claude Fable 5.2 through the Anthropic Messages API with a structured prompt asking for a verdict and a plain-English explanation. The model weighs the link-domain match, the manufactured urgency and any request for card details or an OTP, then returns structured JSON. The app merges both into one 0–100 risk score, renders the verdict, per-signal bars and explanation, and logs the analysis with its estimated token cost.
- The user pastes an email (From, subject, body, headers, attachment names) into the web app, or loads one of the three built-in samples.
- The local pre-screen extracts the sender domain and every link, and checks the sender against a 48-domain known-safe list.
- Six deterministic rules score the email 0–100 per signal: sender domain, link-domain mismatch, urgency and threat language, attachment risk, spoofing signals and brand impersonation.
- The email plus the pre-screen scores are sent to Claude Fable 5.2 (claude-fable-5-2) via the Anthropic Messages API with a structured verdict prompt.
- The model returns structured JSON: verdict (phishing / suspicious / legitimate), per-signal reasoning and a plain-English explanation.
- The app combines the pre-screen and model output into a weighted 0–100 risk score and renders the verdict, per-signal bars, explanation and estimated API cost.
- The analysis is saved to the session history, and the user can adjust the safe-domain list or re-run with edited text.
- For evaluation, the same pipeline is run over a held-out slice of the phishing-email corpus and scored with precision, recall, F1-score and a confusion matrix.
Tech stack:
- Claude Fable 5.2 API
- Python 3
- Flask
- HTML · CSS · JavaScript
- Kaggle phishing-email dataset
- scikit-learn metrics
- REST API integration
- Git
Dataset & model details
- Dataset: Phishing Email Dataset by Naser Abdullah Alam (Kaggle) — approximately 82,500 emails combining Enron, Ling, CEAS-08, Nazario, Nigerian Fraud and SpamAssassin sources; approximately 42,891 phishing/spam emails and approximately 39,595 legitimate emails.
- Task: Binary email classification with explanation; input = sender address, subject, body text, links and attachment names; output = verdict (phishing / suspicious / legitimate) + per-signal scores + plain-English explanation.
- Model: Claude Fable 5.2 via the Anthropic Messages API (model ID claude-fable-5-2; 1M-token context window; up to 128K output tokens), prompted for structured JSON verdicts; plus a local 6-rule deterministic pre-screen with a 48-domain known-safe list.
- Metrics: Precision, recall, F1-score and confusion matrix on a held-out test split; per-signal agreement between the pre-screen and the model verdict is reported separately. Development target: approximately 90% F1-score on the held-out split (target, not a measured claim). No accuracy is claimed as measured until the evaluation run is executed for the order.
| Parameter | Value |
|---|---|
| Model | Claude Fable 5.2 (API model ID claude-fable-5-2) |
| Model release | 9 November 2026 (Anthropic) |
| Context window | 1,000,000 tokens (Anthropic documented) |
| Maximum output | 128,000 tokens (Anthropic documented) |
| API pricing | $8 input / $40 output per 1,000,000 tokens (Anthropic, November 2026) |
| Risk score range | 0–100 (unitless score) |
| Verdict thresholds | 70+ = phishing; 40–69 = suspicious; below 40 = legitimate |
| Signals scored | 6 signals per email |
| Known-safe domains | 48 domains in the demo list (editable) |
| Dataset size | Approximately 82,500 emails |
| Evaluation split | 80% train / 10% validation / 10% test (design choice) |
| Maximum email input | Approximately 10,000 characters per email (design limit) |
| Typical analysis time | Approximately 5–10 seconds per email (expected, API-dependent) |
| Demo mode | Simulated Claude analysis, runs offline in the browser |
Project features
The detector's three strongest capabilities are its six-signal scoring, its plain-English explanations and its offline-capable local pre-screen. Six-signal scoring breaks every email into sender domain, link-domain mismatch, urgency and threat language, attachment risk, spoofing signals and brand impersonation, each scored 0–100 and combined into a single 0–100 risk score, so a student can show exactly which signal drove the verdict instead of hiding behind one opaque number. Plain-English explanations translate those scores into sentences a non-technical user can act on — which link is wrong, which phrase is a threat, what to do next. The local pre-screen runs six deterministic rules plus a known-safe domain list entirely in the browser, so obvious fakes are flagged before any API call is spent. A verdict history, an editable safe-domain list, a per-email API cost display and three one-click sample emails complete the build.
- [Six-signal risk scoring] Every email is scored 0–100 on sender domain, link-domain mismatch, urgency and threat language, attachment risk, spoofing signals and brand impersonation, combined into one weighted 0–100 risk score with verdict thresholds of 70+ phishing, 40–69 suspicious and below 40 legitimate.
- [Claude Fable 5.2 analysis] The pasted email is sent to Anthropic's Claude Fable 5.2 (model ID claude-fable-5-2, 1M-token context) with a structured prompt asking for a verdict, per-signal reasoning and a plain-English explanation.
- [Local rule-based pre-screen] Six deterministic rules plus a 48-domain known-safe list run in the browser first: sender-domain lookup, link-domain vs sender-domain comparison, urgency keyword scan, risky attachment-extension check, generic-greeting and secret-keeping detection, and brand-name vs domain comparison.
- [Plain-English explanation] Each verdict ships with bullet-point reasons naming the exact offending link, phrase or attachment, plus a recommended next step — delete and report, verify through the official app, or act normally.
- [Three one-click sample emails] A fake HDFC Bank suspension alert, a suspicious overdue-invoice email with a ZIP attachment, and a genuine Amazon.in delivery confirmation load instantly so the detector can be demonstrated without typing anything.
- [Per-email API cost display] The app estimates input tokens from the pasted text and shows the approximate API cost at Anthropic's published $8 input / $40 output per 1M tokens, so running costs are visible before every call.
- [Analysis history and safe-domain list] Past analyses are kept in a session history with verdict and score, and the known-safe domain list is editable so a college or company can add its own trusted domains.
What is included
- Complete detector web app (Flask backend + HTML/CSS/JS frontend) with the Claude Fable 5.2 integration
- Local 6-rule pre-screen with the editable 48-domain known-safe list
- Three built-in sample emails (phishing, suspicious, legitimate) for live demonstration
- Evaluation notebook: dataset loading, held-out split, precision/recall/F1 and confusion matrix
- Project report PDF (background, phishing tactics, Claude prompting design, methodology, evaluation procedure)
- PPT presentation for final review
- Viva Q&A preparation document (phishing signals, LLM prompting, API costs, evaluation metrics)
Limitations & prerequisites
- Verdicts are advisory, not a guarantee — a novel phishing style can score below the phishing threshold, and a badly worded genuine email can score as suspicious.
- The Claude API needs a valid Anthropic API key and internet access; only the local pre-screen works offline, and API calls are billed at $8 input / $40 output per 1M tokens.
- The evaluation corpus is historical (Enron, Nazario, SpamAssassin and related sources), so it under-represents the newest phishing templates and QR-code (quishing) attacks.
- Attachments are judged by file name and extension only — the build does not open, scan or sandbox attachment contents.
- The 90% F1-score figure is a development target, stated honestly — the report documents the actual achieved figure after the evaluation run.
- Emails pasted into the tool are sent to Anthropic's API under its 30-day data-retention requirement for Fable 5.2, so real inboxes should not be pasted without consent.
- The demo ships with simulated Claude analysis so it runs without a key; the live build requires the key to be configured.
Frequently Asked Questions
Is this project suitable for a final-year project?
Yes — for Computer Science, IT and AI & Machine Learning programs. It demonstrates LLM API integration, prompt design for structured output, rule-based pre-processing, evaluation with precision/recall/F1, and a working security tool with a clear real-world use, plus a demo that shows the whole pipeline live.
Which dataset is used and how big is it?
The Kaggle Phishing Email Dataset by Naser Abdullah Alam, approximately 82,500 emails assembled from Enron, Ling, CEAS-08, Nazario, Nigerian Fraud and SpamAssassin sources, with approximately 42,891 phishing/spam and approximately 39,595 legitimate emails. It is split 80/10/10 for training, validation and testing.
Why Claude Fable 5.2 instead of a smaller model?
Fable 5.2 is Anthropic's newest general model, released 9 November 2026, with a 1M-token context window and strong reasoning for reading deception and intent in text. A smaller model can classify keywords, but phishing detection needs the model to weigh contradictory evidence — a real brand name against a wrong domain — which is where the larger model earns its cost.
Does it work without internet or an API key?
Partly. The local pre-screen — six rules plus the 48-domain safe list — runs entirely in the browser and needs no key or connection. The Claude analysis step needs internet and a valid Anthropic API key, billed at $8 input / $40 output per 1M tokens; the demo simulates that step so it runs offline.
How much does each analysis cost?
Very little for single emails. A typical pasted email is a few hundred input tokens, so at $8 per 1M input tokens and $40 per 1M output tokens one analysis costs a fraction of a US cent. The app shows the estimated cost for every email before the call is made.
Can it catch phishing styles it has never seen?
Better than a blacklist can, because the model reasons about deception rather than matching known templates — a new lookalike domain or a fresh urgency script still triggers the link-mismatch and urgency signals. But no detector is perfect, which is why the output is a risk score with an explanation rather than a yes/no guarantee.
Components & software requirements
- Claude Fable 5.2 API
- Python 3
- Flask
- HTML · CSS · JavaScript
- Kaggle phishing-email dataset
- scikit-learn metrics
- REST API integration
- Git
Dataset & model details
- Dataset: Phishing Email Dataset by Naser Abdullah Alam (Kaggle) — approximately 82,500 emails combining Enron, Ling, CEAS-08, Nazario, Nigerian Fraud and SpamAssassin sources; approximately 42,891 phishing/spam emails and approximately 39,595 legitimate emails.
- Task: Binary email classification with explanation; input = sender address, subject, body text, links and attachment names; output = verdict (phishing / suspicious / legitimate) + per-signal scores + plain-English explanation.
- Model: Claude Fable 5.2 via the Anthropic Messages API (model ID claude-fable-5-2; 1M-token context window; up to 128K output tokens), prompted for structured JSON verdicts; plus a local 6-rule deterministic pre-screen with a 48-domain known-safe list.
- Metrics: Precision, recall, F1-score and confusion matrix on a held-out test split; per-signal agreement between the pre-screen and the model verdict is reported separately. Development target: approximately 90% F1-score on the held-out split (target, not a measured claim). No accuracy is claimed as measured until the evaluation run is executed for the order.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.