I help teams ship machine learning systems that hold up in production — LLM agents
and retrieval pipelines, and the evaluation work that tells you whether any of it
is actually working.
DPhil in Statistical Machine Learning, University of Oxford · Senior Machine
Learning Scientist at Kriya Therapeutics, 2021–2023 · Docker Captain.
Public work, with the code and papers attached. Everything below is linked to
something you can read or run.
Ordinal classification and calibrated probabilities
Doctoral thesis · Department of Statistics, University of Oxford · supervised by Brian D. Ripley · 2011
Problem
Many prediction problems have ordered outcomes, and the useful
output is not a label but a calibrated probability. Standard classifiers
give neither.
Approach
Developed RankingSVM, an ordinal classifier using thermometer encoding
to capture non-linearity through support vector machines; paired it with
Bayesian proportional-odds logistic regression to estimate probabilities
consistent with observed market prices.
Evaluation
Introduced a non-parametric method for comparing ordinal classifiers by
treating evaluation as a betting problem — a model's predictive quality
is measured by what a stochastic-programming gambling strategy built on
it would actually earn. Proper scoring in the most literal sense.
Designing recombinant AAV vectors means searching a combinatorial
sequence space that is far too large to assay exhaustively in the lab.
Approach
Generative models applied to the biomolecular engineering of gene
therapies: folding proteins and designing capsids, optimising promoters,
miniaturising ITRs, and engineering for antibody avoidance — so that
wet-lab budget goes to the variants most likely to work.
People who need answers from a database mostly cannot write SQL, and the
queries that matter are rarely the simple ones.
Approach
Proposed and prototyped semantic parsing of natural language into complex
SQL, working from the then-current research literature, and built a demo
for the team. Also ran internal machine learning meet-ups to get the
wider engineering group up to speed on the field.
Retrieval systems rarely fail at the embedding step. They fail earlier,
on the unglamorous work of getting real Word and PDF documents into
clean, correctly segmented text.
Approach
Built and released two pieces of that layer: a Word document parser
producing structured JSON, and a classifier that labels extracted PDF
text chunks by type so downstream chunking can respect document
structure instead of splitting on character counts.
Sargassum seaweed blooms wash onto Caribbean coastlines with little
warning. Detecting rafts at sea from satellite imagery gives coastal
operators lead time.
Approach
Built an object detector over multispectral LANDSAT scenes to locate
sargassum rafts on open water.
Anomaly detection is usually posed where it is hardest: no labels, heavy
class imbalance, and a shifting definition of "normal".
Approach
Implemented and compared isolation forests and random cut forests on
unlabelled data, including the streaming case where the model has to
update as the baseline moves.
Four things I am genuinely good at, each tied to work above rather than to a
keyword list.
Evaluation, calibration and knowing whether it works
The hardest question in an ML project is rarely "can we build it" — it is
"how do we know it is working, and how confident should we be". My doctorate
was on exactly this: turning classifier scores into probabilities you can
make decisions against, and measuring models by what acting on them would
cost or earn. It is the part of the field most AI consultancies skip.
Agent architectures, context and memory management, and RAG pipelines built
on documents that are messy in the ways real documents are. I write about
this constantly and have shipped the ingestion tooling underneath it.
Gene therapy and proteomics, remote sensing, drug-discovery feature
selection. Domains where the data is expensive, the experiments are slow,
and the model's job is to decide what to test next.
Taking research code to something monitored, tested and maintainable — the
subject of my PyData talk on ML in production, and of a talk on using
machine learning to supervise test-driven development.
Merged contributions to
PyTorch Geometric
(device-handling test decorators, packaging, documentation) and
einops.
About
I am Ravi Kalia. I read Applied Statistical Computing at Oxford before staying on for
a doctorate in statistical machine learning there, supervised by
Brian D. Ripley. The work
was on ordinal classification and on the awkward question of how you tell whether a
probabilistic model is any good — a strange but useful preparation for two decades of
applied machine learning.
Across those roles the work has spanned gene therapy and proteomics, remote sensing,
financial modelling and document-heavy NLP. I have spoken on machine learning at
PyCon, PyData, Google Developer Group and several universities across four
countries, and I write regularly at Synthetic
Musings.
What holds my attention right now: agent memory and context management, which I
think is where most of the real engineering in LLM systems currently sits;
explainability treated as a localization problem rather than a feature-attribution
one; and the perennial question of calibration — how much of a model's confidence
you should actually believe.
I take on a small number of engagements at a time, usually some mix of hands-on
build work and advisory. If you have a problem where the modelling is genuinely
uncertain — where it is not obvious whether the thing can be built, or how you
would know if it worked — that is the kind of work I most want to hear about.
New writing on machine learning and agent systems, plus the occasional note on
consulting availability. No schedule, no marketing, unsubscribe in one click.