No Fixed Configuration Is Best: Context- and Cost-Aware Tuning of LLM Pipelines, with an Application to Schema Matching and Mapping
Organizations: Tessera Labs
Abstract
The numeric settings of a multi-stage LLM pipeline (a compound AI system) are the usual target of tuning. We tuned all of them for an LLM pipeline for schema matching and mapping, with accuracy and cost as joint objectives, and we show what this buys, what it cannot buy, and where the remaining accuracy is. First, tuning buys cost and a little accuracy. On 35 tasks, with whole groups of tasks held out from tuning, one tuned configuration gains 2.9 points of top-1 accuracy (HR@1) over the default at 18% more cost, and another keeps the accuracy of the default at 32% lower cost. Second, the accuracy depends on a choice that numeric tuning cannot reach. Restricting the search for each source column to one assigned target table changes HR@1 by +30 points on a MIMIC-III to OMOP task and by -52 points on a task built from database views, more than numeric tuning gains on nine of ten test tasks. Neither setting is right for all tasks: on the larger set of 41 tasks used for the remaining results, mean HR@1 is 75.7% with the restriction (the default) and 83.1% without it. Third, choosing the setting per task is not enough either: even an oracle that picks the better setting for each task reaches only 87.8% on the 41 tasks, because the better setting differs between the columns of one task. The pipeline therefore runs both settings, and an LLM judge chooses among their candidate answers on the 26% of columns on which they disagree. This reaches 91.5% HR@1 on the 41 tasks, at 5.9 times the cost of the default, about one cent per column.
Figures & tables
| Stage | Settings | Score; cost |
|---|---|---|
| Table assignment | Number of assignment calls | Share of source tables assigned to an accepted table; assignment calls |
| Planning | Proposals per column, columns shown per table, metadata shown | Share of transformation columns with a complete correct plan; planner tokens |
| Candidate pool | Pool cap, retrieval depth, cosine and BM25 cutoffs | Share of columns whose correct answer is in the pool; pool entries |
| Cascade | Threshold , primary bias | Share of columns whose first result is in an accepted table (routing); matcher calls |
| Reranking | Metadata shown per candidate, verification call, score weights | HR@1; matcher tokens |
| Abstention | Threshold | Decision F1; none |
| Exchange rate | Cost | Cost change | HR@1 | HR@1 change | Better / worse |
|---|---|---|---|---|---|
| Default | $3.93 | — | 76.4 | — | — |
| $4.62 | 79.3 | 21 / 4 | |||
| $4.31 | 78.6 | 21 / 6 | |||
| $4.28 | 78.1 | 20 / 7 | |||
| $4.05 | 78.1 | 21 / 6 | |||
| $3.14 | 77.1 | 13 / 9 |
| Numeric tuning | Table step | |||
|---|---|---|---|---|
| Task | Default HR@1 | Largest gain | Largest loss | on off |
| Accounts receivable | 91.8 | |||
| Fivetran Jira | 78.2 | |||
| Fivetran QuickBooks | 25.5 | |||
| Fivetran Stripe | 71.8 | |||
| Fivetran Workday | 65.1 | |||
| Source column | Answer with the step on | Answer with the step off | Judge chose |
|---|---|---|---|
| home_currency | INVOICE_ITEM.HOME_CURRENCY | RATE_PLAN_CHARGE.HOME_CURRENCY | answer of on |
| correct | wrong | correct | |
| invoice_number | INVOICE_ITEM.INVOICE_ID | INVOICE.INVOICE_NUMBER | answer of off |
| wrong | correct | correct |
| Mean HR@1 | Judge | Within 1 point of | |||
| Method | 33 tasks | 8 tasks | All 41 | cost | the better setting |
| Table step on (default) | 79.5 | 67.7 | 77.2 | — | 13/41 |
| Table step off | 83.7 | 79.9 | 82.9 | — | 30/41 |
| Confidence rule | 88.7 | 83.4 | 87.7 | — | 25/41 |
| Judge: Claude Haiku 5.5 | 88.4 | 85.0 | 87.8 | $0.33 | 32/41 |
| Oracle per task | 89.9 | 83.4 | 88.6 | — | 41/41 |
| Mean HR@1 | Cost | |||
|---|---|---|---|---|
| Method | 33 tasks | 8 tasks | All 41 | (all 41) |
| Table step on (default) | 78.4 | 64.9 | 75.7 | $5.79 |
| Table step off | 83.9 | 79.6 | 83.1 | $6.15 |
| Oracle per task | 88.8 | 83.4 | 87.8 | $5.85 |
| Confidence rule | 88.1 | 84.4 | 87.4 | $11.64 |
| Judge: Claude Fable 5.2 | 92.1 | 89.0 | 91.5 | $33.97 |
| Group | Tasks | On | Off | Confidence rule | Judge |
|---|---|---|---|---|---|
| Fivetran | 7 | 64.7 | 85.9 | 86.8 | 92.1 |
| Entity integration (SINT) | 8 | 81.2 | 93.8 | 90.7 | 95.3 |
| RACT / Sakila | 8 | 78.2 | 83.7 | 85.9 | 89.1 |
| INSPIRE | 3 | 59.3 | 42.6 | 57.5 | 70.4 |
| OMOP (MIMIC-III, Synthea) | 2 | 78.2 | 48.6 | 82.0 | 81.5 |
| AdventureWorks (marts, views) | 2 | 44.0 | 90.5 | 89.9 | 93.5 |
| Task | Scored columns | On | Off | Judge |
|---|---|---|---|---|
| Jira | 49 | 80.3 | 90.5 | 98.0 |
| QuickBooks | 17 | 31.4 | 82.3 | 84.3 |
| Stripe | 84 | 67.9 | 76.6 | 83.3 |
| Workday | 65 | 55.9 | 81.0 | 95.9 |
| Xero | 67 | 63.7 | 85.1 | 91.5 |
| Zendesk | 97 | 76.0 | 95.2 | 94.2 |
| Configuration | Tasks and protocol | HR@1 | Cost | Against the reference |
| Numeric settings | ||||
| Default | 35 tasks, three seeds | 76.4 | $3.93 | reference |
| Tuned for accuracy ( ) | 35 tasks, groups held out | 79.3 | $4.62 | points, cost |
| Tuned with cost ( ) | 35 tasks, groups held out | 76.8 | $2.66 | points, cost |
| Table step, default numeric settings | ||||
| On (default) | 41 tasks, three seeds | 75.7 | $5.79 | reference |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Default | Search values | What it controls |
|---|---|---|---|
| Table assignment | |||
| Assignment calls | 5 | 5, 1, 3, 7, 9 | Calls that each assign every source table. |
| Planning | |||
| Maximum plans | 3 | 3, 1, 2, 5 | Proposals returned for each source column. |
| Columns per table | 40 | 40, 20, 80 | Maximum columns shown from each candidate table. |
| Planner metadata | ds | ds, none, d, s | Optional descriptions and/or sample values. |
| Stage | Default setting | Selected setting | Effect | Cost |
|---|---|---|---|---|
| Table assignment | 5 assignment calls | 1 assignment call | ||
| Planning | 3 proposals; 40 columns per table; descriptions and samples | 5 proposals; 80 columns per table; no metadata | ||
| Candidate pool | cap of 50 candidates | unchanged | — | — |
| Cascade | search linked tables if confidence ; bias 0.2 | search linked tables if confidence ; bias 0.1 | ||
| Reranking | full metadata; verification call | unchanged | — | — |
| Policy | Cascade , | Planner (transformation tasks) | Pool cap | Reranking prompt | |
|---|---|---|---|---|---|
| P1 | 0–2 | 0.65, 0.0 | 5, 80, descriptions | 50 | full, verification on |
| P2 | 4 | 0.65, 0.0 | 5, 80, descriptions | 50 | descriptions only, verification on |
| P3 | 8 | 0.60, 0.1 | 5, 80, none | 20 | no metadata, verification on |
| P4 | 16 | 0.55, 0.1 | 5, 80, none | 10 | no metadata, verification off |
| P5 | 32 | 0.50, 0.1 | default (3, 40, descriptions and samples) | 10 | no metadata, verification off |
| P6 | 64 | 0.35, 0.1 | default | 10 | no metadata, verification off |
| Policy | Cost | Cost change | HR@1 | HR@1 change | Non-dominated |
|---|---|---|---|---|---|
| P6 | $0.62 | 64.3 | yes | ||
| P5 | $0.65 | 66.6 | yes | ||
| P4 | $0.66 | 68.1 | yes | ||
| P3 | $1.10 | 72.1 | yes | ||
| P2 | $1.70 | 74.4 | yes | ||
| Default | $1.82 | — | 70.8 | — | no |
| Task held out | Group held out | |||
| Selector | Cost | HR@1 | Cost | HR@1 |
| Decider, goal balanced | ||||
| Decider, goal accuracy | ||||
| Decider, goal cost | ||||
| Rule: cheapest within one point of the most accurate | ||||
| Rule: most accurate on the other tasks | ||||
| Selector | HR@1 | Right calls | Decision cost |
|---|---|---|---|
| Always on | 75.7 | 11/41 | — |
| Always off | 83.1 | 31/41 | — |
| Decider (Opus 5.5), schema profile | 82.8 | 28/41 | $3.6 |
| Decider (Fable 5.2), schema profile | 83.1 | 29/41 | $7.6 |
| Decider (Fable 5.2), profile and 36 label-free signals | 84.0 | 31/41 | $15.2 |
| Decider (Fable 5.2), profile and label-free examples | 84.9 | 33/41 | $28.2 |
| Decision F1 | ||||
|---|---|---|---|---|
| Held-out task | HR@1 | Never abstain | from the other task | Task’s own best |
| MIMIC-III | ( ) | ( ) | ||
| Internal ERP | ( ) | ( ) | ||
| Task | Group | Tables | Columns | Scored | On | Off | Rule | Judge |
|---|---|---|---|---|---|---|---|---|
| MIMIC-III to OMOP ∗ | OMOP | 26 38 | 298 427 | 153 | 66.0 | 35.7 | 67.5 | 67.3 |
| Synthea to OMOP | OMOP | 12 38 | 111 427 | 38 | 90.3 | 61.4 | 96.5 | 95.6 |
| AR canonical to operational | AR | 6 4 | 98 136 | 98 | 91.8 | 75.5 | 89.8 | 90.1 |
| Fivetran Jira (dbt) ∗ | Fivetran | 8 18 | 208 133 | 49 | 80.3 | 90.5 | 92.5 | 98.0 |
| Fivetran QuickBooks (dbt) ∗ | Fivetran | 8 39 | 185 860 | 17 | 31.4 | 82.3 | 76.5 | 84.3 |
| Fivetran Stripe (dbt) ∗ | Fivetran | 7 27 | 285 666 | 84 | 67.9 | 76.6 | 80.5 | 83.3 |
Large Language Model-Guided Optimization
Large Language Model-Guided Optimization uses language models to propose, steer, and refine solutions to hard search and design problems.
See all 671 papers