arXiv:2610.25178cs.DBOct 2026

Manuscript Offprint

arXiv:2610.25178

Uber-Join: Unifying Diverse Table Joins using LLMs with Precision and Cost Guarantees

Guohui Guan, Chang Ge, Yeye He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

When two tables from different sources are joined, the values that should join often differ in spelling, format, or meaning, and fuzzy-, transformation-, and semantic-joins each handle one type of these differences. Large language models (LLMs) can match values that differ in several ways at once, but every LLM call is billed, and having an LLM compare the rows of two large tables can cost far more than a typical budget allows. This paper studies how to combine these join types with LLMs to join two tables under a dollar budget, maximizing recall while keeping the precision of the result at or above a target, a problem that is NP-hard.

Our key idea is to use LLMs selectively to create join programs and verify their outputs through sampling, while adaptively deciding which joins to pursue under budget and precision constraints. This combines the scalability of program-based joins with selective LLM verification, while maintaining a statistical precision guarantee on the accumulated result. We develop UBER-JOIN, which treats creating a join and checking the output of a created join as two levels of arms in a budgeted multi-armed bandit. It commits an output only if the precision of the whole result, estimated from an LLM's judgments of sampled pairs, stays at or above the target with high confidence. Under the same budget, UBER-JOIN achieves the highest recall at the precision target in nearly all settings on three join benchmarks and JOIN-HARD, a new benchmark of large tables.

1 Introduction

As organizations accumulate data across systems, answering a question often involves combining information from multiple tables. For example, an analyst may combine a sales table with a product catalog maintained in another system to report the revenue of each product category. In relational databases, this combination is performed through joins. A join identifies pairs of rows whose join keys satisfy a specified predicate. One of the most common cases is an equi-join, where the predicate requires the corresponding key values to be exactly equal.

Exact equality, however, can be too restrictive when tables come from different sources. Values that should correspond may differ in spelling, formatting, representation, or terminology, causing correct row pairs to remain unmatched [14, 51]. Therefore, techniques have been proposed to automatically handle diverse types of joins beyond exact equality, such as (J1) fuzzy-join that handles small string-level differences (e.g., Auto-FuzzyJoin [22]), (J2) transformation-join that learns structural transformations before equi-joins can be performed (e.g., Auto-Join [51], CST [28], and GXJoin [31]), and (J3) semantic-join that handles semantic mapping (e.g., Sema-Join [14] and mapping lookup [1]). Large language models (LLMs) go beyond these joins by using their language understanding and world knowledge to enable (J4) LLM-direct-join, which supports diverse types of joins by directly judging whether rows match [44]. We use an example to explain these methods:

Example 1. Figure 1 shows sample rows of two hospital tables from a join benchmark [22], table S with 257 rows and table T with 2,424 rows. The goal is to join the rows that name the same hospital, using the hospital names as join keys.

Let sis_i and tjt_j denote rows of SS and TT, respectively. For the rows shown, each (si,ti)(s_i, t_i) is a matching row pair that can join. (J1) fuzzy-join: row pairs with i=1,2,3i = 1, 2, 3 have small textual differences that can be handled by fuzzy-join-like methods. (J2) transformation-join: those with i=4,5,6i = 4, 5, 6 contain the same hospital names that are structured very differently, which requires transformation-joins that transform join keys from both sides into formats that are ready for equi-joins (fuzzy-joins alone are often unable to handle large string differences in these examples). (J3) semantic-join: those with i=7,8,9i = 7, 8, 9 involve abbreviations or semantically matching values that fuzzy-join or transformation-join often cannot handle. These joins can be composed: the row pairs with i=10,11i = 10, 11 need a transformation-join (J2) step followed by a fuzzy-join (J1) step, as neither alone is sufficient to join these row pairs. Finally, (J4) LLM-direct-join: an LLM can directly judge whether rows in any of the four groups refer to the same hospital. Note that simple equi-join would miss all these row pairs.

As Example 1 shows, J1 to J3 each match the row pairs of one join type, whereas an LLM-direct-join (J4) can match the row pairs of all join types. LLM-direct-joins also yield high precision (i.e., the fraction of returned row pairs that are correct), which is often desired because incorrect matches propagate errors into downstream analysis [14, 22]. However, an LLM-direct-join pays for every LLM call to judge the row pairs across the two tables, whose number is quadratic in the table size. Figure 2 shows this cost for a modest-sized source table of 250,000 rows: even when batching row pairs per LLM call (block nested loop join), an LLM-direct-join costs tens of thousands of dollars or more per dataset.

On the other hand, a fuzzy-, transformation-, or semantic-join (J1 to J3) calls an LLM, if at all, only a few times on sample rows, for example to write a key-rewriting function, regardless of the table sizes. It then joins all rows without LLM calls, and methods such as Auto-FuzzyJoin [22] and Auto-Join [51] call no LLM at all. However, each of these join types covers only the matches of its own type, and its precision on the given tables can be much lower than that of an LLM-direct-join and is unknown in advance.

These complementary strengths motivate combining inexpensive program-based joins (J1 to J3) with selective LLM-direct-joins (J4) under a shared budget. The goal is to recover as many correct row pairs as possible subject to two constraints: the precision of

Table S

Table T

S-IDHospital Name
s1s_1The Hospital for Sick Children
s2s_2Mease Dunedin Hospital
s3s_3Korle-Bu Teaching Hospital
s4s_4102 Pok Fu Lam Road, Hong Kong / Queen Mary Hospital
s5s_5name: Prince of Wales Hospital; street: Barker Street; city: Sydney; country: Australia
s6s_655 Fruit Street, Boston / Massachusetts General Hospital
s7s_7CHOP
s8s_8Hospital for Special Surgery
s9s_9Universitätsklinikum Heidelberg
s10s_{10}30 Gascoigne Road, Kowloon, Hong Kong SAR, China / Queen Elizabeth Hospital
s11s_{11}1 Gustave L. Levy Place, New York, NY, USA / Mt. Sinai Hospital
T-IDHospital Name
t1t_1Hospital for Sick Children
t2t_2Mease Dunedin Hospital
t3t_3Korle Bu Teaching Hospital
t4t_4Queen Mary Hospital (Hong Kong)
t5t_5Prince of Wales Hospital, Sydney
t6t_6Massachusetts General Hospital (Boston)
t7t_7Children's Hospital of Philadelphia
t8t_8HSS
t9t_9Heidelberg University Hospital
t10t_{10}Queen Elizabeth Hospital (Kowloon)
t11t_{11}Mount Sinai Hospital (New York)

extra word

typo

punctuation

reorder, drop street

key-value to list,

drop fields

reorder, drop street

abbreviation in S

abbreviation in T

translation

reorder, drop

address + typo

reorder, drop

address + short

form

(J1)

fuzzy-join

(J2)

transformation-join

(J3)

semantic-join

(J2 + J1)

composition

Figure 1: Sample rows of two hospital tables (Example 1); each (si,ti)(s_i, t_i) is a matching pair. Red marks small edits, solid and dashed underlines mark rearranged fields, and blue marks abbreviation letters.

Figure

Figure 2: Mean gated recall (i.e., recall if the precision meets the target 0.9, and 0 otherwise) and LLM API cost on JOIN-HARD, whose source tables have 250K rows (22 MB) on average. The baselines run without a budget, and UBER-JOIN (ours) with the budgets shown. Hollow markers are estimated costs, and Cost-LowerBound markers remove or minimize the LLM calls on row pairs of the semantic operators [23, 33, 43, 50]. The block nested loop join reads a block of bb rows of each table per LLM call, for b=1b = 1 to 400. Claude-Code uses claude-sonnet-5, and other LLM-based methods use gpt-5.4.

the join result is at least a desired precision, called the precision target, and the total LLM cost is within a budget. We refer to this problem as Precision-Guaranteed Budget-Constrained Join.

Technical challenges. Precision-Guaranteed Budget-Constrained Join involves two types of uncertainty, and resolving either of them consumes part of the budget. First, it is unknown which join types suit the given tables. Example 1 shows that several join types and their compositions can each cover a different subset of the matches of one pair of tables, while other pairs of tables can be joined by a fuzzy-join or a transformation-join alone. The effectiveness of a join type on the given tables can only be assessed after it is applied to them. Since applying a join type with an LLM costs budget, a solution cannot try every type extensively and has to explore which types to invest in.

Second, even a suitable join type can produce outputs with widely varying quality. For example, for tables suitable for a transformation-join, a key-rewriting function that an LLM writes from sample rows may extract the wrong field and return incorrect matches. The quality of an output can only be estimated by having an LLM evaluate its pairs. Without such estimates, it is difficult to determine whether an output would satisfy the precision constraint or whether applying the same join type again would be beneficial. Our approach: UBER-JOIN. We present UBER-JOIN, a framework that joins two tables with diverse join types within a budget and a precision target. Our key idea is to use LLMs selectively to create join programs and verify their outputs through sampling, while adaptively deciding which joins to pursue under budget and precision constraints. This combines the scalability of program-based joins with the precision of LLMs, while the precision of the final result is guaranteed with high probability.

To do so, UBER-JOIN shares the mechanism of a budgeted multi-armed bandit (MAB) [42], which balances pulls that explore arms with unknown rewards against pulls that exploit arms known to pay off [4]. A planner pulls two levels of arms, one for each challenge: a CREATE arm creates a new join of a join type, and an ESTIMATE-EXECUTE arm executes a created join and estimates the quality of its output with an LLM. Because these arms appear as joins are created and their rewards shrink as other joins cover the same rows, the planner pulls the arm with the most expected new correct pairs per dollar and updates these expectations after each pull. A precision guard accepts an output only if a lower confidence bound on the precision of the join result, computed from the LLM's judgments of sampled pairs, stays at least the precision target. As shown in Figure 2, UBER-JOIN achieves a higher gated recall than all baselines, at a far lower cost than the LLM-direct-joins and LLM semantic operators. Our work makes the following contributions.

  • We formulate Precision-Guaranteed Budget-Constrained Join, the problem of creating and executing joins of different join types under uncertainty to maximize recall under budget and precision constraints. We show it is NP-hard (§3).

  • We develop UBER-JOIN, a greedy framework that uses two levels of arms for creating and executing joins, and establish a statistical guarantee on the precision of the join result (§4).

  • We introduce JOIN-HARD, a benchmark with 250,000-row source tables, and show on four benchmarks that UBER-JOIN achieves high recall under budget and precision constraints (§5).

The implementation of UBER-JOIN and our JOIN-HARD benchmark have been open-sourced to facilitate future research. 1^{1}