01. Intro

Pakistan · UTC+5

Rana Adeel Tahir.

AI Engineer & Researcher

Hi, I'm Adeel. At work, I'm building an AI agent harness in Rust. Lately, I've been working on AI security: treating the agent in your terminal as a threat, and building safeguards around it that stop it from attacking your machine.

In my final year at university I benchmarked how well LLMs spot test smells in code, and how well they refactor them out once they do. These days I'm drawn to mechanistic interpretability: working out why a model does what it does, not just whether the benchmark moved.

Focus
Retrieval · tool-calling · evals
Now
Devsinc
Next
Mechanistic interpretability
Based in
Pakistan
Kerr–Newman black hole
Exact geodesics, live · hover for details · drag to turn
Spin a
0.99 M
Charge Q
0.1 M
Horizon r+
1.10 M
Disk inner edge (ISCO)
1.34 M

02. Experience

3 roles · since 2024

  1. Feb 2025 - now

    Associate Software Engineer, AI/ML

    Devsinc

    Production AI features inside client products: retrieval services, LLM workflows, and the evaluation plumbing that keeps them shippable.

  2. Jul - Dec 2025

    Full-Stack AI Engineer (contract)

    Ontario Wholesale Energy

    Owned features end to end: model, API, interface. Most model problems turned out to be data problems wearing a costume.

  3. Jul - Sep 2024

    AI Engineering Intern

    PureLogics

    First time building against someone else's data and someone else's deadline. The notebook that works and the service that runs are not the same artifact.

03. Stack

4 groups

Machine Learning
  • PyTorch
  • Transformers
  • PEFT / LoRA
  • scikit-learn
Generative AI
  • RAG
  • Vector search
  • Agents
  • Evals
Engineering
  • Python
  • TypeScript
  • C++
  • Astro
  • React
Infrastructure
  • Docker
  • Databricks
  • Postgres / pgvector
  • Cloudflare
  • Kaggle / GPU workflows

04. Selected work

3 projects

Conversational AI · health data

Health Chatbot for Athletes

A chat assistant for athletes and the trainers and clinicians who look after them, built into the health platform. Each message is routed through a tree of small LLM calls: one classifies intent, then a narrow branch with its own prompt and tools logs a meal, symptom or injury, or answers questions about a player's games and stats. Underneath, a daily pipeline pulls sports data from SportRadar into S3, transforms it with PySpark on Glue, and writes players, games and injuries into a Memgraph graph, while Oura and Whoop wearables feed activity data. Tools act only on the authenticated patient's record, and the model provider is swappable between Claude and OpenAI.

Stack: Python · FastAPI · Claude / OpenAI · AWS Glue / PySpark · Memgraph · Neo4j

Code retrieval · in progress

CodeMob

A code-RAG service that reads a repository the way a compiler would: tree-sitter parses each file into an AST and chunks on real boundaries instead of line counts, jina-embeddings-v2-base-code runs self-hosted so no source leaves the box, and pgvector stores the result. Ingestion is queued through Redis and arq; LangGraph orchestrates the query side. Deployed so far as a minimal FastAPI slice; the rest of the architecture is written down before it is written.

Stack: FastAPI · tree-sitter · pgvector · Redis / arq · LangGraph

Retrieval

Clinical Query System with RAG

Retrieval over MIMIC-IV clinical notes: chunking that respects document structure, embedding models compared against real queries rather than a leaderboard, and every answer traceable back to the note it came from.

Stack: Python · vector search · LLM APIs

05. Writing

7 posts

  1. Oct 14, 2026

    How to reverse engineer anything

    • Agent
    • MCP
  2. Sep 18, 2026

    How to Get a Software Engineering Job in Pakistan?

    • Essay
  3. Aug 10, 2025

    Building Transformer from Scratch

    • Transformers
    • PyTorch
    • NLP
  4. Aug 4, 2025

    How to run Mamba SSM on Kaggle?

    • State-space models
    • Kaggle
  5. Jul 29, 2025

    Building a Clinical Query System with RAG

    • RAG
    • NLP
    • Healthcare
  6. May 1, 2025

    Fine-Tuning BLIP-2 Image Captioning

    • Fine-tuning
    • LoRA
    • Vision-language
  7. Mar 8, 2025

    Fine-Tuning DeepSeek Math to Solve Emoji Math

    • Fine-tuning
    • LLM