|
Hello folks! Wanted to share a new blog post with ya'll. Below are the details: Debugging AI With Adversarial ValidationPublished on April 12, 2024 For years, I’ve relied on a straightforward method to identify sudden changes in model inputs or training data, known as “drift.” This method, Adversarial Validation1, is both simple and effective. The best part? It requires no complex tools or infrastructure. Examples where drift can cause bugs in your AI:
No matter how careful you are, bugs can still slip through the cracks. A high-value activity is to routinely audit all your AI/ML projects for drift. How It WorksUncool Warning This method is so simple that it might seem uncool. You aren’t going to impress any data scientists. Despite this, it’s too valuable to ignore. This slide from my talk on MLOps tools explains the technique behind Adversarial Validation2:
Slide The process is as follows:
Warning If this process doesn’t detect drift, it doesn’t mean there isn’t drift. It just means that we couldn’t detect it with the model and features we used. Minimal Example:
|
![]() |
The demo shows the tool detecting a difference between two datasets, file_a.jsonl and file_b.jsonl. Afterward, a table of important tokens that account for the drift are shown, such as END-UI-FORMAT, UI-FORMAT, etc.
This demo is from a real-world example where an unintentional change in a prompt template caused unexpected behavior in a model. We were able to apply the tool and quickly find the root cause of the issue. The modeling code is embarrassingly simple and located at ft_drift/model.py. The point is you don’t need sophisticated techniques to get started.
You can take this approach further by adding embeddings to your features to also detect semantic drift. Similarly, you could add additional features by hand like the number of conversation turns, length of messages, etc.
I help companies build products with LLMs and share what I learn along the way. I write about topics like evals, fine-tuning, and infrastructure for LLMs. I have over 25 years of industry experience with Machine Learning which informs my pragmatic approach to solving problems.
Hello folks! Over the last 2 years, I've helped 35+ companies improve their AI products. I distilled my approach into this guide, which covers error analysis, synthetic data, eval-human alignment, involving domain experts, optimizing # of experiments & more I appreciate you receiving this, but if you want to stop, simply unsubscribe • • • Read in browser for best experience 👉(web version has extras like videos, images, tables and more) 👈 A Field Guide to Rapidly Improving AI Products...
Thoughts On A Month With Devin Impressions of Devin after giving it 20+ tasks. In March 2024, a new AI company burst onto the scene with impressive backing: a $21 million Series A led by Founders Fund, with support from industry leaders including the Collison brothers, Elad Gil, and other tech luminaries. The team behind it? IOI gold medalists - the kind of people that solve programming problems most of us can’t even understand. Their product, Devin, promised to be a fully autonomous software...
nbsanity - Share Notebooks as Polished Web Pages in Seconds Transform your GitHub Jupyter notebooks into beautiful, readable web pages with a single URL change. No setup required. I’ve long believed that Jupyter Notebooks are an excellent medium for technical writing, combining live code, visualizations, and narrative text in a single document. However, sharing notebooks in a way that’s both beautiful and accessible has always been a challenge. While GitHub’s notebook viewer is functional, it...