Skip to main content

Entity Resolution for the Best Outcomes on Your Data

Summary

  • Entity Resolution Fundamentals: Discover how to match and deduplicate records across datasets using modern techniques including transformer-based approaches and vector search.
  • Scalable Matching Systems: Learn to build composable entity resolution systems using Databricks components like Apps and Agent Eval for improved outcomes over time.
  • Production Ready ER: This video demonstrates how to create entity resolution systems that learn and improve with experience on the Databricks Data and AI platform.

Entity Resolution for the Best Outcomes on Your Data

Watch: Entity Resolution for the Best Outcomes on Your Data
Talk by Ninad Sohoni, DSA, Databricks ; Yinxi Zhang, Staff Data Scientist, Databricks
There are many ways to implement entity resolution (ER) system — both using vendor software and open-source libraries that enable DIY Entity Resolution. However, generally we see common challenges with any approach — scalability, bound to a single model architecture, lack of metrics and explainability, and stagnant implementations that do not "learn" with experience. Recent experiments with transformer-based approaches, fast lookups with vector search and Databricks components such as Databricks Apps and Agent Eval provide the foundations for a composable ER system that can get better with time on your data. In this presentation, we include a demo of how to use these components to build a composable ER that has the best outcomes for your data.
Databricks Named a Leader in the 2025 Gartner® Magic Quadrant™ for Data Science and Machine Learning Platforms: https://www.databricks.com/blog/databricks-named-leader-2025-gartner-magic-quadrant-data-science-and-machine-learning
Build and deploy quality AI agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements

Chapters

FAQs

What is entity resolution?

Entity resolution identifies and matches records referring to the same entity across different datasets, which is essential for data quality and unified customer views.

Why are modern techniques like transformers important?

Transformer-based approaches and vector search provide more accurate matching than traditional methods while scaling to handle large datasets efficiently.

How do you build a composable ER system?

This video demonstrates using Databricks components like Apps and Agent Eval to create entity resolution systems that improve and adapt over time.

What are common entity resolution use cases?

Common use cases include customer 360 views, duplicate detection, data integration, master data management and cross-organizational data consolidation.

Full transcript

0:00 Introduction and agenda

Good afternoon. Uh we're going to talk about how to do entity resolution for the best outcomes on your data. How to build composible ER systems. I'm a delivery solutions architect for data bricks. So I work with customers to build solutions that build systems similar to these and other ML enginei systems the forward-looking statement. So everything here isformational consume at your own risk. If you have if you have sat through a few talks today you would have seen this already.
Wouldn't go through it now. So here's what are you going to cover entity resolution. We do a brief introduction the what, why, and how, the basics. Then we'll go through a few challenges and we'll go through solutions for those. We'll also look at a system that demonstrates entity resolution in action and we'll do a quick few quick takeaways. Let's start with a simple example. we see a picture of a headset and there are a few uh descriptions to it.

1:15 Entity resolution basics

It's either a Plantronics Voyager headset or it could be a Poly Voyager, could be an HP Poly Voyager. Which one is it? If you if we had to figure out looking at different websites whether we are looking at the same product or not, how would you figure this out? We ran this through a few models and they all gave us different answers. So the question then is which model do you trust? How do you evaluate it? So let's uh start with the basics.
We'll do a quick introduction and we'll get back to that example. Here we have the core systems that compose entity resolution. We have a system that is in charge of your canonical data set. So that's your master data set that's supposed to dduplicate your records. And then we have a system that's interfacing with the world. So when records come in, this is what's going to check which records do we already have, which ones are new, and going to respond to that incoming request that we've already seen this record.
Here's the ID, here's a new one, and so on. Why do ER? When we think of AR, we think of very narrow use cases traditionally like customer 360 or I had a use case where we had customers from different um citizens from different counties getting services from different government entities and the government agency wanted to figure out which citizens are going where so they could better understand the needs of their constituents.

2:37 Matching techniques

That's one example. As data has grown complex over time, so have use cases. Now we have examples all across um the board where an example use case is if you want to do fraud detection, how do you figure that out? Or if you have a supply chain screw skew rationalization, how do you match entities across the board? So you figure out where you are maybe buying the same entity in different quantities and you can bulk order and save some uh money make the supply chain better.
On average uh this is costing organizations a lot of money and the reason that organizations are spending a lot of money is that if you get this wrong that really is the gateway of your entire company's data estate. This is foundational. So bad data in leads to bad decisions leads to bad outcomes. Cleaning up data after the fact is not trivial. So it's uh it's good to have systems in place to ensure that good data flows in and if inevitably when there are duplicates, how do you figure out which ones are the duplicates and clean that up?
We have seen working with customers AR systems being implemented in a variety of ways. There's a lot of vendor software out there. The recommendation is generally if you find a good match, you should go and implement that with the vendor. That's the easy thing to do and you know it gets you off the ground quickly. We have also seen customers where they have use cases that don't fit well with the vendor software that's offered.
So these might be use cases where you want to match specific service records with different u products or services that you offer and maybe the system uh vendor system that you get isn't good at that particular use case. So we have seen people build these out. There's lots of popular libraries to do that. A lot of them are open source. So ones that you see here are Zing or Splink which is fantastic. Rapid fuzz is very popular.
It's the uh successor for Fuzzy Fuzzy. Here's the overall system the way it could look like today. There's two main systems on the right and left and there's one subsystem at the top. So the main system on the left is the data mastering system. That's where all of your data is mastered. That's where you maintain your golden records. So all the canonicalization happens there. uh the system that's interfacing with that is where all of your customers or clients or internal services look for matches to data.
So that's the system on the right. That's the matching system. At the heart of both of these systems are similar algorithms. Uh generally they are the same but that doesn't have to be the case. These systems have different SLAs. You want your matching system to be fast and responsive. It's okay in some cases to have the mastering system be a little bit slower. So basically if think about the matching system that's more real time the mastering system the golden records the canon canonicalization that can be a batch process that runs nightly or on a less frequent basis than real time.
Then more and more with the rise of agents and genai we are seeing enrichment systems that interface with both these systems. So when data comes in and some attributes on that data are missing, we have the opportunity to go out and get those attributes on the fly when we do matching. Or you can also do that after the fact, build a separate system as a source for references and then use that systems information to dduplicate records.
So maybe your sources aren't sending you the full record, but you can enrich that inhouse by implementing these systems. So three main systems, three different SLAs's, slightly similar algorithms for figuring out what is the entity we are dealing with. How do you match it? We'll start with a relatively simple example. We have records of two people. Hopefully they are the same person, but these records have attributes.
So we have the first name, last name, address. Matching names is common. Historically this has been done with soundex or other phonetic algorithms with distance string distance techniques like rapid fuzz levvenstein which is built in into spark. The crux is it does calculate edit distance between two relatively similar attributes and gives you a value. So in this case we see that the system might tell us and are maybe like 70 or 80% similar.

7:13 Modern entity matching

The last name matches perfectly. So there's a perfect score there and addresses get a little bit tricky because you have variations in address one, address line two. Maybe some elements of address are missing altogether. So in that case you have the opportunity to look at address string as a whole and calculate the string matching distance there. It might or might not be very reliable. We can also break it out into parts.
Separating out zip code at the end is relatively straightforward. You can separate that out and then do a matching on that. And all of these translate into features that you can get scores for. So you're doing pair-wise matching between features in two entities. They give you a score and you can do a composite score any way you like with rule-based algorithms or maybe with machine learning algorithms. If you have labeled data, the algorithm spits out the answer whether these entities are the same or not.
And that's the algorithm's best guess. Let's switch to a slightly more modern example where the types of data have changed. We have the same kinds of attributes as before. We trying to match between two entities. But now besides the simpler attributes like ID, we have names which are more complex. We have descriptions which can run into long paragraphs. and we might as well have images. So how do you figure out if these two records are representing the same thing?
Uh ID matching can be the same as before. You can do an edit distance and get some signal of whether this is the same thing or not. Name matching if you have relatively shorter names, string matching might work, string distance might work. For descriptions though, string uh edit distance techniques might not work as well because I mean you're getting garbled messages out of that. It's not reliable to figure out whether these are the same thing or not.
For images, how do you compare those images? So we'll take a step back and see some techniques of comparing attributes. Some more recent techniques. The first one is just edit distance. So all of your string matching fuzzy fuzzy rapid fuzz leavenstein all do this or some variation of this. This literally gives you what's the difference between one string and another and you can normalize that by the length of one or more strings.
So you get some sense of they are 80% similar or 90% similar. The second thing is a bag of words based technique. So we collect the vocabulary of all words across all records that we have seen and figure out which words are common in that vocabulary. These words don't have much meaning in figuring out entities. It's the rare words like in this case which you would expect to be rare across a list of products that would carry more weight as to this is an indicator of a or a signal of a match.
So these techniques they start with um a bag of words or an inverted TF um collection and based on that you can carve out vectors. So the sentence or the entities represented as a vector at the end of the day and then you can apply algorithms to measure distances between vectors. Simple techniques like ukidian distance or cosine similarity help there. But the difficult thing is to get all of your text or data converted to vectors.
The technique on the right is similar. It's all of your embedding models. Um here the example is I was trying to figure out whether addresses carry any semantic meaning. We were trying to match address data and my worry was that addresses don't really have any semantic meaning. How would language models figure out whether they are the same thing or separate? So what we're looking at in the blue and red is one of those are really address records but the second thing is u concepts like you know water or apple and the address records have those words which are which have meaning in common language in the record itself.
So if you have something like you know 1 2 3 water street does the language model conflate that with the concept of water or is it able to treat that as an address and the separation here indicates that it's able to do that. So it's it bunches all of the addresses together. It bunches all of the uh concepts together. Now this is still a projection of a highdimensional space into 3D. So these models have more separation possibly between these concepts than we are seeing in the picture here.
Now we have more techniques basically to take um entities strings and convert them into vectors. Based on vectors we can now do the comparison that we were seeing on the products before right we get a name we can convert those to vectors we can compare vectors with cosine similarity or ukidian distance we can get a description we can run them through TF for embedding models get a vector compare those. So at the end of the day just as before we have a list of features we just arrived at them differently.
We can run those features through rules. We can run them through an algorithm like you know if if the name is 80% similar or more then maybe treat that as a match. We can run them through machine learning algorithms and then we can conclude whether they are the same or different. So there are a few challenges as data gets more complex and bigger. The first one is scale. This is a fairly known issue, but it's represented here in this picture.

13:33 Handling challenges

As you have more and more data, when you try to match incoming data against your existing data, or it can also be your existing data against itself to dduplicate, it grows quadratically. So you have to do more and more computations as your data size grows. And this is just the number of records being compared, right? You're really comparing attributes within those records. If your data have like 10 attributes, that's 10x the number of comparisons.
But with the embedding techniques or bag of words, when you have vectors, there are algorithms that can do approximate nearest neighbor search in a vector space. It gives you uh an answer based on searching a narrower space than if you were to do everything against everything. So this in a sense takes down the complexity from O of M into N or N squ or N factorial if you are doing dduplication to O of N in a sense. One thing to call out here it depends on how you implement your technique.
So with TF or something else you still might get a lot of matches that you need to sort through. uh but with vector search or other techniques based on embeddings, you can ask your vector database to give you just the top 10 matches. It kind of constrains the search space when you're trying to do matching between two entities. So here's the uh typical search pattern now that we have this complexity of trying to map our entity to a vector space and then try to do comparison between vectors.
We start with some sort of a blocking technique to reduce the number of comparisons we have to make. Historically, this was based on similar attributes like first name start with the same three letters and you consider those for a match or like at least candidates for a match. Could be based on zip codes. For products, it gets uh more tricky because you don't have like names. You have names but no u zip codes and other attributes that you can easily classify things into.
So basically, you run them through some sort of an algorithm, figure out the comparisons you would wish to make and then send those on to a more fine-tuned algorithm that's either doing pair-wise matching like a machine learning classifier or maybe even an LLM. This can be implemented in a variety of ways. In this example, we have candidates being fetched based on exact matches on name or partial matches on something else or maybe if they have an attribute like a prize.
We do a prize within some narrow margin. This gives you a bunch of candidates. These are not matches but they might be good uh candidates for running a match algorithm on. One way of doing the matching is the feligi center algorithm. That's what the Splink framework implements. This is what is going to do pair-wise comparisons between your candidates and going to give you a confidence score of whether two things are the same or not.
Here's a completely different implementation and you can mix and match both. The first constrainer of your data or blocker is using hybrid search or some sort of a semantic similarity algorithm to find candidates for a match. Now once you do have those candidates, you can run them through any machine learning technique or rules-based techniques as before. You can also send them through LLMs and this basically becomes like your rag pipeline.
There's a few other challenges on evaluating the performances of the system and I'll pass it over to my colleague to walk through those. Hey everybody, welcome to the session. Uh. I'm a staff data scient over four years now and happy to see everybody here. Uh similar to, I work in the field engineering working with customers to build the solutions. I saw a few familiar faces here. Cool. Um I will touch upon the challenges of accuracy and stagnancy.

17:39 Evaluation and improvement

Um the robust system a robust entity recognition system is relying on how accurate we measure the performance and all and also how do we monitor and keep a consistent and continuous development loop. All right, this is one example of a metrics that very popular people use in the information system to measure entity resolution modeling results. uh min reciprocal uh min reciprocal rank. Basically the higher the rank of the top match in your find it candidates uh the higher the score will be.
Using this as example you can see uh for the first row your predicted match have six uh have three record and then the top one is matching the top one. So you got a rank of one and then as it goes lower to the uh roles you see some of them have lower ranks in the predicted candidates. Thus it gets lower uh reciprocal rank and then we do the average of all your input records to get the mean reciprocal rank. The point of here is just to showing you sometimes in entity resolution uh order matters.
It's not just trying to find all the record uh within the candidate. is also trying to make sure the most relevant one comes at the top. But besides uh min reciprocal rank, there are a lot of other metrics. Um we're not trying to recommend one specific metric for all the general use case. It depends on what's your use case and what is most important to your system. uh some of the example here you can see uh some of uh some of them are based on pair wise comparison like precision recall and F1 score and when you get to a more complicated entity resolution with class three you can use u metrics like B cubed the metric which is just aggregated results of um the pair wise metrics and some other ranking metrics similar to MMR are uh NDCG at K those uh this This is also based on the ranks of the predicted results.
Um I think if you want to choose the best composite of metrics depends on your use case rather than relying on a specific one. Uh we're trying to show this using one of the example. This will be show in later uh demo as well. We have built two different modeling systems for the uh for two records matching. And then you can see one of the model uses a bag of words type of approach and the other uses uh vector search to do the semantic uh sim sim semantic embedding similarity search and one actually have like a higher MR but lower precision.
Which model to choose right which uh metrics matter to you depends on the business use case. This is just one example to show that creating something specific and tailored to the use case is important. And the other challenge uh mentioned earlier is stagnancy. Um your data your the mass data is massive. Um your model doesn't necessarily uh updates as the data refreshes. So how do we have a continuous development loop and keep improving the model performance?
Uh the key we want to emphasize is to have the feedback system. Um when you have model in the development make sure some level of online sorry offline evaluation has been placed uh in the entire pipeline. Make it part of your CI/CD process. Make it part of the integration or even unit test uh of the geni system similar to what we will do as software engineering best practice. And this way whatever changes made to the model go through validation process before it actually get deployed.
And once it's actually deployed, you can do like batch or real time. Either case, right? In the demo uh Net will show later, we actually use uh real-time survey endpoint to in uh to generate inference results of the models and you can uh implement online monitoring for the models where uh the model not only the accuracy metrics of the model will be displayed in a dashboard and visualized as well as you can also track some system metrics like latency and cost to have a holistic comparison across boss models.
The most important thing I think is actually to imp uh to include your human SME in the feedback system. Uh trying to tie this back into the earlier example. If you guys still remember the three hats records uh showed at the beginning of the slides, he actually doesn't mention like what are the true ground truth, right? If you are familiar with the business, familiar with the the product, you definitely know those three actually are the same item.
The reason description and title is different is because HP acquired Panatronics and later changed the product brand name or model name from Panatronics to Poly. So without that business context and it's hard for model to imply that at the beginning. So this definitely take iterations. the first iteration a lot of model will get it but it doesn't matter right we have we want to have human reviewers in the loop to be able to judge the result and score the result and being able to provide feedback so we can understand which portion of the model or which which note in the modeling pipeline went run and how can we improve so this is just trying to tie things together explaining the continuous development loop uh we have you can have one model that's already in production.
This can be your champion model and making sure we have a eval system. You can use a combination of human judges as well as LM judges. Later on when showed the demo, we'll also like give a example of LM judge records and showing how like human can be augment human judge can be augmented and um speed up with LM uh assistant and then uh your data scientist can keep working on improvements of models and iterations and when there is a new version that's ready to be tested, it could be a challenger model that runs in the shadow mode with the champion model um as the complete loop.
With that, um I think uh we want to provide like a really quick and a simple tool survey um for uh some of the key processes in the workflow. What can you use uh what kind of open- source tools are available and of course we are heavily biased towards the system and we also want you to know like how um those things can be integrated on the data bricks platform. Um on the evaluation uh metrics side uh of course there's a lot of like open source Python package but what we want to emphasize and call out is that uh once you have built your custom metrics uh you can use Emlflow evaluate API to run the offline evaluation and it will give you a nice UI which you can visualize everything nicely and having the nage and uh tracking information uh on place and for human feedback there's a lot of vendors trying to do like label as well as annotation.

24:43 Tooling and workflow

Um on the platform you can build customized UIs with data bricks apps. Um the experiment logging of model performance and model iteration can be done with managed ML flow and monitoring can be done with uh lakehouse monitoring. Um same similarly with data quality there are some uh quality expectation built in with the DT pipeline which can scale up your data processing as well as your data validation um for workflow orchestration.
Um when you have like a batch pipeline for your entity resolution uh you can use data data bricks workflows for those uh orchestration. With that we kind of want to summarize what we have been trying to explaining. We have a lot of intro slides leading to the challenges of entity recognition. Mainly your compute effort and your management effort scale uh exponentially as your data scales. Um you have to use some sub uh you have to use tools that's able to scale with your data. uh high dimensional vector search is definitely helping in the process and also compute with uh spark and scale across horizontally across clusters um for monitoring and um keep improving the model performance accuracy.
Um we recommend you to have a solid evaluation monitoring system and a consistent feedback loop. With that, I'll pass it over to do the demo. For this demo, we are using some product data from the University of LIZIG. This is a popular benchmarking data set u the Amazon Google products data set. So we have one data set which has products from the Amazon website and one from the Google website. We'll take a brief look at the data sets.

27:33 Live application demo

So we have the name for the product. We have really long descriptions. We're just showing a part of it here. In some cases we have a manufacturer. In some cases we don't. We have a price as well. An interesting technique with embeddings and models that are able to understand the data is that you don't have to do feature by feature comparison. You don't have to uh take name separately and try to create a match and all that.
What you could do is package everything together, send it to a vector search model. It'll give you an embedding and then you just compare the entire record with one go. So here what we'll now do is let's try to add more data. All of that data was data from the Google website compiled by the University of Leig. What we'll do next is we'll add data from the Amazon data set. So completely separate sources. For the sake of this demo, we'll add a file, but this could be your data injection pipeline which uh when it runs, it's going to make data available at some cloud storage location.
Can be a streaming process as well. In this case, this loaded data to Unity catalog and then pushed it to a delta table. We'll take a look at the records here. These are from Amazon. They have a similar schema with vector search based models. This doesn't really matter all that much. If some data is missing or this didn't have descriptions or some new information, the model wouldn't really complain. It would try and make sense of that as well.
What we can do next is package all of this information into one uh record, generate an embedding for it and then compare that embedding for each of these records against all of the records in our system to find matches. So we'll go to the next page and here we'll click on the match products button. This is going to run a batch process to match all the records we ingested and find records from the Google data set. This was a relatively small data set so it ran instantaneously.
But again like with the scaling with vector search and embedding techniques you can uh do this better than with trying to do quadratic complexity matching. Here we see matches from the source uh the uh from our source system. Let's see a better view of that. Okay, it's a little constrained to look at. But what we have here is uh we have the source data from uh the system the file that we just uploaded. These these are all compressed records.
They have the name, description, price, manufacturer, all combined in one record. And that is what was used to try and find matches against your existing data. I uh let me give me just one second live demos. Was trying to test this before the demo. Okay. So when we arrive at this screen, what we have are our source data that we ingested and the data in our system that it found matches to. It gives us a score. So we can rank those in order.
And we can still determine whether to run a subsequent model on this or not. In this case, this was just a vector search model. So it just is pure vector search. But it's behind a model serving endpoint. So what you put behind it is is up to you, right? You can have one model, you can have an ensemble, you can have a series of models. So all of the configurations that we saw earlier where you can do different kinds of machine learning rule-based combinations, they're all possible.
You can put that and abstract that behind an endpoint and this will generate the same kind of output for you. So you're not constrained to one model, free to experiment with one champion model and then have more challenger models backing that where you are continuously running those as well. Okay, so you have generated data to improve the models. The key thing that you need is ground truth and that really is the challenge.
I've worked with customers where they wanted to improve their rack systems or LLM systems, other kinds of models. Compiling ground truth is really hard, takes a lot of time. But now we have smart models to help us with that process. Here there is another endpoint which is going to use an LLM to check whether the description on the left matches the description on the right and give us a match or not. Let me run this. What you put behind the second endpoint as well is up to you.
So Yi was showing the different signatures from two models on accuracy and uh recall and precision. uh these are kind of different model personalities. So you can have a model that's always going to give you an answer. It's going to give you lots of answers as one model, one personality. And a different model that's a little bit shy. It's going to sometimes give you an answer, but more often than not, it's going to give you the right answer.
So with that combination of perspectives, you can make a decision of whether this is a good match, it's a match that needs to be reviewed by humans or um you can auto accept that match. So in this case uh all of the data in our system was evaluated by an LLM and it gave us for each uh pair is this a match is this not a match. So mostly our vector search model was good or at least that's what the LLM thinks and it sees that most of these things are really the same products.
In some cases it says that yeah that's not a good match. You don't have to take the LLM's word for it. You can have like multiple models behind that endpoint. But you can also have humans take control and then say yeah this is not a match. The LLM said that this is a match but this is not a match. So you can make those changes and have a system that continuously compiles ground truth. Once you have that's fer for your fine-tuning for genai models or for classical machine learning models where you can feed that and improve the quality of models.
With that you can also do more interesting analyses where um you can look at where your models differ and you can kind of package that into a genie space where you can just go and start asking questions like what is my data like? What are where do these models differ? So I ran something earlier and got an answer for records where the LLM said one thing but the model that was making the prediction or the matching was saying something else.
So that gives you some insight into where your models might be struggling or where you would want to put like humans in the loop more uh to resolve that difference. With that, I will switch back to the presentation and we'll have some time for questions. So, a few key takeaways, points that we felt were new when we worked with customers. Entity resolution models are also machine learning models. They can be experimented with.

35:32 Key takeaways

You can have champion and challenger models. what you put behind a model serving endpoint kind of abstract that model from the business process or the consumption uh client and you can have multiple models that you can experiment with figure out one that works the best keep on improving it to improve your model you need to have ground truth you can do that by having a human in the loop feedback process or you can use LLM to help that process if you have models with different personalities so to speak that especially help with that feedback back process evaluate models using feedback ground truth.
So once you have feedback you evaluate your models have multiple models as challenggers and uh build a modular strategy for different processes. So at the very beginning we saw that there were three different systems. One was the clustering system that was in charge of your golden records. One was your matching system and one was the third system that was trying to enrich your data. All of these use matching algorithms behind the scene.
What you can put in that algorithm is kind of up to you. But modularizing the system and abstracting it behind an endpoint gives you the opportunity to do that. We have a couple of minutes for questions.

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.