Portrait of Dr. Mahdi Habibi
Senior AI Engineer & Data Scientist · Hamburg, Germany

Knowledge graphs, retrieval & agents that explain themselves.

Senior AI & Data Scientist at DealCircle, where I lead the recommendation, hybrid-search, GraphRAG and multi-agent enrichment systems behind an M&A deal-sourcing platform, built on a Neo4j knowledge graph. I'm the author of a book on knowledge graphs and ontologies (RDF, OWL, SPARQL, SHACL and property graphs). Before industry I earned a Ph.D. in computational physics, co-authored the open-source TelescopeML package with NASA Ames, and specialised in explainable AI.

10+years in data & ML
Ph.D.computational physics
JOSSopen-source co-author
179 ppbook on knowledge graphs
Why I build this way

The failures that matter rarely crash.

Physics taught me to distrust a result I can't explain. In simulations, a quiet modelling assumption could shift a prediction by half, with nothing in the output to warn you.

I brought that habit to AI. The failures that matter most rarely crash. They return fluent, confident, wrong answers. So I build systems that show their evidence: explainable models, retrieval that cites its sources, knowledge graphs that know which facts are guesses.

I write about these failures every week in Silent Failures in AI, and I built postloom after losing a great question under one of my own articles.

What I do

Four areas, one standard: production-grade.

01

Hybrid search, RAG & GraphRAG

BM25 + dense-vector retrieval in Elasticsearch and FAISS, re-ranking, and graph-grounded RAG on Neo4j.

02

Recommender & matching systems

Content-based, collaborative and graph-aware recommenders for sparse, high-value two-sided markets.

03

Multi-agent data pipelines

LangGraph / LangChain agents for web discovery, crawling, extraction and company profiling at scale.

04

Explainable AI

LIME, SHAP and CAM — adapted to images, spectra and time series — so model decisions can be audited.

Selected work

Case studies

Problem → approach → result
Production · Current role

AI deal matching for M&A: sellers, advisors and buyers

The recommendation, hybrid-search and data-enrichment layer that connects companies for sale and their M&A advisors with the right strategic and financial buyers on DealCircle's platform.

Product launch · Local-first AI · Knowledge graph

postloom: your LinkedIn, remembered

A free, local-first app that turns your LinkedIn articles, posts and every comment under them into a private, searchable knowledge graph. It answers questions with citations, shows who engages with your work, and drafts replies in your voice, using any AI model or none.

Open source · Explainable AI · NASA Ames

TelescopeML: explaining CNNs on telescope spectra

An end-to-end Python package, developed with NASA Ames Research Center, that trains CNNs on spectra of exoplanets and brown dwarfs, predicts their atmospheric parameters with uncertainty and, through the LIMEXplainer module I designed, shows which parts of a spectrum drove each prediction.

Book · Open access · v0.2.1

Knowledge Graphs: Semantic Graphs and Property Graphs

One catalog, two graph worlds. A 179-page illustrated guide that takes readers from graph fundamentals through RDF, RDFS, OWL, SPARQL and SHACL alongside Neo4j and Cypher, and on to architecture, governance and graph RAG.

Time-series LLMs · LoRA fine-tuning · XAI

BeatLens: finding the T-wave peak with time-series LLMs

A research workbench, built with Dr. Sdjad Sadeghi for the TimeNet Hackathon 2026, that locates the T-wave peak in a two-channel ECG beat. It fine-tunes and probes a time-series language model from Hugging Face, benchmarks it against waveform baselines, and explains every estimate.

Ph.D. · Scientific ML & data science · HPC

Bremsstrahlung suppression in laser–plasma simulations

Doctoral research at HHU Düsseldorf with HZDR and European XFEL: a QED-derived model added to a production particle-in-cell code, tuned with Bayesian optimisation, run on HPC clusters and analysed as a large-scale data-science problem. It cut predicted photon counts by 50.4% against the standard model.

More projects
Representation learning · Data compression

Neural compression with autoencoders

Four convolutional autoencoders that encode 112,800 handwritten characters into a compact latent code, shrinking the in-memory footprint from 84.3 MB to 13.8 MB while reconstructing the images almost losslessly.

Explainable AI · Time series · Open source

LIME for time series: explaining a 12-lead ECG classifier

LIME was built for images and tables. I adapted it to 1-D physiological signals so a CNN's diagnosis of a 12-lead ECG can be traced back to the beats and intervals that produced it, and released the method as a reusable package.

Computer vision · Explainable AI · Medical imaging

Auditable malaria-cell CNN

A CNN trained from scratch to separate parasitised from healthy red-blood-cell images, then opened up with LIME and class-activation maps so a clinician can see where in the cell the model is looking before trusting it.

Deep learning · Computer vision · MLOps

Blood-cell classifier: from EDA to Kubernetes

A complete pipeline for classifying peripheral blood cells into eight types, covering EDA, outlier detection, U-Net and GrabCut segmentation, and VGG16 transfer learning. It is productionised as FastAPI microservices with MLflow, DVC, Airflow, Kubernetes and Terraform.

Deep learning · Semantic segmentation

Nucleus segmentation with U-Net

A U-Net trained on the 2018 Data Science Bowl corpus that produces pixel-accurate nucleus masks across very different stains and magnifications, tuned with Hyperband instead of a GPU cluster.

Recommender systems · Methods study

Three ways to recommend a movie

Collaborative filtering, content-based filtering and Bayesian-weighted ranking, implemented side by side on public movie data to learn where each shines, where it fails cold and how they combine. It was the groundwork for production deal matching.

LLMs · Semantic search · RAG

Search Semantically: an LLM and semantic-search course

A free 14-chapter course from keyword matching to embeddings, dense retrieval, vector databases, re-ranking, evaluation and RAG. Every chapter pairs intuition with a runnable notebook, and the whole course ships as a website and a 69-page e-book.

AI agents · System design

Designing a production-grade agentic system

A step-by-step architecture guide to real agentic AI systems: LLM gateway, orchestrator, sub-agents, tool registry, memory and retrieval, input/output guardrails and observability.

Experience

From particle physics to production AI

Sep 2024 — Present
Hamburg, Germany

Senior AI and Data Scientist

DealCircle GmbH
  • Lead development of AI-powered recommendation systems for M&A deal sourcing, translating business objectives into retrieval, ranking and recommendation components.
  • Architect scalable hybrid retrieval combining lexical, sparse, semantic and dense-vector search for generative recommendation workflows and content-based filtering with FAISS.
  • Lead end-to-end development of an AI data-enrichment platform using multi-agent workflows for data sourcing, web discovery, crawling, text extraction and multimodal company profiling.
  • Design and deploy Elasticsearch hybrid-search systems combining BM25 and dense-vector fields for context-aware M&A discovery and shortlisting.
  • Evaluate retrieval and recommendation changes through representative offline comparisons, model validation and production-oriented monitoring.
  • Develop GraphRAG-based recommendation systems in Neo4j, combining knowledge graphs, RAG pipelines and hybrid content-based and collaborative filtering for relationship-aware deal matching.
  • Explain model trade-offs to technical and business stakeholders, prioritise experiments and turn results into product improvements and clear decision support.
Nov 2023 — Present
Remote

ML Engineer — XAI Developer (FOSS Contribution)

TelescopeML · NASA Ames Research Center
  • Co-authored and contributed to the TelescopeML Python package, published in the Journal of Open Source Software and on PyPI.
  • Lead developer of the explainable-AI module, improving the transparency and usability of machine-learning models.
  • Translate research requirements into maintainable Python modules with contributors and stakeholders.
  • Maintain software quality through GitHub code review and CI/CD practices.
Oct 2019 — Mar 2024
Dresden, Germany

Data Scientist and ML Engineer

Helmholtz-Zentrum Dresden-Rossendorf (HZDR)
  • Designed and developed end-to-end simulation pipelines for modelling emission-flux suppression effects.
  • Engineered Bayesian optimisation methods that improved computational efficiency by 35%.
  • Designed and implemented an emission module for particle-in-cell simulations.
  • Led development and maintenance of automated ETL pipelines using Python and Apache Airflow.
  • Benchmarked and simulated models with SciPy and NumPy, integrating PyTest, GitHub Actions and CI/CD for reliable delivery.
  • Took part in code reviews and Agile collaboration through GitHub, Jira and Slack.
Oct 2019 — Mar 2024
Schenefeld, Germany

Data Scientist and ML Engineer

European XFEL GmbH
  • Designed and developed a deep-learning autoencoder for high-resolution image compression, reducing memory usage by 16.33%.
  • Integrated detector image-processing algorithms to improve data accuracy and end-user experience.
Sep 2016 — Sep 2019
Tehran, Iran

Data Scientist

Avand GmbH, a B2B Data Solutions Provider
  • Led data-driven projects that exceeded client-acquisition targets by 15% using Agile methodologies.
  • Secured $100k in funding for database development and automation using SQL and MongoDB.
  • Created and maintained Tableau dashboards for user-behaviour analysis.
  • Developed recommendation engines and software solutions from stakeholder requirements.
  • Collaborated with cross-functional teams to deliver projects and keep stakeholders aligned.
2024

Data Science & ML Engineering Diploma

Université Paris 1 Panthéon-Sorbonne · DataScientest · 400-hour programme + MLOps; defence graded A+

2019 — 2023

Ph.D. in Computational Physics

Heinrich Heine Universität Düsseldorf · Magna cum laude

Recognition

IOP Trusted Reviewer

IOP Publishing · peer reviewer for physics journals

View ↗
Certification

AWS Certified Cloud Practitioner

Amazon Web Services

Toolbox

Skills

Retrieval & GenAI

  • RAG · GraphRAG
  • LangGraph · LangChain
  • Elasticsearch · BM25
  • FAISS · embeddings
  • Multi-agent systems

Modelling

  • PyTorch
  • Hugging Face · LoRA fine-tuning
  • Time-series LLMs (OpenTSLM)
  • TensorFlow / Keras
  • scikit-learn
  • Recommender systems
  • CNN · U-Net · VAE

Knowledge graphs

  • Neo4j · Cypher
  • RDF · OWL
  • SPARQL · SHACL

Explainability

  • LIME
  • SHAP
  • CAM / Grad-CAM

Engineering & MLOps

  • FastAPI
  • Docker · Kubernetes
  • MLflow · DVC · Airflow
  • CI/CD · PyTest
  • AWS
Contact

Let's build something that holds up in production.

Open to senior AI / ML engineering roles, consulting and research collaborations.