Abstract

This disclosure describes compiler-based techniques of automatic code generation using large language models (LLMs). In contrast to traditional LLM-based code generation, which uses context windows of limited lengths and which stores context globally and not on a per-file basis, the described techniques leverage the graph structure of the codebase to store context. A node of the graph is collapsed to code when all its dependencies are collapsed as well. A prompt is converted to code by collapsing each node to code. The techniques work well for software projects of arbitrary sizes, including projects with very large codebases. In contrast to traditional LLM-based code generation, which works well only for greenfield software projects, the techniques are well-suited to the more complex use case of modifying any existing codebase.

Creative Commons License

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

Share

COinS