Intelligent Code Comments Morphing and Generation
摘要
Technologists with various personas such as data scientists, software architects, software engineers, data engineers and research scientists spend hours writing piece of code, using different algorithms and commenting their code snippets or scripts. However, it takes considerable amount of time to comment the code and customize these comments based on the knowledge level of audience. In an ideal world, if everyone belongs to the same persona which means similar background and skill set, having the same set of comments on source code repositories should be perfect. But with the advent of multiple personas in the recent years, there needs to be a mechanism wherein the comments are synthesized and custom tailored dynamically based on the persona viewing the code. The comments should be added at appropriate instances of the code to make it more readable, contextual, meaningful depending on the persona of the reader. In our paper, we propose a novel method to consider persona into account to generate comments for the source code using Natural Language Processing (NLP) and generative AI. The generated comments will takes into account the context and intention while writing the code. It also includes a real time feedback loop which helps enhance the persona understanding and model improvement.