Skip to main content
Ahmed Doghri Logo Image
Ahmed Doghri

Hi there! I'm Ahmed Doghri!

ML engineer making machine learning fun and accessible! Stick around for tips, insights, and AI stories!

About Me With a focus on innovation and real-world impact, I'm here to share my journey, expertise, and insights into the world of artificial intelligence.

Get to know me!

I'm Ahmed Doghri, a Senior AI Engineer with 8+ years shipping ML systems that actually run in production, not just in a demo. My lane is RAG pipelines, multi-agent orchestration, and LLM evaluation harnesses (RAGAS, DeepEval), mostly in the regulated corners where being wrong is expensive: pharma, fintech, and B2B. I've built Slack RAG assistants that cite their sources at 94% precision and stood up 7 LLM agent pipelines for FDA IND submissions that cut hallucination rates by 60%. Most of my work is the unglamorous plumbing nobody demos on stage. That plumbing is what keeps the lights on. If you want AI that survives contact with real users, let's talk.

Professional Timeline:

  • Idea Boundary - Founder and Principal AI Engineer (Independent Consulting), building production RAG systems, multi-agent orchestration, and churn prediction pipelines with measurable business impact.
  • Weave - Senior AI Engineer, focused on automating regulatory submissions using LLMs
  • BenchSci - Senior ML Engineer, advanced biomedical text enrichment using LLMs and transformer-based models.
  • IBM - Senior Data Scientist & Consultant, developed NLP pipelines and deployed chatbot solutions, optimizing processes for banking and retail clients.
  • Scotiabank - Product Owner, launched an AI bot for automated negative news detection, improving risk management and reducing manual monitoring by 75%.
  • Ford Motor Company - Research Assistant, developed high-precision misfire detection and DAQ systems for automotive signal processing.

Download Resume

My Skills

LangChain
LangGraph
LlamaIndex
OpenAI
Azure OpenAI
Anthropic
vLLM
TensorRT
Hugging Face
RAG (Retrieval-Augmented Generation)
Multi-Agent Orchestration
Agentic AI
Hybrid Retrieval
Prompt Engineering
Function Calling
Context Engineering
AI Safety & Guardrails
PyTorch
TensorFlow
spaCy
Scikit-Learn
XGBoost
BERT
LoRA/PEFT
Fine-Tuning
NLP
FAISS
Pinecone
Milvus
Neo4j
Elasticsearch
PostgreSQL
MLflow
Kubeflow
Vertex AI
SageMaker
Bedrock
Docker
Kubernetes
Kafka
Flink
Spark
dbt
CI/CD
AWS
GCP
Azure
RAGAS
DeepEval
OpenTelemetry
Phoenix
Hallucination Detection
Token Cost Monitoring
Python
SQL
R
C/C++
Contact

Projects Take a peek at some of my projects! Feel free to click around and see what I've been building lately!

vllm-cost-router, a cost-aware LLM routing gateway

vllm-cost-router

You are paying flagship prices to answer "what time do you close?" This routes the easy stuff to the cheap model and keeps the big brain for what needs it. 73% cheaper, same quality.

Case Study
tablextract, a cited table extraction service

tablextract

Your data is trapped in a PDF, wedged between three paragraphs of prose. This digs it out and cites the exact cell it came from. Naive parsers score 0%. This scores 100%.

Case Study
guardrail-gate, a PII and grounding guardrail for LLM output

guardrail-gate

Your LLM leaks a phone number and invents a refund policy in the same sentence. This catches both before your user sees it, and tells you which one it caught.

Case Study
citebench, a reranking benchmark for citation-grounded RAG

citebench

Your RAG cites a source and nobody checks if it says what you claimed. This proves exactly how much reranking fixes it. Citation precision jumps from 62% to 88%.

Case Study
taggate, a confidence-gated tagging pipeline with human escalation

taggate

An auto-tagger that guesses is wrong as often as it is overconfident. This one knows when it does not know and asks a human. Accuracy climbs from 75% to 100%.

Case Study
clarifyrag, a RAG search agent that asks before it answers

clarifyrag

Most RAG agents confidently answer the wrong question. This one asks "which jaguar did you mean?" only when it actually needs to. 100% accuracy, fewer questions asked.

Case Study
churnfm, a self-retraining churn classifier with drift detection

churnfm

The world changed and your churn model never got the memo. This catches the drift and retrains itself before your precision quietly rots. 80% back up to 89%.

Case Study
rubricagent, self-evolving rubrics for LLM-as-judge evaluation

rubricagent

You wrote your eval rubric once and never checked if it works. Half the criteria are noise. This learns the real one from outcomes. Quality goes from 0.77 to a perfect 1.00.

Case Study
agentmem, bounded self-consolidating memory for LLM agents

agentmem

Most agent memory is a junk drawer that grows forever. This one has opinions. It keeps what matters, bounces the small talk at the door, and stays under budget.

Case Study
VectorMorph Screenshot

VectorMorph

VectorMorph is a lightweight, Flask-powered animation converter that transforms SVG frames into animated WebP or GIF files.

Case Study
ATS Proof Resume Generator Screenshot

ATS Proof Resume Generator

An AI-powered tool that optimizes resumes for Applicant Tracking Systems, helping job seekers get past algorithmic filters and land more interviews.

Case Study
E-book Converter Screenshot

E-book Converter: My Files, My Rules

A self-built, local e-book converter (EPUB, MOBI, PDF) created in one hour to bypass the friction and fees of online tools. Take back control of your files.

Case Study
speculabench, a speculative decoding speedup simulator

speculabench

Everyone quotes a 2-3x speedup for speculative decoding and nobody shows the math. This models the accept and reject loop so you can find your sweet spot. 1.41x at 50% agreement, 2.86x at 90%.

Case Study
kvsqueeze, a KV-cache eviction policy benchmark

kvsqueeze

Long context has one villain: the KV cache that grows forever. At 40% of full cache, a heavy-hitter policy holds 57% recall while plain recency manages 15%.

Case Study
injectguard, a prompt injection and jailbreak detector

injectguard

Untrusted text tells your agent to ignore its instructions and it usually obeys. This catches it and shows exactly which rule fired. 100% precision and recall on a red-team corpus.

Case Study
toolrouter, a confidence-gated tool selection library

toolrouter

Give an agent fifty tools and it starts guessing wrong with total confidence. This abstains on genuine ties instead. Catches 5/5 ambiguous queries at zero cost to accuracy.

Case Study
structstream, a JSON repair and schema validation library

structstream

You asked for JSON, you got a code fence and a trailing comma. Raw parsing recovers 7% of realistic malformed output. One repair pass recovers 100%.

Case Study
chunklab, a RAG chunking strategy benchmark

chunklab

Everyone tunes the embedding model and forgets how they cut up the documents. Structure-aware chunking retrieves the whole answer 80% of the time vs 50% for naive fixed-size cuts.

Case Study
semanticentropy, a hallucination detector using semantic entropy

semanticentropy

A model that knows the answer says it five different ways. A model that's guessing contradicts itself. Consistent answers score 0.08 entropy, hallucinations score 0.90.

Case Study
contextpack, an LLMLingua-style prompt compression library

contextpack

Long context costs you twice: to send it, and in latency to read it. Compress to 50% of the original and every load-bearing fact survives, with a real recall benchmark.

Case Study
agentbudget, an agent loop and budget guardrail

agentbudget

Your agent doesn't crash when it fails, it loops forever inside its own budget. Step limits catch 0/3 stalled traces. Loop detection catches all 3.

Case Study
debatekit, a multiagent debate simulation

debatekit

One model gets one shot at its own blind spots. A panel of five that debates for two rounds goes from 57% solo accuracy to 80%, same underlying skill level.

Case Study
pendulumlab, an inverted pendulum control benchmark

pendulumlab

A tiny robot control lab with real physics and a real reward curve. CEM tunes the controller from -54.30 return to 217.38, with no simulator install.

Case Study
motifdiff, a symbolic MIDI generation benchmark

motifdiff

A symbolic MIDI generator that earns the word music. Scale adherence hits 1.00 vs 0.46 for random notes, and it writes a real MIDI artifact.

Case Study
connectpuct, a Connect Four game with a PUCT search agent

connectpuct

A playable Connect Four game with a benchmarked PUCT agent. It beats random and center baselines 10 out of 10 games.

Case Study
chronopatch, a patch-based time-series forecasting benchmark

chronopatch

A patch-based forecaster with conformal intervals. It beats seasonal naive by 15.44% MASE and covers 93% of the test points.

Case Study
orthoshift, a double machine learning causal inference benchmark

orthoshift

A causal benchmark where naive comparison is wrong by 1.812. Orthogonal DML cuts that error to 0.122 under covariate shift.

Case Study
fedcal, a non-IID federated learning benchmark

fedcal

A non-IID federated learning benchmark with conservative client calibration. Worst-client accuracy rises from 0.667 to 0.694.

Case Study
graphpulse, a heterophily-aware graph anomaly detector

graphpulse

A graph anomaly detector that catches ordinary-degree nodes in the wrong neighborhood. AUC jumps from 0.196 to 0.938.

Case Study
proteinmask, a toy masked protein sequence infilling benchmark

proteinmask

A safe toy protein-like infilling benchmark. Profile motif recovery hits 0.915 versus 0.000 for the random baseline.

Case Study
tabflowmini, a tabular synthetic data generator

tabflowmini

A synthetic tabular data demo with metrics attached. Mean KS is 0.056, plan gap is 0.040, duplicate rate is 0.000.

Case Study
riskbandit, a conformal risk-controlled contextual bandit

riskbandit

A contextual bandit with a real risk budget. Conformal selection drops violation rate from 0.733 to 0.007 while beating the safe baseline reward.

Case Study

Contact You can slide into my DMs anytime, but to keep it easy-breezy, just pop me an email using the form below!