Large language models (LLMs) offer a compelling approach to entity matching (EM) in label-scarce settings, yet their matching quality is sensitive to records with ambiguous or sparse attributes due to the absence of external factual grounding. Retrieval-augmented generation (RAG) directly addresses this grounding gap by retrieving and injecting relevant external knowledge. However, naively applying RAG to large-scale EM is expensive due to per-pair retrieval calls over large knowledge graphs (KGs) and the increase in input tokens caused by enriching prompts with retrieved contextual knowledge. To address the above limitation, we introduce a CE-RAG4EM (Cost-Efficient RAG for Entity Matching) framework that reduces overhead through blocking-based batch retrieval and generation. We investigate the benefits of this framework through a systematic analysis of RAG systems for entity matching, focusing on blocking-aware batch optimizations and retrieval granularity. Extensive experiments on nine widely used real-world entity matching benchmark datasets show that CE-RAG4EM under a zero-shot setting achieves comparable or improved matching quality while substantially reducing end-to-end overhead. The results demonstrate that our CE-RAG4EM closes the knowledge grounding gap of the LLM-EM baseline and yields significant improvements in F1 scores on datasets with ambiguous or numerically sparse attributes, while its batch retrieval and inference substantially reduce the overhead and maintain competitive matching quality compared to naive RAG4EM. Our analysis identifies clear performance-overhead trade-offs across blocking-based batch sizes and retrieval granularity, showing how matching quality and computational cost shift with each design choice. These findings offer concrete guidance for building scalable, efficient RAG systems for entity matching that balance accuracy and cost.
Figures & tables
Figure 1. Vanilla RAG4EM vs. CE-RAG4EM . Matched records share the same color.
Figure 2. Overview of CE-RAG4EM . The framework consists of five phases (a)–(e), detailed in § 4 . A check mark indicates that the LLM predicts Yes for the corresponding EM query, whereas a cross mark indicates No .
Figure 3. Efficiency comparison of CE-RAG4EM against (a) LLM-EM and (b) PLM baselines.
Figure 4. Backbone LLM Generalization. Δ F1 = F1( CE-RAG4EM ) − F1( Base ) distribution by LLMs. Dots are datasets; boxplots show median and interquartile range. Δ F1 >0 indicates improvement by knowledge grounding.
Figure 5. Batching vs. per-query. F1/Prec./Rec. and end-to-end time per pair for RAG4EM, CE-RAG4EM-BR (batch retrieval), and CE-RAG4EM-BG (batch generation). Dashed line in the time plot: LLM-EM runtime.
Figure 6. Token cost analysis. Top: distribution of input ( IT ) and output ( OT ) tokens per entity pair across four pipeline variants. Bottom: corresponding average cost per pair.
Figure 7. Retrieval Granularity. PID/QID: node-level retrieval in CE-RAG4EM-BR . EXP/BFS: KG-triple context construction in CE-KG-RAG4EM-BR via neighboring expansion EXP or BFS. (a) F1 by dataset (sorted by KG-variant advantage). (b) Mean context-construction time per entity pair.
Figure 8. Blocking Robustness. F1 comparison of CE-RAG4EM-BR under three blocking methods. Datasets are grouped according to the blocking method that achieves the best performance (separated by dotted lines).
Figure 9. Batch Size Sensitivity. Effectiveness and efficiency vary with max batch size. Dashed line: mean F1 (left y-axis). Solid line: mean retrieval cost (right y-axis). Numbers above bars count datasets with the best F1.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 10. KG-RAG Design Choices. Paired Δ F1 across datasets for traversal strategy (EXP − BFS at Top-1/Top-2) and triple budget (Top-2 − Top-1 within BFS/EXP). Each dot is one dataset; diamonds show mean differences.
Entity resolution links records that refer to the same real-world entity across datasets despite differences in names, attributes, formats, and languages.
Entity matching (EM) requires fine-grained contextual understanding and domain knowledge. Recent work shows that large language models (LLMs) can serve as strong matchers across domains, but most methods either make independent pairwise decisions or rely on manually designed composite pipelines, thus lacking flexibility in realistic multi-candidate settings. At the same time, they typically ignore inference cost at scale. We formulate LLM-based EM with candidates as a cost-aware sequential decision problem and propose CaRL-EM, a reinforcement learning controller that manages LLM operations. Given the state of an anchor record, its candidate set, and the cost, CaRL-EM adaptively chooses among different operators (Match/Compare/Select/Decide) and model capacities to maximize a quality-cost objective. The policy interacts with abstract operators, allowing the same controller to be reused with different underlying LLM backends at inference time without retraining. Experiments on 7 benchmarks show that CaRL-EM (i) learns to dynamically plan the usage of inexpensive and expensive operators based on task complexity, (ii) achieves robust zero-shot transfer across diverse datasets and domains, and (iii) consistently achieves a better quality-cost trade-off than strong LLM-based baselines and manually designed pipelines, yielding a lower inference cost at comparable or higher quality.
Chaohui Guo, Michel Klein, Zhisheng Huang
Department of Computer Science, Vrije Universiteit Amsterdam, Netherlands
Large language models (LLMs) achieve strong entity matching performance without task-specific training data, but applying them to large sets of candidate pairs is slow and costly. Matchers built on pretrained language models (PLMs), such as BERT, offer faster inference but require training data. We systematically study knowledge-distillation workflows in which an LLM teacher labels training pairs for a smaller student matcher. We vary pair selection, labeling budget, teacher model, correspondence post-processing, and student model across eight benchmarks, including unseen entities and non-English data. We compare students trained on machine-labeled data with matchers trained on the original benchmark training sets. In most cases, PLM-based matchers trained on LLM-labeled data perform similarly to those trained on benchmark sets. Pair selection matters most for small labeling budgets, where active learning is often most effective. An open-weight teacher trains competitive students, so distillation requires no closed-weight models. Compact PLM-based students compete with much larger LLM students on most tasks while requiring 34 to 459 times less inference time than direct LLM matching. On the two benchmarks with high shares of unseen products, PLM-based students substantially underperform their teachers, as do students trained on benchmark data. Under GPT-5.2 pricing, LLM labeling costs per training set average $5.86 to $8.11. These findings support knowledge distillation as a practical approach to reduce the effort of labeling task-specific training data while enabling efficient inference.
Aaron Steiner, Christian Bizer
Data and Web Science Group University of Mannheim Mannheim, Germany
Entity Matching (EM) is an important task that determines the logical relationship between two entities, such as Same, Different, or Undecidable. Traditional EM approaches rely heavily on supervised learning, which requires large amounts of high-quality labeled data. This labeling process is both time-consuming and costly, limiting practical applicability. As a result, there is a strong need for low-resource EM methods that can perform well with minimal labeled data. Recent prompt-tuning approaches have shown promise for low-resource EM, but they mainly focus on entity-level matching and often overlook critical attribute-level information. In addition, these methods typically lack interpretability and explainability. To address these limitations, this paper introduces PROMPTATTRIB, a comprehensive solution that tackles EM through attribute-level prompt tuning and logical reasoning. PROMPTATTRIB uses both entity-level and attribute-level prompts to incorporate richer contextual information and employs fuzzy logic formulas to infer the final matching label. By explicitly considering attributes, the model gains a deeper understanding of the entities, resulting in more accurate matching. Furthermore, PROMPTATTRIB integrates dropout-based contrastive learning on soft prompts, inspired by SimCSE, which further boosts EM performance. Extensive experiments on real-world datasets demonstrate the effectiveness of PROMPTATTRIB.
Lihui Liu, Carl Yang
Wayne State University, Detroit, MI, USA · Emory University, Atlanta, GA, USA