![[P] Utilizing graph attention-based neural networks and generative AI to build a tool to automate debugging and refactoring Python code](https://jfbmhhfxbbrxcmwilqxt.supabase.co/storage/v1/object/public/resource-images/MachineLearning_AI_automation_tools_20250328_191208_processed_image.jpg)
[P] Utilizing graph attention-based neural networks and generative AI to build a tool to automate debugging and refactoring Python code
For the last two years, I and three others have been working on a project we started in a research lab. The project is to create a tool that can automatically identify complex programming errors from source code that require a contextual understanding of the code. For this, we have built a graph attention-based neural network that is used to classify problematic code and embed context info. We employ a two-stage system for accurately embedding context information within a single graph. First, we split up the source code into semantic tokens through an nlp2 tokenizer and generate 80-bit vector embeddings using FastText, which has been trained on code snippets of a particular language.
We then map those text tokens to groupings identified in the abstract syntax tree, excluding the individual nodes for each text token, opting instead for the function call with attributes as the smallest individual grouping, averaging the embeddings across each token type.
The seed data for the system consists of code changes and their surrounding documentation on why a given code change was made. For this, we utilize a BERTopic-based topic modeling system to identify and categorize the reason why the given change was made from the docs.
For the explanations and code recommendations, we utilize generative AI models. They are promising for this purpose as we are able to pass enriched context to them along with the problematic code, hoping to receive more accurate outputs.
We are just looking for feedback on if the project currently provides any value to Python users. We've published the first version of the tool on vscode marketplace. It's of course free to use, and we'd appreciate any feedback on it.
As it's not a weekend, let me know if you are interested to try the tool and give us your thoughts on it.
Vibe Score

0
Sentiment

0
Rate this Resource
Join the VibeBuilders.ai Newsletter
The newsletter helps digital entrepreneurs how to harness AI to build your own assets for your funnel & ecosystem without bloating your subscription costs.
Start the free 5-day AI Captain's Command Line Bootcamp when you sign up: