AI Agent Framework Translates Legacy Fortran Code to Devito
A new approach for AI agents merges Retrieval-Augmented Generation (RAG) with open-source Large Language Models to break down older finite-difference code and adapt it for the Devito framework. This method employs a LangGraph architecture with multiple iterative stages. It creates a knowledge graph for Devito using techniques like document parsing, extracting relationships, structure-aware segmentation, and community detection based on Leiden. The GraphRAG optimization enhances query efficiency across different semantic areas, such as seismic wave simulation and computational fluid dynamics. Moreover, a reverse engineering component develops three-tier query strategies for RAG retrieval by analyzing Fortran source code. You can find more about this research in arXiv:2601.18381.
Key facts
- The AI agent framework uses RAG and open-source LLMs.
- It is designed to translate legacy finite-difference code to Devito.
- The system uses a hybrid LangGraph architecture.
- A knowledge graph is built using document parsing and community detection.
- GraphRAG optimization improves query performance.
- Reverse engineering derives three-level query strategies from Fortran code.
- The multi-stage retrieval pipeline provides contextual information.
- The paper is available on arXiv with ID 2601.18381.
Entities
Institutions
- arXiv