Abstract

Generative artificial intelligence models may face challenges generating source code for languages that rely on deep, nested metadata stored in data repositories, which can result in functionally limited or non-compilable output. A graph-constrained code generation framework can address this by extracting metadata from a target system and translating it into one or more knowledge graphs that model structural dependencies. An automated agent may traverse these graphs to perform a multi-hop context retrieval based on a developer's request. This collected context can then be used to construct a detailed, constraint-enforcing prompt for a large language model. This process of grounding the generative model in the target system's factual structure may improve the likelihood of producing code that is syntactically correct and functionally compilable within the target environment.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS