

- A bank used AI to translate 30 years of COBOL to Java.
Perfect syntax. Code compiled. Unit tests passed.
Production deployment crashed the database.
70-80% of legacy modernization projects fail. Here's why 🧵
#LegacyModernization #EnterpriseAI - The AI translated a COMPUTE statement involving variable TRN-LIMIT.
Problem: TRN-LIMIT was defined in a COPYBOOK file thousands of lines away, outside the AI's context window.
The AI hallucinated a definition. - Worse: The COPYBOOK had a REDEFINES clause—same memory address, two data types based on a flag in another module.
Mainframe: Packed decimal
Java: Standard integer
Type mismatch = corrupted binary data = database integrity failure.
This is "Lost in the Middle" syndrome: - LLMs have high accuracy at START and END of long prompts.
Performance degrades significantly for information in the MIDDLE.
In enterprise code, critical dependencies are often buried mid-file.
#AIEngineering - The legacy crisis:
• 95% of ATM transactions run on COBOL
• 43% of banking systems built on pre-internet code
• $1.52 trillion in U.S. technical debt
• 80% of federal IT budget = maintenance (20% = innovation)
We're running modern finance on Cold War tech. - Code isn't text. It's a GRAPH.
• Variables have dependencies
• Functions call other functions
• State changes propagate across modules
Text chunking breaks these relationships. You lose the topology.
#KnowledgeGraphs - Generic AI uses arbitrary token limits (500 tokens, 2000 tokens).
This splits functions mid-logic, cuts variable definitions from usage sites.
Veriprajna uses AST parsing: respects logical boundaries (function = discrete unit).
Veriprajna's approach: - 1. Parse entire repo into Abstract Syntax Trees
2. Build call graphs and dependency matrices
3. Calculate Transitive Closure (all dependency chains)
4. GraphRAG retrieves via structural relationships, not keywords - Standard RAG: "Find code chunks with word 'payment'"
→ Misses GlobalVarDef.cbl which defines tax rate used by payment logic (doesn't mention "payment")
GraphRAG: "Find all nodes with edges to PaymentLogic node"
→ Retrieves tax rate definition deterministically. - Legacy modernization is a graph problem, not a text problem.
Stop translating line-by-line. Map the repository topology.
Veriprajna specializes in repository-aware knowledge graphs for enterprise systems. - 📖 Read the full technical whitepaper here: https://veriprajna.com/whitepapers/architecture-of-understanding-legacy-modernization-knowledge-graphs
📧 [email protected]
🌐 https://veriprajna.com
💬 WhatsApp: +919217059957
#SoftwareEngineering #GraphRAG - @eibrahim Totally agree. Syntax translation is the easy part — the real danger is hidden semantics spread across COPYBOOKs, REDEFINES, and shared state.
- Stranglers and feature flags only work if you’ve mapped those dependencies first. Otherwise you’re just discovering them in prod 😅