Novuz

Blog

If AI fixes the edge cases, why not use it for everything?

By Debjani Dhar, Co-founder and CEO · Published · 8 minutes read

The short answer

Because using AI on about 5% of an estate and using it on 100% are different jobs. At the edge, a model proposes a fix for a few dozen objects, an engineer approves each one and reconciliation proves it. Across a whole estate, nobody can read everything the model wrote, its output can change between runs and its mistakes can land anywhere. Novuz converts about 95% of objects by fixed rules, so only the remainder needs judgment.

The question I hear most this quarter is a fair one. “You use AI for the hard objects. So why not let AI convert everything?”

It deserves a straight answer, because the people asking are not confused. They can see that language models write code, that the models keep improving, and that we use one ourselves. If AI is good enough for the hardest 5%, it sounds strange to keep it away from the easier 95%.

The answer is that those are two different jobs.

What changes between 5% and 100%

The model is the same in both cases. Everything around it is different.

AI at the edgeAI for the whole estate
How much it writesA few dozen proposalsEvery object
Who reads itAn engineer reads each oneNobody can read all of it
What it starts withThe rule trace, the lineage and the check that failedOne file at a time
What it decidesNothing: it proposesThe conversion
What a mistake costsOne rejected proposalA wrong number in production, somewhere

Why most of an estate does not need judgment

On a real estate, most objects follow patterns. A date function has a known equivalent. A join is a join. A rule converts a pattern the same way every time, and if the rule is wrong, it is wrong everywhere in the same way, so one fix repairs every object that uses it.

That is why about 95% of objects can convert with no model involved, and why we can fix the price before work starts. Using a model for that part buys nothing. It adds cost and variation where there was none.

Where AI earns its place

A few objects fit no pattern: the procedure someone wrote in 2009 that builds its SQL at run time, the script task that parses a file format nobody documented. A rule cannot settle those, because the right conversion depends on intent the code does not state.

That is where a language model is useful. It can read the surrounding code and propose a way through. In Novuz that step is the resolver, and it works under three conditions.

  1. It gets context, not a bare file: what the rules already converted around the object, its lineage and the exact check that failed.
  2. An engineer approves, edits or rejects every proposal. Nothing deploys unapproved.
  3. The result is reconciled like every other object, by running old and new on the same inputs.

AI proposes. An engineer decides. Reconciliation proves. Take away the last two and you have a fast way to produce code nobody has checked.

An object no rule can settle

Here is the kind of object that reaches the resolver. It is illustrative, and common.

-- T-SQL: the statements that run are built from table contents at run time
DECLARE @sql nvarchar(max) = '';
SELECT @sql = @sql + 'UPDATE ' + table_name
            + ' SET ' + column_name + ' = NULL WHERE ' + filter_expr + ';'
FROM   etl.cleanup_rules
WHERE  active = 1;
EXEC sp_executesql @sql;

The logic is not in the code. It is in the rows of a table, and it changes when someone edits that table. A rule can convert every statement around this one, and it can say precisely why it stops here: the statement to convert does not exist until run time. Deciding what to do instead, a parameterized loop, a generated notebook or a redesign, takes judgment about what the business needs. That is a proposal for a person to approve, not a pattern to apply.

What the resolver receives

The same model gives better answers with better input. Because rules run first, the resolver starts from evidence that a whole-estate conversion does not have.

InputAt the edge, after rulesModel converting the estate
The object itselfYesYes
Rule trace: what converted and what did not, and whyYesNo: nothing has been converted yet
Converted neighbors: upstream and downstream objects, already in target formYesNo
Types and lineage from the estate’s catalogYesOnly if retrieved, approximately
The failed check and the rows that differYes, when reconciliation flagged itNo
Conventions from the customer’s own estateYes, from a knowledge base kept in their environmentNo

What happens when the model converts everything

Turn it around. Now the model is the converter. Its output can change from one run to the next, so what you tested is not always what you deploy. Its mistakes are one-offs, so each has to be found on its own. And nobody can read 1,500 conversions carefully; that is a second migration.

If nine in ten objects come out right, the question that matters is which one is wrong.

The arithmetic of review

Take a 1,500-object estate. If rules settle about 95%, about 75 objects need a proposal. An engineer can read 75 proposals with care in days, with the rule trace and the failing rows beside each one. At about 700 to 1,000 tokens per resolution, the model usage for the whole estate is in the order of 75,000 tokens.

Now let the model convert all 1,500. Suppose it is right 99% of the time per object, far better than published studies report. The chance that every object is correct is 0.99 multiplied by itself 1,500 times: about 0.00003%. At 99.9% it is about 22%. So some of the estate is wrong, nobody knows which part, and the review that would find it covers 1,500 objects instead of 75.

That is the whole argument in two numbers: 75 and 1,500.

A test for any tool, ours included

You do not have to take a vendor’s word for any of this. Convert ten of your own objects twice and compare the two results. Then ask for the list of objects that failed, not the pass rate, and ask who approved the AI output before it deployed.

We use rules where certainty is needed and AI where judgment is needed. That is not a compromise between two camps. It is the only split we have seen finish a migration on a price agreed in advance.

Key terms

Rules-first migration
converting the bulk of an estate by fixed, versioned rules and using a language model only for the objects rules cannot settle.
Resolver
the stage that proposes conversions for edge cases, on a model the customer approves, with an engineer approving each proposal.
Reconciliation
running the original and converted objects on the same inputs and comparing the results, object by object.

FAQ

Frequently asked questions

If Novuz uses AI for edge cases, why not use AI for everything?

Because the two jobs are different. At the edge, a model proposes a fix for about 5% of objects, an engineer approves each one and reconciliation proves it. Across a whole estate nobody can review everything a model writes, and its output can change between runs.

Is Novuz against using AI in migrations?

No. The resolver uses a language model, on a model you approve. Novuz puts AI where judgment is needed and rules where certainty is needed.

What share of objects reaches the resolver?

Typically about 5%. The share is measured on your own estate in the assessment, because it varies by estate.

How can we test this ourselves?

Convert ten of your objects twice and compare the outputs. Convert 10 does this free and under NDA, and returns a reconciliation report for each object.

Sources

  • Why not use AI for the whole data warehouse migration? (novuz.com/learn/why-not-ai-for-the-whole-migration)
  • Research note: how accurate is AI code translation? (novuz.com/blog/research/ai-code-translation-accuracy)
  • Research note: why AI code conversion is hard to audit (novuz.com/blog/research/ai-code-conversion-nondeterminism)

About the author

Debjani Dhar is co-founder and CEO of Novuz Inc., the deterministic data warehouse modernization company based in Danville, California. She previously led application modernization programs at Accenture.

Next step

Convert 10 converts ten of your hardest objects, free and under NDA, and returns them reconciled within 24 hours.

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