Novuz

Research insights

How accurate is AI code translation?

What three published studies report, and how to read them when planning a warehouse migration

Written by

Ted Ghose, Co-founder and CTO
Ted Ghose

Co-founder and CTO

Novuz Inc. · · 14 min read

Executive summary

Vendors and enthusiasts quote high success rates for AI code conversion. Independent measurements are more cautious. A study presented at ICSE 2024 found correct translations in 2.1% to 47.3% of cases across the models it tested. A NeurIPS 2025 benchmark of SQL translation between database systems reports that language models average under 38.53% accuracy. A third study found that accuracy itself moves from run to run, by up to 15%, with settings meant to be deterministic. None of these is a benchmark of warehouse migration, and models improve. Read together, they support a practical rule: treat model-written code as a proposal, and prove every converted object against the original, whichever method produced it.

Key points

  • Across 1,700 code samples in five programming languages, correct translations ranged from 2.1% to 47.3% for the models studied (Pan and others, ICSE 2024).
  • On PARROT, a benchmark of 598 SQL translation pairs across 22 database systems, language models average under 38.53% accuracy (NeurIPS 2025).
  • Across five models, eight tasks and ten runs each, accuracy varied by up to 15% between runs under settings intended to be deterministic (Atil and others).

Recommended actions

  • Ask any vendor that quotes an accuracy figure how it was measured: on which code, checked how, and counted how.
  • Measure on your own estate. Convert ten to twenty of your hardest objects and reconcile each against the original on the same inputs.
  • Plan the migration so that a wrong object is caught before cutover, whatever the accuracy rate turns out to be.

What question does this note answer?

When a team considers using a language model to convert warehouse code, the first question is how often the result is right. Marketing figures are easy to find. This note looks at what independent, published measurements say.

Method. We reviewed three studies: one of code translation between programming languages, one of SQL translation between database systems, and one of how stable model accuracy is across repeated runs. We quote each figure from the paper’s abstract and name the source. This note uses no Novuz customer data. Where it describes how Novuz works, it says so.

How often do language models translate code correctly?

In the largest study we found, less than half the time. Pan and colleagues translated 1,700 code samples, drawn from three benchmarks and two real-world projects, between C, C++, Go, Java and Python, using general-purpose and code-specific language models. They checked the translations by running them.

Correct translations ranged from 2.1% to 47.3% across the models studied. The paper goes on to classify the bugs the models introduced, which is its main contribution: the failures are varied, and many are not visible by reading the code.

Correct translations, by model studied

2.1%

Lowest model

47.3%

Highest model

1,700

Code samples, five languages

Source: Pan and others, Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code, ICSE 2024.

General-purpose programming languages, not SQL or ETL. The models tested have since been superseded.

Is SQL translation between databases easier?

It does not appear to be. PARROT is a benchmark built for exactly this task: translating SQL from one database system to another. It contains 598 translation pairs drawn from 38 open-source benchmarks and real business services, covering 22 production database systems.

Its authors report that language models average under 38.53% accuracy on it. SQL dialects differ in ways that are easy to miss: functions that share a name and differ in behavior, implicit type conversions, NULL handling, and date arithmetic. A translation can run without error and still return different rows.

PARROT: cross-system SQL translation

Under 38.53%

Average model accuracy

598

Translation pairs

22

Database systems

Source: PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation, NeurIPS 2025.

A benchmark of single queries, not of stored procedures, ETL packages or whole estates.

Is a model’s accuracy stable from one run to the next?

No. Atil and colleagues ran five language models on eight tasks, ten times each, with settings intended to make the output deterministic. Accuracy varied by up to 15% between runs, and the gap between a model’s best and worst possible performance reached 70%. No model gave repeatable accuracy on every task.

For a migration this matters as much as the average. If accuracy moves between runs, a test that passed on Tuesday does not describe the code produced on Wednesday. Our earlier note on non-determinism covers the causes and what model vendors say about them.

Variation across ten runs with “deterministic” settings

Up to 15%

Accuracy variation between runs

Up to 70%

Gap between best and worst possible performance

5 models

Eight tasks, ten runs each

Source: Atil and others, Non-Determinism of “Deterministic” LLM Settings, arXiv:2408.04667.

General language tasks, not code conversion. The finding is about repeatability, not about any one task.

What do these errors look like in warehouse SQL?

The studies classify failures in general terms. In a warehouse migration the most damaging class is the translation that runs and returns different results, because two SQL dialects can accept the same statement and mean different things. The examples below are documented behaviors of each platform.

AreaSource behaviorDatabricks SQL behaviorEffect if carried over by name
Integer divisionSQL Server: 5 / 2 returns 25 / 2 returns 2.5Ratios and allocations shift
Year differenceSQL Server DATEDIFF counts boundaries crossedtimestampdiff counts whole units elapsedTenure and aging logic moves by one
Empty stringsOracle treats an empty string as NULLEmpty string and NULL are distinctFilters, joins and counts change
String comparisonTeradata is case-insensitive by default; SQL Server ignores trailing spacesCase-sensitive and exactJoins lose rows; groups split
Duplicate rowsA Teradata SET table discards duplicates on insertDuplicates are keptCounts and sums inflate
NULL orderingOracle sorts NULLs last ascendingNULLs sort first ascendingTop-N and window results change

Which checks catch which errors?

The studies that report low accuracy checked translations by running them. That matters: a check that only compiles or reads the code would have scored the same translations far higher. The table sets out what each kind of check can see.

Failure modeCompiles?Visible on reading?Caught by comparing results on the same inputs?
Semantic drift: division, dates, NULLs, collationYesRarelyYes
Invented function or optionNoSometimesYes
Dropped branch in a long procedureYesSometimesOnly if the inputs exercise the branch
Changed join type or moved predicateYesSometimesYes
Type or precision changeYesRarelyYes, on aggregates
Different output on a second runYesNoYes, if the second run is also compared

How should a migration team read these numbers?

With care, in both directions.

What the studies showWhat they do not show
Model-written translations are often wrong in ways that reading the code does not revealThe error rate of any migration product, which may add checks, retries and context
SQL translation between systems is hard for models, not easier than general codeHow current models perform; newer ones are likely to score higher
Accuracy can change between runs of the same model on the same taskHow any model behaves on your estate, which only a test on your code can show

What follows for a migration plan?

Three things, none of which depends on the exact figures.

  • An accuracy rate is not a plan. Even at a high rate, some objects are wrong and nobody knows which, so every object needs a check that does not rely on reading the code.
  • The check has to be on results. Run the original and the converted object on the same inputs and compare schema, row counts, totals and sampled rows.
  • Repeatability is worth paying for. A conversion that gives the same output on every run is tested once. One that varies is tested every time it runs.

How does Novuz use a model, given this?

Stated here so readers can weigh this note accordingly. Novuz converts about 95% of objects by fixed, versioned rules with no model call, so the same input gives the same output. The objects rules cannot settle go to a resolver on a model the customer approves. It proposes a conversion; an engineer approves, edits or rejects it; and every object, rule-converted or resolved, is reconciled against the original on the same inputs.

The studies above are a reason for that design, not a measurement of it. The test of any tool, ours included, is the same: run it on your own objects and check the results.

Would a much better model remove the need to check?

No, and the reason is arithmetic, not pessimism about models. A migration needs every object right. If each object is converted correctly with probability p, independently, the probability that all N objects are correct is p raised to the power N.

At 99.9% per object, which is far above any figure in the studies reviewed here, a 1,500-object estate is more likely than not to contain an error. Per-object accuracy would have to reach about 99.99% before the estate is probably clean, and even then nobody would know without checking. Better models reduce the repair work. They do not remove the need for proof.

Per-object accuracyExpected wrong objects, N = 1,500Probability the whole estate is correct
90%150Effectively zero
99%15About 0.00003%
99.9%1.5About 22%
99.99%0.15About 86%

What are the limits of this note?

None of the three studies measures warehouse migration. Two test general-purpose code or language tasks, and the third tests single SQL queries. We know of no public, independent benchmark of AI conversion of stored procedures, ETL packages and schedules at estate scale.

The models tested in the earliest study have been replaced by stronger ones, and tools built on models can add retrieval, tests and retries that raise their success rate. The figures here are a lower bound on caution, not a forecast. We will update this note as newer studies appear.

Sources

  1. Pan, R. and others, “Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code”, ICSE 2024, arXiv:2308.03109
  2. “PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation”, NeurIPS 2025
  3. Atil, B. and others, “Non-Determinism of ‘Deterministic’ LLM Settings”, arXiv:2408.04667
  4. Ouyang, S., Zhang, J. M., Harman, M. and Wang, M., “An Empirical Study of the Non-determinism of ChatGPT in Code Generation”, arXiv:2308.02828

Next step

Measure it on your own code. Convert 10 converts ten of your hardest objects, free and under NDA, and returns a reconciliation report for each.

Last reviewed:

Find out what your logic debt is costing you.

Every object counted, lineage, dead code and a fixed price in three business days. $3,000, credited.

Take the logic debt scorecard

Not sure which door? The scorecard takes ten minutes and tells you.

Scorecard