Danny James Williams

Machine Learning & AI EngineerWeaviate · PhD, University of Bristol

Danny James Williams

Hey! I am a machine learning engineer with a PhD on statistical methods and machine learning. My thesis was on unnormalisable density estimation, focusing on the problem of doing statistics when part of your data was never collected. Now I build machine learning systems in applied AI. I am a keen advocate for animal welfare and the environment, hoping to one day combine my expertise in statistics and AI with my passions.

Research

All publications

Late Chunking: Contextual Chunk Embeddings using Long-Context Embedding Models

Instead of performing the embedding step of a chunk of a document after the chunks get calculated, record all token-level embeddings of a document and chunk post-embedding. In essence, you pool the token embeddings of the document according to the chunk structure, and this means you don't lose contextual level information from chunk to chunk.

NLP · Vector Databases · Embedding Models

High-dimensional differential parameter inference in exponential family using time score matching

Differential inference in time-varying parametric probabilistic models. Essentially, models that have changing structures for which we need to estimate the derivative of the parameter (with respect to time) rather than the parameter itself. Uses the time score function rather than typical score matching for such estimation.

Score Matching · Density Estimation · Parameter Inference

Truncated Kernelised Stein Discrepancies

Developed a data-driven solution to truncated probability density estimation by solving a constrained optimisation problem and minimising a modified kernelised Stein discrepancy. I showed theoretical guarantees for this estimator and ran numerical experiments demonstrating improvements over state-of-the-art methods.

Python · Asymptotic Theory · Machine Learning · Constrained Optimisation

Blog

All posts
20 Mar 2024 The Importance of Double and Triple Checking How the best result of my PhD turned out to be a bug in a MATLAB one-liner.

PhD · Research · Coding

5 Jun 2023 2 Years of PhD Research: Stein Discrepancies with a Twist Estimating a density when your data stops at a boundary you cannot describe.

PhD · Research · Truncated Density Estimation

24 Jun 2021 How can we do data science without all of our data? An exploration of truncated probability density estimation, and how to solve the problem with score matching for unnormalised models.

Score Matching · Density Estimation · Statistics

6 Jul 2020 Natural Language Analysis of the Lyrics of Kanye West I know I act a fool but, I promise you I’m going back to school.

NLP · Data Analysis · Text Generation

Projects

All projects
2026 Simple Vector Database A simple vector database built in Python as a FastAPI backend, built as a challenge.

FastAPI · Backend Development · Vector Database

2025 Elysia Agentic RAG package and application built on top of Weaviate, fully open source and customisable.

LLMs · RAG · Agentic RAG

2023 Using Score-based Methods for Unnormalisable Probability Density Estimation My PhD Thesis. Truncated Density Estimation and Parameter Derivative Estimation

Density Estimation · Score Matching · Stein Discrepancies

About

I did my PhD at the University of Bristol as part of the COMPASS CDT, supervised by Song Liu, on truncated and unnormalised probability density estimation. I since have been working as a Machine Learning Engineer in applied AI, creating demo applications, internal tools and developing the backend for the Query Agent, Weaviate's paid agentic RAG service.

Before that I studied Mathematics at the University of Exeter, where my Masters dissertation used extreme value theory to model rainfall extremes across the South West of England.

Everything else here is work that I am proud of. Whether it is the open-source agentic RAG application, Elysia I developed for Weaviate, or the by-product of curiosity: what BERT thinks the difference is between Eddard and Bran Stark in A Game of Thrones, whether people can pick a random number, and my horribly outdated investigation into the lyrics of Kanye West via old-school NLP from 2020.