mlsanityData to 14 Oct 2026

Can LLMs Replace Humans During Code Chunking?

arXiv 2506.19897 ↗First posted 24 Jun 2025cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have become essential tools in computer science, especially for tasks involving code understanding and generation. However, existing work does not address many of the unique challenges presented by code written for government applications. In particular, government enterprise software is often written in legacy languages like MUMPS or assembly language code (ALC) and the overall token lengths of these systems exceed the context window size for current commercially available LLMs. Additionally, LLMs are primarily trained on modern software languages and have undergone limited testing with legacy languages, making their ability to understand legacy languages unknown and, hence, an area for empirical study. This paper examines the application of LLMs in the modernization of legacy government code written in ALC and MUMPS, addressing the challenges of input limitations. We investigate various code-chunking methods to optimize the generation of summary module comments for legacy code files, evaluating the impact of code-chunking methods on the quality of documentation produced by different LLMs, including GPT-4o, Claude 3 Sonnet, Mixtral, and Llama 3. Our results indicate that LLMs can select partition points closely aligned with human expert partitioning. We also find that chunking approaches have significant impact on downstream tasks such as documentation generation. LLM-created partitions produce comments that are up to 20% more factual and up to 10% more useful than when humans create partitions. Therefore, we conclude that LLMs can be used as suitable replacements for human partitioning of large codebases during LLM-aided modernization.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 21 of its 25 references that are in the map. First posted on arXiv 24 Jun 2025.

Builds on

21 of 25 references.

References · 21

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  4. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
  5. 2024A Survey on Large Language Models for Code Generationcited by 658
  6. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
  7. 2024Summary of a Haystack: A Challenge to Long-Context LLMs and RAG Systemscited by 87
  8. 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 85
  9. 2024Is Semantic Chunking Worth the Computational Cost?cited by 43
  10. 2024LumberChunker: Long-Form Narrative Document Segmentationcited by 36
  11. 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
  12. 2024The Chronicles of RAG: The Retriever, the Chunk and the Generatorcited by 34
9 more
  1. 2024Grounding Language Model with Chunking-Free In-Context Retrievalcited by 30
  2. 2024Extending LLMs' Context Window with 100 Samplescited by 21
  3. 2024An Empirical Study on the Code Refactoring Capability of Large Language Modelscited by 19
  4. 2024From RAGs to rich parameters: Probing how language models utilize external knowledge over parametric information for factual queriescited by 16
  5. 2024Python Symbolic Execution with LLM-powered Code Generationcited by 10
  6. 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
  7. 2024Leveraging LLMs for Legacy Code Modernization: Challenges and Opportunities for LLM-Generated Documentationcited by 6
  8. 2024Instruct or Interact? Exploring and Eliciting LLMs' Capability in Code Snippet Adaptation Through Prompt Engineeringcited by 6
  9. 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithmcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.