TL;DR
This paper introduces a robust, reference-free framework for estimating the confidence of LLM-generated summaries for legacy COBOL code. By combining inter-model agreement (LLM-as-judge), token-level perplexity, and automated code coverage analysis, the system can automatically triage documentation, identifying high-quality summaries for auto-deployment while flagging uncertain or incomplete ones for human expert review.
What Problem Does This Paper Address?
The world runs on billions of lines of COBOL, yet the original developers are retiring, and documentation is often non-existent. While Large Language Models (LLMs) are excellent at generating summaries for this legacy code, evaluating their accuracy is a "chicken and egg" problem: traditional metrics like BLEU or ROUGE require a human-authored "ground truth" reference to compare against. In legacy enterprise environments, those references simply don't exist.
The authors address the challenge of reference-free evaluation. How can we trust an AI's explanation of a mission-critical financial paragraph if we don't have a manual baseline to verify it?
Methods
The authors propose a multi-metric ensemble framework that doesn't just look at one signal, but three distinct "pillars" of confidence:
- Inter-model Agreement (LLM-as-judge): The system generates summaries using three different models (e.g., LLaMA 3.3-70B, Grok-3, and an Infosys-tuned OpenAI model). A dedicated "judge" model then performs pairwise comparisons. If multiple independent models agree on the logic, the summary is likely correct.
- Token-Level Confidence (Perplexity): The system extracts the log-probabilities of the generated tokens. High perplexity (Figure 2) indicates the model was "surprised" or uncertain during generation, which often correlates with subtle semantic errors even if the text looks fluent.
- Code Coverage (G-Eval): Using a technique called G-Eval, an LLM acts as a reviewer to check if the summary actually accounts for all significant logic (e.g., conditional branches, I/O operations). This catches "omission errors" where a model provides a consistent but incomplete summary.
The final confidence score is calculated using a calibrated aggregation rule. It uses "linear pooling" for supportive evidence but applies a "conjunctive penalty"—meaning it significantly slashes the score only if multiple models corroborate a contradiction.
Datasets
The researchers evaluated their framework using the AWS CardDemo repository, an open-source COBOL codebase representing a credit card management system.
- Sample Size: 100 representative COBOL code chunks (paragraphs/sections).
- Ground Truth: To validate the framework's performance, domain experts with 15+ years of mainframe experience manually authored reference summaries to compare against the system's automated confidence scores.
Key Insights and Ideas
- Agreement as a Proxy for Truth: The core intuition is that while one model might hallucinate, it is statistically unlikely for three diverse models to hallucinate the exact same incorrect business logic.
- The "Silent Killer" of Omissions: A summary can be perfectly accurate regarding what it does say, but dangerous if it misses a critical "ELSE" branch. The G-Eval coverage metric (Figure 3) acts as a multiplicative penalty to catch these gaps.
- Triage over Replacement: The goal isn't to eliminate humans, but to automate the "easy" 60% of documentation so that expensive human experts can focus their limited time on the 40% of code where the AI is actually struggling.
Key Results
The framework demonstrated high reliability in "triaging" AI output:
- High Precision: For summaries marked as "High Confidence" (Score $\geq$ 7.0), 94% were validated by human experts as acceptable for operational use.
- Effective Triage: The system successfully identified 100% of the "problematic" low-confidence cases.
- Efficiency Gains: By using this method, organizations could auto-deploy 57% of documentation without manual intervention, reducing the human review burden by more than half while maintaining high quality.
Limitations and Future Work
The authors acknowledge a few key hurdles:
- Correlated Errors: If all models are trained on the same underlying data, they might share the same "blind spots." If every model is wrong in the same way, the agreement metric will fail.
- Domain-Specific Jargon: The system occasionally flagged high-quality summaries as "low confidence" simply because they used rare, mainframe-specific terminology (like TPF-specific constructs) that increased perplexity.
- Future Directions: The authors suggest rotating "anchor" models to avoid bias and integrating static analysis facts (like call graphs) directly into the prompts to further reduce "granularity drift" between different model outputs.
Summary updated