arXiv:2610.12778cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.12778

Leakage-Resistant Evaluation of AI-Generated Database Specifications in Specification-Driven Migration

Oleg Grynets, Ivan Fedorchuk, Vasyl Lyashkevych

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

Oleg Grynets

EPAM Systems

McLean, Virginia, USA

oleg_grynets@epam.com

Ivan Fedorchuk

EPAM Systems

Vinnytsia, Ukraine

ivan_fedorchuk@epam.com

Vasyl Lyashkevych

EPAM Systems

Lviv, Ukraine

vasyl_lyashkevych@epam.com

Abstract—This paper presents a leakage-resistant framework and benchmark (LRFB) for measuring evaluators of AI-generated Oracle PL/SQL specifications. The benchmark contains 494 labelled source-specification pairs across 19 quality metrics grouped into seven dimensions; each metric contains 26 records divided into development and held-out subsets of 13 records each, with three clean and ten defective specifications per subset. Ground truth is mechanically sealed from inference and checked with canary and label-permutation tests. Three LLM judges were evaluated with three runs per record and compared against two trivial baselines. On 247 held-out records, GPT-4o, DeepSeek V4 Pro, and Claude Sonnet 4.5 reached balanced accuracies of 0.87, 0.89, and 0.81, respectively, while a specification-length baseline reached 0.88. Exact paired tests did not separate any judge from that baseline. The judges nevertheless provided information unavailable to length: the labelled defect category appeared among findings in 84%–92% of violated records, and quoted evidence overlapped the labelled span in 92%–93%. The study therefore reframes specification evaluation from binary issue detection toward evidence-linked, typed findings and benchmark-validity controls.

Keywords—specification-driven development, database migration, Oracle PL/SQL, LLM-as-a-judge, specification evaluation, benchmark validity, faithfulness, completeness

I. INTRODUCTION

Large language models (LLMs) increasingly participate in software modernization, not only by translating code but also by creating intermediate representations that make transformation steps explicit and reviewable. Specification-based Code-Text-Code reengineering treats a technology-neutral specification as a controllable boundary between source and regenerated code [1]. In Oracle-to-PostgreSQL migration, this view has been extended to token-aware migration strategies [2] and to cross-agent specification portability, where the same intermediate representation may be consumed differently by distinct development agents [3]. Specification-driven DevOps similarly shows that executable artifacts can be generated while still omitting deployment intent that is not explicit in the repository [4].

This trajectory changes the assurance target. Once a specification becomes an operational artifact, its quality is no longer merely documentation quality: it controls what downstream agents regenerate, validate, deploy, and monitor. Security-oriented specification-driven work has shown that implicit requirements can disappear during generation unless they are represented and verified explicitly [5]. Risk studies of LLM-based software development likewise identify semantic drift, weak traceability, and unreliable transformations as lifecycle-level concerns [6], while taxonomy-based risk modelling connects requirements and development activities to structured risk knowledge [7].

Database migration is an especially suitable setting for studying this problem. A recovered specification may look fluent while omitting an OUT parameter, a transaction side effect, a NULL-sensitive condition, a trigger timing constraint, or a source-dialect semantic that must be surfaced before migration. Conversely, the specification may invent an operation that the source never performs. If such a specification is used as the generation contract for PostgreSQL, the resulting target code may be syntactically valid but behaviorally wrong.

The central problem is therefore not only how to generate a specification, but how to measure an evaluator that claims to determine whether a generated specification is faithful, complete, neutral, internally consistent, clear, and migration-aware. Existing reference-free evaluation methods provide useful building blocks, existing approaches provide useful foundations for specification evaluation, including claim-based factual consistency [8], [9], [11], question-answering verification [12], LLM-based judging [13]–[17], and code-text alignment metrics [18], [19]. However, these approaches primarily assess generated artifacts rather than systematically testing evaluators against labelled specification defects under leakage-resistant experimental conditions. However, these methods usually estimate a property of the generated text; fewer studies ask whether the evaluator itself can locate a known defect under controlled conditions.

This paper addresses that measurement problem with LRFB. It does not introduce a new specification generator and does not claim that an LLM judge is intrinsically superior to deterministic or embedding-based methods. Instead, it introduces a benchmark and experiment framework designed to test evaluators without leaking labels, to compare them with trivial shortcuts, and to measure more than a binary verdict. The contribution is deliberately methodological because two threats materialized during the study: the original record identifiers encoded the labels, and specification length alone predicted many benchmark labels.

The paper makes four contributions. First, it defines a 19-metric quality system for AI-generated Oracle PL/SQL specifications. Second, it provides a 494-pair silver benchmark with development and held-out halves and a strict ground-truth boundary. Third, it reports a controlled comparison of three LLM judges against always-issue and specification-length baselines. Fourth, it shows why category, affected-item, and evidence agreement are more informative than issue detection when a surface heuristic can match the judges.

As illustrated in Fig. 1, the proposed workflow introduces a specification quality evaluation stage between the recovery of a technology-neutral specification from legacy Oracle artifacts and its subsequent implementation in the target database dialect. The evaluation stage identifies evidence-linked defects using source-specification pairs, while target-code generation remains outside the scope of this study.

Figure

Fig. 1. Specification-driven database migration and the scope of this study. The specification is recovered from a legacy Oracle artifact and evaluated before target-dialect generation; target-code generation is outside the reported experiment.

The workflow establishes a clear boundary between specification recovery, quality evaluation, and target-code generation. By comparing the recovered specification with the original source code, the evaluator produces evidence-linked findings that support defect identification and subsequent correction. The labelled benchmark enables systematic assessment of detection accuracy, defect categorization, affected-item identification, and evidence agreement without exposing ground-truth labels during inference.

References (41)