# Hasnain Ali, Senior AI Engineer > Senior AI engineer with 6+ years shipping software (since March 2020) and AI-focused work since April 2021. He builds AI agents, retrieval (RAG and knowledge graphs) and voice AI systems that run in production, plus the Python backends behind them. Remote from Pakistan (UTC+5), open to relocation. No US work authorization, so US roles need visa sponsorship. Availability: open to senior roles and contract work; an independent contractor since July 2026. Every fact here matches the pages linked below, which say the same things in more detail. ## Selected work - [Speculo.ai, voice AI outreach](https://hasnainali.vercel.app/#speculo): as Senior AI Communication Engineer he built the Python backend that times every call, text and follow-up. One production run sent 117K+ emails and SMS and about 10K AI voice calls in 6 hours; the agents handed qualified leads to the client's human agents. Contributed to $2M+ in annual revenue. Pub/Sub delivers at least once, so idempotency keys prevent duplicate sends. - [Smart Advocate, legal and medical document AI](https://hasnainali.vercel.app/#smart-advocate): Senior AI Lead Engineer, at Devsinc. Shipped into a platform used by 20,000+ legal professionals. A knowledge-graph (KAG) approach with a fine-tuned model gave a 40% accuracy gain over standard RAG, scored by a GPT-4-class LLM judge, BLEU and ROUGE, and precision@k and recall@k. - At Devsinc he led eight AI engineers across legal, healthcare and real-estate products, with retrieval across about five million documents. - Earlier, at Turing, he led a team producing RLHF training data for a frontier AI lab. - [Automation Studio](https://hasnain-automation-studio.vercel.app): four agent workflow demos you can run in your browser. - Mentanima: a legal copilot in development. Every answer cites its source, or says it can't answer. ## Work with him - [RAG and document AI engineering](https://hasnainali.vercel.app/services/rag-document-ai): evidence across document collections, structured extraction, answers grounded in sources; what he has built and how he would approach a project. - [Voice AI and agent workflow engineering](https://hasnainali.vercel.app/services/voice-ai-agents): the backend that coordinates calls, texts, emails and follow-ups, handles failures and hands over to people. ## Writing - [GCP Pub/Sub for AI outreach](https://hasnainali.vercel.app/blog/gcp-pubsub-ai-outreach): rate limits, at-least-once delivery and the idempotency keys that prevented duplicate sends. - [KAG vs RAG for legal AI](https://hasnainali.vercel.app/blog/kag-vs-rag): where standard RAG struggled on legal case files, and how the 40% gain was measured. - [The agent backend behind Speculo's outreach](https://hasnainali.vercel.app/blog/agentic-ai-systems): four LangGraph agents and one delivery service. ## Profile - [Resume](https://hasnainali.vercel.app/resume) (also as a [PDF](https://hasnainali.vercel.app/Hasnain-Ali-Senior-AI-Engineer.pdf)) - [Demos](https://hasnainali.vercel.app/demos): two short animated films of the systems he builds - [GitHub](https://github.com/HasnainAli47) - [toon-mcp-server on PyPI](https://pypi.org/project/toon-mcp-server/): open source; converts JSON and system prompts to TOON ([source](https://github.com/HasnainAli47/toon-mcp-server)) - [LinkedIn](https://www.linkedin.com/in/hasnainali4/) - Email: codingwithhasnain@gmail.com - Education: BS Computer Science, COMSATS University Islamabad