llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Recommendations for Optimizing the Process of Using Generative Tools to Assist with Contributions

Open zhangweize9-cyber opened this issue 3 months ago • 2 comments

A Very Long General Preface

First, I'd like to clarify that on January 20 of this year, because I wasn't familiar with the project's submission guidelines, I also tried using generative tools to replace some of the content I would have written for my issue. The specific details are here if you’re interested, you can take a look my first issues (it’s probably a pretty embarrassing moment in my history).

Later, I realized my skills weren't up to par, so I shifted my focus from submitting issues to reviewing others' pull requests to see how they were being used. I truly caused some trouble for the community back then, and I'm deeply sorry for that. But precisely because of this, I've been reflecting on one question: What exactly led me to use generative tools to submit issues in the first place?

Although I still use generative tools to assist with my daily development workflow, when I implement solutions provided by these tools, I spend most of my time debugging locally and running continuous tests using C++'s built-in diagnostic server.

In doing so, I've also discovered a drawback: the APIs provided in the official documentation are always up to date, whereas the advantage of generative tools lies in providing emotional value and guiding you on how to search for and retrieve information more efficiently.

I've noticed an issue when using generative tools. Since these tools infer responses to user prompts based on existing pre-trained context, the code they generate may not be up-to-date, and the language used tends to be formulaic. Furthermore, sometimes generative tools produce solutions that appear error-free but are actually riddled with problems—and I find this scenario to be the most concerning.

If this is truly your first time submitting a contribution, I suggest you start by reviewing other people's pull requests. Get a clear understanding of the overall project architecture and the community's coding style before writing your own pull request. If you're really unsure how to proceed, you can look up definitions in the official documentation or install an integrated development and testing environment on your own device and use the language server’s definition-lookup feature to dive deeper into the source code.

All in all, I'll stick to my original point: I'm not opposed to using generative tools for development, but the answers they provide may contain "hallucinations" and even humans might not be able to pinpoint where the problem lies. You can use generative tools, but it's best to have a thorough understanding of how these APIs work. If you really must use them, it’s best to provide a prompt:

I’m a beginner who doesn’t have a particularly deep understanding of project architecture. I need you to explain in detail each function in this code snippet, how their parameters are defined, and how these functions work. Please also provide links to the sources so I can verify the information.

A Small Feature Request

As I mentioned at the beginning, I was thinking about one question at the time:

What exactly led me to use generative tools to submit issues in the first place?

I believe there are three reasons for this:

  • First, generative AI due to insufficient pre training data and limited human oversight of the generated results often produces content that adheres to the linguistic style inherent in the generative AI model itself, which in turn may, to some extent, influence people’s behavior. For example, ChatGPT's language style tends to be rigorous, while Gemini's is more exploratory and open-ended; the former gives people a sense of professionalism and reliability, while the latter encourages people to take the initiative and engage in continuous trial and error.

  • Second, when people first start using this tool, its outstanding performance in specific scenarios creates a false sense of invincibility, making them feel as though they can do anything. If used properly, it can help them push beyond their limits; otherwise, it may lead to the opposite extreme.

  • Last but not least, it ultimately comes down to our own actions. I know this view may seem a bit harsh, but when we review others’ code, this is often the cold, hard truth. We can’t guarantee that everyone will think the same way; all we can do is provide a general direction to guide people toward the right course of action.

So, taking these three points into account, the general plan I’ve come up with is as follows:

We can draw inspiration from the strategy used by creators on YouTube, who proactively label their content as AI-generated when uploading videos. Perhaps we can take this a step further by adding a required input field to the existing system:

If you used generative AI technology, please list the prompt and specific model you used below so that we can verify the source of the information.

That's all I can think of for now. If you have any better suggestions, please feel free to share them! My own ideas still have quite a few limitations.

zhangweize9-cyber avatar Aug 13 '26 07:08 zhangweize9-cyber

I accidentally posted it in the wrong place; I actually meant to upload it to zenodo but didn't pay close enough attention to the webpage interface.

zhangweize9-cyber avatar Aug 13 '26 19:08 zhangweize9-cyber

Emmmm, the original text has been uploaded to zenodo. If you need to cite it, please indicate the source yourself. Thank you for your cooperation!

[10.5281/zenodo.21929655](https://doi.org/10.5281/zenodo.21929655)

zhangweize9-cyber avatar Aug 14 '26 06:08 zhangweize9-cyber