Home / Companies / vFunction / Blog / Post Details
Content Deep Dive

LLMs vs. brownfield reality: Why refactoring enterprise systems is hard

Blog post from vFunction

Post Details
Company
Date Published
Author
Moti Rafalin
Word Count
1,299
Language
English
Hacker News Points
-
Summary

In the context of modernizing legacy enterprise systems, large language models (LLMs) face significant limitations due to their inability to comprehend the intricate business domains and operational behaviors that are essential for effective system transformation. Unlike creating new code, modernization involves preserving existing functions while refactoring complex, tightly coupled components, which demands a comprehensive understanding of runtime dependencies and logical boundaries—areas where LLMs typically struggle. These models are often biased toward generating new code rather than engaging in the nuanced, behavior-preserving refactoring needed in brownfield environments, where accuracy and system stability are paramount. Additionally, LLMs' token limits hinder their ability to maintain a global view of large, interconnected systems, leading to fragmented and potentially conflicting refactoring efforts. To address these challenges, a data-driven approach combining runtime analysis, data science, and human oversight is recommended, enabling teams to define precise refactoring tasks within a well-understood architectural context. By shifting from a perspective of merely generating code to orchestrating refactoring, developers can use LLMs effectively as execution engines within bounded, deterministic frameworks, ensuring that modernization efforts are both reliable and aligned with organizational goals.