Constraint-Guided Enterprise Data Mapping with Large Language Models
Authors: Sebastian Monka, Pramod Anantharam, Thien Vo Minh, Lavdim Halilaj
Organizations: Bosch Center for Artificial Intelligence, Renningen, Germany · Bosch Center for Artificial Intelligence, Pittsburgh, USA · Robert Bosch GmbH, Ho Chi Minh City, Vietnam
Enterprise entity alignment must handle semi-structured records, implicit attributes, and unit or granularity mismatches. Manual matching is still common in practice, but does not scale as schemas and providers evolve. LLM-only matching improves semantic recall, yet can violate structural and physical invariants, producing fluent yet operationally invalid correspondences. We propose constraint-guided mapping (CGM), a neuro-symbolic method with three stages: (i) schema-grounded admissibility constraints with metadata mc = <tau_c, delta_c>, where tau_c denotes the constraint type and delta_c provides executable relation and normalization logic; (ii) constraint-restricted candidate generation with cascade relaxation to guarantee a nonempty feasible set under noise; and (iii) neural ranking with bounded LLM disambiguation restricted to that feasible set. Methodologically, constraints operate as hypothesis-space operators rather than post-hoc validators, enabling controlled degradation under relaxation and auditable, human-guidable decisions. On a controlled structural-decoy benchmark, hard admissibility shrinks the candidate space by ~480x without dropping the GT, and a layer-by-layer ablation shows this gate, not the LLM, is the decisive lift (F1 0.08 to 0.66). The benefit is model-independent and adds no extra inference cost: a small model with constraints matches a frontier LLM used without them at ~28x lower cost. The method, not a single tuned configuration, transfers across seven enterprise makes (macro F1 0.70), each under its own automatically discovered, expert-refinable constraints, and lowers expert effort by ~7x versus spreadsheet workflows. Public Valentine results add an external ranking sanity check and mark the boundary: constraints should be hard only where structural invariants are match-determining.
Figures & tables
Figure 1: CGM as a constrained funnel: hard constraints C~h shrink the catalog to the admissible set H(es) , soft-constraint neural ranking forms the shortlist M^(es) , and the LLM selects only within it—so M~(es)⊆M^(es)⊆H(es) by construction.
Rung
Adds
Compl. ↑
Wrong ↓
F1 ↑
Jacc. ↑
L0 all-columns RAG
—
10.0
69.2
0.19
0.16
L1 rule columns (raw)
feature selection
18.3
55.0
0.32
0.28
L2 + rule functions
normalization
0.0
66.7
0.08
0.05
L3 + hard gate
admissibility
52.5
26.7
0.66
0.63
L4 + relax + hint
relaxation + expert
49.2
23.3
0.66
0.61
Table 1: Decomposition of the CGM funnel on the synthetic benchmark ( n=120 held-out, gpt-5.4-mini , ∣Et∣≈12,094 ). Each rung adds one mechanism, so its delta attributes the gain; F1/Jaccard are macro per-source set-overlap. Normalization without a gate hurts (L1 → L2); the gate is the decisive jump (L2 → L3, F1 +0.58 ).
Cupid
Jaccard
SimFlood
COMA
Magneto
CGM
MRR
0.47
0.70
0.75
0.76
0.93
1.00
R@GT
0.43
0.56
0.57
0.65
0.76
0.71
Table 2: Schema matching on a ten-scenario public Valentine suite (MRR, Recall@GT). Magneto is the SOTA matcher ( mpnet retriever); CGM is our neural ranker ( text-embedding-3-large ). CGM leads MRR; Magneto keeps a Recall@GT edge through its bipartite 1:1 reranker. A rigid type gate lowers CGM’s MRR to 0.94 by pruning correct cross-type matches. Best per row bold.
Make
ns
∣Et∣
card.
Compl. ↑
Wrong ↓
F1 ↑
Jacc. ↑
Make A
45
11,934
6.1
84.4
15.6
0.855
0.851
Make B
28
2,917
2.2
64.3
21.4
0.793
0.763
Make C
88
706
8.3
62.5
34.1
0.711
0.687
Make D
30
11,205
5.2
40.0
46.7
0.654
0.583
Make E
98
373
1.7
36.7
41.8
0.634
0.561
Make F
55
8,183
1.0
40.0
60.0
0.400
0.400
Table 3: CGM generalizes across seven enterprise makes (held-out split; gpt-5.4-mini ), each under its own autoresearch-discovered constraints (model name soft + identifier/code hard + displacement) with the identical end-to-end pipeline. ns sources, ∣Et∣ candidates, card. mean GT per source; Wrong = a relevant target missed; F1/Jaccard macro per-source, sorted by F1.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Question
Experiment
Verdict
Evidence
Where
Does the gate shrink the search space without dropping the GT?
Synthetic + rule ablation
Yes
admissible set ∼0.2% of catalog, GT kept ( 100% synth., 96% Make A)
§ 6.1
Which layer actually drives the gain?
Layer decomposition (L0 → L4)
Hard gate
F1 jumps 0.08→0.66
§ 6.1 , App. D
Can a bigger LLM replace constraints?
Model ablation
No
CGM 100% valid for every model, 28× lower cost
App. E.1
Is the ranker competitive on public data?
Valentine
Yes
MRR 1.00 vs. SOTA Magneto 0.93
§ 6.2
Does one method transfer across makes?
Enterprise ( 7 makes)
Yes
mean F1 0.70 with per-make constraints
§ 6.3
Does it cut expert effort in practice?
Expert study
Yes
10.5→1.5 days per make ( 7× )
App. F
Appendix
Table 4: Evaluation as an evidence ladder: each experiment answers one plain question about the constraint mechanism, rather than standing alone as a separate dataset. Read top to bottom—isolate the mechanism, then test whether model scale or a public baseline change the picture, then whether it transfers and pays off in practice.
Source field
Target field
Heterogeneity
Constraint δc
engine_code ( B4D )
in model_label ( Astra 2.0 (B4D) )
implicit attribute
hard: extract code; equality
engine_cc ( 2000 )
displacement_l ( 2.0 )
unit inconsistency
hard: cc/1000=L
year_start – year_end
build_date
granularity
hard: year ∈[start,end]
generation ( Mk3 )
generation_code
version / identifier
hard: equality
model_text ( Astra 2.0 )
model_label (reworded)
lexical naming
soft: embedding sim.
Appendix
Table 5: Source → target field mismatches in the synthetic benchmark. Each structural key is encoded differently on the two sides; the hard constraint normalizes both to a comparable form, the soft constraint handles fuzzy naming. The generator is released.
Cand.
model_label
gen.
Sim.
Outcome
T0034
Opel Astra Hatchback (B4D)
Mk3
0.34
GT – admissible
T0035
Astra 2.0 (EP6)
Mk3
0.75
reject: code EP6 = B4D
T0036
Astra 2.0 (G4F)
Mk3
0.75
reject: code G4F = B4D
T0037
Astra 2.0 (B4D)
141
0.75
reject: gen. 141 = Mk3
Appendix
Table 6: One source and its candidate targets (benchmark seed 13 ). Source S0008 : model_text =“Astra 2.0”, engine_code = B4D , engine_cc = 2000 , year range 2002--2004 , generation = Mk3 . “Sim.” is source–target text similarity; the GT is the lowest , yet the only admissible candidate.
Hard rule (unit)
Soft rule (naming)
Source expr.
round("engine_cc"/1000, 1)
split("model_text", ’ - ’)[1]
Target expr.
split("displacement_l", ’ ’)[0]
lower("model_label")
Rule Engine
src: 1998 → 2.0 ; tgt: 2.0 L → 2.0
src: G4F - Astra → Astra ; tgt: Astra → astra
Execution
equality : match( 2.0 , 2.0 )
cosine sim : sim( Astra , astra )
Appendix
Table 7: A rule is a source_expression and a target_expression over the two column names (Appendix C ); the engine evaluates both on every row, then execution compares— equality for hard (gates admissibility), cosine similarity for soft (sets order). Shown for one source record ( engine_cc = 1998 , model_text =“G4F - Astra”). Hard and soft share the two-sided structure and diverge only at execution: hard gates admissibility by equality of normalized values, soft orders the survivors by name similarity.
Valid (%) ↑
Model
LLM only
+ CGM
Cost ($/1k)
gpt-5.4
10.6
100
3.59
gpt-5.4-mini
9.0
100
0.49
gpt-5.4-nano
10.2
100
0.13
Appendix
Table 8: Model ablation on the synthetic benchmark ( N=500 , ∣Et∣≈12,094 ): for each chat model we read across one row, from the unconstrained LLM only baseline to the same model inside CGM (encoder fixed). Valid = % of predictions satisfying the active hard-constraint set (after cascade/similarity relaxation, Section 5.2 ); cost in USD per 1000 mappings is indicative and essentially equal in both settings (CGM issues the same calls), so we report it once. The pattern is the same on every row: the LLM alone stays ∼10% valid from frontier to small model, while admissibility lifts every model to 100% at the same cost—the gain is model-independent and adds no per-mapping LLM calls.
Catalog
Semantic (decoys off)
Structural (decoys on)
Small
0.62
0.15
Enterprise ( ∼12 k)
0.18
0.05
Appendix
Table 9: Record-level Magneto on the synthetic benchmark, isolating the two factors behind its collapse (mean Recall@ 5 over 3 seeds, N=500 ). Adding structural decoys and scaling the catalog each lower retrieval independently; enterprise data is the bottom-right corner (both factors), Valentine the top-left (neither). At a small catalog the retrieval ceiling stays high (Recall@ 500.99 semantic, 0.50 structural); at ∼12 k it does not, so an LLM reranker over the shortlist has little GT to promote.
Heterogeneity
LLM
CGM
Implicit attribute encoding
4.0
42.0
Unit inconsistency
2.0
70.0
Version / identifier
2.0
56.0
Granularity mismatch
4.0
72.0
All mixed
0.0
42.0
Appendix
Table 10: Per-heterogeneity ablation ( N=50 , ∣Et∣≈12,094 ; identical instances): complete-match % for the unconstrained LLM ( gpt-5.4-mini ) vs. CGM. The LLM collapses on every class while CGM lifts complete most on the purely numeric signals (unit, granularity; best bold); CGM predictions are 100% valid by construction here as everywhere (Table 8 ). Record-adapted SOTA Magneto ( mpnet retriever) collapses identically— 0% complete in every class, Recall@ 5∼0.05 —a retrieval bottleneck no reranker fixes.
Method / rung
Adds
Compl. ↑
Wrong ↓
F1 ↑
Magneto (base mpnet )
SOTA baseline
0.0
96.1
0.02
L0 all-columns RAG
LLM-only
7.5
76.5
0.17
L1 rule columns (raw)
feature selection
16.5
60.5
0.32
L2 + rule functions
normalization
0.0
73.5
0.08
L3 + hard gate
admissibility
43.0
35.0
0.56
L4 + relax + hint
relaxation + expert
40.5
35.0
0.54
Appendix
Table 11: Extended synthetic benchmark (deep one-to-many +9% NO_MATCH, ∣Et∣≈12 k): SOTA Magneto and the LLM → CGM funnel decomposition in one view. LLM/CGM rungs use gpt-5.4-mini ( n=200 held-out, the L0–L4 ladder); Magneto uses its mpnet retriever ( 3 seeds, N=500 ), both on the same generator. F1 is macro per-source set overlap. The hard gate (L2 → L3) is the decisive jump. We report Magneto at the retrieval stage because its LLM (GPT) reranker is provably capped here: a reranker only reorders the retrieved top- 50 , and the GT is in that shortlist for just 17% of sources (Recall@ 500.17 ), bounding any reranker—MagnetoGPT included—at Recall@ 5≤0.17 , far below CGM.
Make ( ∣Et∣ )
Hard-rule config
Recall
Mean ∣H∣
Sel.
Make E ( 373 )
none
100.0
373.0
0.0
selected (model + variant)
86.0
50.2
86.5
− internal-model
93.4
364.0
2.4
Make A ( 11,934 )
none
100.0
11934.0
0.0
selected (model + type-group)
96.4
664.2
94.4
− model-type-group
96.4
5479.3
54.1
Appendix
Table 12: Rule ablation on enterprise data (LLM-free; internal held-out split). Recall = sources whose GT is kept in H ; Sel. =1−∣H∣/∣Et∣ . The auto-selected config collapses the candidate space at near-flat recall; removing the discriminating identifier rule re-inflates it.
Setup
TTC (days)
MpH
Interactions
Constraints
Excel (manual)
10.5
118
–
–
Rules
6.0
207
112
–
Rules + LLM
4.5
276
48
–
CGM (Expert)
1.5
827
31
2 hard + 1 soft
Appendix
Table 13: Expert effort under cross-dataset mapping: one domain expert per make, median values across the deployed makes (a between-make field comparison with comparable tasks, not a within-subject trial). TTC: time to completion; MpH: mappings per hour; Interactions: cases where the available data is insufficient and the expert must seek extra information to complete a mapping; Constraints: hard + soft rules authored (CGM only; the baselines use a different rule mechanism, hence “–”). Best per metric in bold.
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) 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.
Chuangtao Ma, Zeyu Zhang, Arijit Khan +2
University of Amsterdam Amsterdam, the Netherlands · BIFOLD & TU Berlin Berlin, Germany
Multi-table entity matching (MEM) addresses the limitations of dual-table approaches by enabling simultaneous identification of equivalent entities across multiple data sources without unique identifiers. However, existing methods relying on pre-trained language models struggle to handle semantic inconsistencies caused by numerical attribute variations. Inspired by the powerful language understanding capabilities of large language models (LLMs), we propose a novel LLM-based framework for multi-table entity matching, termed LLM4MEM. Specifically, we first propose a multi-style prompt-enhanced LLM attribute coordination module to address semantic inconsistencies. Then, to alleviate the matching efficiency problem caused by the surge in the number of entities brought by multiple data sources, we develop a transitive consensus embedding matching module to tackle entity embedding and pre-matching issues. Finally, to address the issue of noisy entities during the matching process, we introduce a density-aware pruning module to optimize the quality of multi-table entity matching. We conducted extensive experiments on 6 MEM datasets, and the results show that our model improves by an average of 5.1% in F1 compared with the baseline model. Our code is available at https://github.com/Ymeki/LLM4MEM.
Yingkai Tang, Taoyu Su, Wenyuan Zhang +2
Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China · School of Cyber Security, University of Chinese Academy of Sciences, Beijing, China · School of Information Engineering China University of Geosciences Beijing, Beijing, China