Skip to content

Selected work

Projects I've built & shipped

From production dashboards and automation tooling to small products I built for fun.

Syntaxa — Prompt Generation Model (LoRA Fine-Tune)

Live

• Fine-tuned Microsoft Phi-3.5-mini-instruct (3.8B) using LoRA (rank 16, alpha 32) with 4-bit quantization on a curated instruction dataset to generate structured system prompts from natural language persona descriptions. • Trained for 3 epochs with cosine LR scheduling, FP16 precision, and gradient accumulation; merged adapters into the base model and published full weights to Hugging Face. • Gained 386+ organic downloads within First week of release with zero promotion — model deployed as the ML backbone of a live prompt engineering platform

Arabic Sentiment Analyzer

Live

• Built a production FastAPI service for Arabic sentiment analysis using CAMeL-Lab’s BERT model with ~87% accuracy and sub-100ms inference latency on live requests. • Implemented single and batch inference endpoints with confidence scoring, input validation via Pydantic, and containerized the full stack with Docker and Docker Compose. • Deployed on Hugging Face Spaces with a Streamlit UI; model weights auto-download and cache on cold start, reducing subsequent load time to under 2 seconds.

Arabic News Agentic RAG

Built a LangGraph agentic RAG system with an explicit four-tool state machine (search, summarize, timeline, direct answer) routing Arabic queries over 26,000+ indexed news chunks — chose LangGraph over a ReAct agent specifically for inspectable, visualizable node/edge control flow rather than a black-box loop. Implemented hybrid retrieval combining AraBERT v2 dense vectors (768-dim) with BM25 sparse vectors via FastEmbed, fused using Reciprocal Rank Fusion (RRF) in Qdrant, then reranked with a Cohere cross-encoder — evaluated across all four retrieval modes on labeled queries: Recall@5 rose from 0.56 (dense-only) → 0.63 (BM25) → 0.74 (hybrid) → 0.85 (hybrid + reranked). Built a full evaluation harness — router accuracy with a confusion matrix, retrieval recall/precision/MRR, LLM-as-judge generation scoring, latency breakdown — reporting 80% router accuracy and 4.8/5 groundedness, with sample size and methodology limitations disclosed rather than inflated. Diagnosed and fixed 6+ production bugs through systematic root-cause analysis: Qdrant filter leaking across Prefetch sub-queries; routing prompt/TOOL_MAP spelling mismatch causing silent fallback on every summarize query; AraBERT tokenizer deadlock on Windows resolved by bypassing the sentence-transformers wrapper; duplicate indexing eliminated with deterministic MD5 hash IDs. FastAPI backend with error handling and a 30s timeout wrapper; Streamlit frontend with Arabic RTL support; full architecture documented with decision rationale, rejected alternatives, and known limitations.

URL_phishing_SMS_Spam_detection

• Engineered 20+ URL features (domain age, SSL validity, lexical patterns) and trained 10 classifiers; Gradient Boosting achieved 97%+ accuracy, precision, recall, and F1 on held-out test data. • Built a TF-IDF vectorised SMS spam classifier using ensemble methods; designed a unified FastAPI service exposing both models through a single inference endpoint