Generative AI Engineer: RAG Pipelines & LLM Systems
Retrieval-augmented generation pipelines and domain-specific LLM fine-tuning that make language models grounded and reliable, not just an API call wrapped in a prompt.
The problem
A language model with no access to your actual documents or data will still answer questions about them. It just won't be right. Generic LLM output fails the moment a business needs answers grounded in proprietary content: internal documents, regulatory codes, or domain-specific terminology the base model was never trained on in depth.
The technical approach
My core specialisation is RAG pipeline design: document ingestion, a chunking strategy matched to the source (semantic, table-aware, or hierarchical depending on structure), embedding generation, FAISS or vector DB indexing, hybrid retrieval combining dense and sparse search, and re-ranking before the LLM sees the context. Getting the chunking and retrieval right is where most RAG systems lose accuracy; it's also where most of the engineering time goes. When retrieval alone isn't enough, specialised output formats, domain-specific language, or low-resource languages where base models underperform, I apply PEFT fine-tuning (LoRA/QLoRA) via Hugging Face Transformers to adapt the base model directly.
What you get
A deployed RAG API with a documented retrieval pipeline and measured accuracy on your actual content, not a demo tuned to a handful of test queries. This is the exact architecture behind my HS Code Classification system: an 8-step pipeline combining FAISS retrieval, GPT-4o-mini reasoning, and multi-factor ranking that achieves approximately 99% classification accuracy across 7,500+ indexed Pakistan customs tariff codes. I've also carried the adapter-based fine-tuning approach over to speech to power domain adaptation in my Urdu TTS system.
Projects that demonstrate this
RAG · FAISS · GPT-4o-mini
HS Code Classification RAG Pipeline
8-step RAG classification pipeline over 7,500+ FBR customs tariff codes. Table-aware PDF extraction, semantic chunking, FAISS retrieval with soft chapter boosting, GPT-4o-mini reasoning, and multi-factor re-ranking for high-accuracy tariff classification.
Read case study →LLM Fine-Tuning · LoRA · Speech
Urdu TTS System with LoRA Fine-Tuning
Fine-tuned open-source TTS models using LoRA and Q-LoRA on a 100+ hour curated Urdu speech corpus, demonstrating domain-specific generative model adaptation for a low-resource language.
View project →Core tools & frameworks
Need a Generative AI Engineer?
Whether you're building a RAG system over proprietary documents, fine-tuning a model for a specialised domain, or need reliable prompt engineering at scale, let's talk about what you're building.