Metraipolis › archive › dc_9b4432d279b8

Beyond Vector Similarity: Hierarchical Context-Aware Graph RAG vs Standard RAG in Enterprise Code Migration — arXiv:2609.12464

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.12464
License (as archived)
CC0-1.0
Archived
2026-10-16T03:02:46.574Z
SHA-256 of the archived text
cd00e8d0069c558abf5d0e9b8166791a021ad675d7d94648e7f29d072b00b958
Stable URL of this page
https://metraipolis.com/documento/dc_9b4432d279b8

How to cite

Beyond Vector Similarity: Hierarchical Context-Aware Graph RAG vs Standard RAG in Enterprise Code Migration — arXiv:2609.12464 — arXiv (en), https://arxiv.org/abs/2609.12464 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_9b4432d279b8 (Metraipolis archive dc_9b4432d279b8, sha256 cd00e8d0069c558abf5d0e9b8166791a021ad675d7d94648e7f29d072b00b958)
BibTeX
@misc{dc9b4432d279b8,
  title = {Beyond Vector Similarity: Hierarchical Context-Aware Graph RAG vs Standard RAG in Enterprise Code Migration — arXiv:2609.12464},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.12464},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_9b4432d279b8; sha256 cd00e8d0069c558abf5d0e9b8166791a021ad675d7d94648e7f29d072b00b958},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.12464. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

As enterprises modernize legacy monolithic systems to microservices, Large Language Models (LLMs) are heavily utilized for automated code translation. However, traditional vector-based Retrieval-Augmented Generation (Standard RAG) struggles to capture topological relationships. It fetches isolated chunks that sever inheritance chains, leading to high compilation failure rates. This paper introduces a Hierarchical Context-Resident Graph (HCRG) methodology to resolve these limitations. Our pipeline uses tree-sitter for Abstract Syntax Tree (AST) extraction, maps architectural edges into a Google Cloud Spanner Property Graph, and serializes this structure into a Gemini Context Cache for topological, parent-first code translation. We shift evaluation from naive text-overlap to a custom 7-metric Software Engineering framework. Traditional metrics like CodeBLEU (which scored 91% for both methods) effectively masked Standard RAG's structural failures behind syntactically plausible but broken code. Empirically, Graph RAG decisively mitigates dependency loss: API hallucination rates dropped from 56.4% to 16.2%, Dependency Resolution Quality improved from 34.8% to 65.9%, and Parent-Child Consistency rose from 26.7% to 45.5%. However, Graph RAG introduces specific trade-offs. The dense global context causes defensive over-engineering by the LLM, reducing Cyclomatic Complexity Consistency from 71.6% to 46.7%, and slightly degrades Docstring Preservation (67.0% to 61.0%). Ultimately, while trading code complexity for reduced hallucinations, Graph RAG provides a substantially more viable, architecturally sound path for automated enterprise codebase modernization.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-14 in cs.AI).
Categorie arXiv: Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2609.12464 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-16T02:51:27.797Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-14?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).