Generative AI For Diagrams As Code And Code As Diagrams
Shaik Razia,
K Jayanthi,
S Ganesh,
G Govardhan Reddy,
H M Mehataz,
K Lalitha
Modern software projects often involve extensive codebases that are difficult to navigate, document,
and keep consistent across multiple teams and repositories. Traditional documentation often becomes
outdated, leading to inconsistencies and unclear architectural insights. To address this, Generative
AI and Large Language Models (LLMs) such as ChatGPT and Claude automate the bidirectional
transformation between code and diagrams, seamlessly integrating into software workflows. The
proposed framework uses PlantUML and TikZ, to improve debugging, documentation, and versioning.
Neo4j is used for natural language retrieval, and advanced queries using Cypher as well as similarity
searches. This hybrid approach mitigates LLMrelated challenges like hallucinations by combining
database integration with prompt engineering. By consolidating code, diagrams, and metadata into a
unified resource, the framework aims to improve maintainability, collaboration, and transparency, as
demonstrated in initial qualitative use cases.