NobleBlocks

Research index

Gemini automatically generate code comments

Mao

Figshare1 Jan 2024Open access

NobleIDark:/48914/w1/20260525/32A6D4A6DOI10.6084/m9.figshare.25144871.v3

Free to read at the publisher

You can read the abstract here, or the full text at the publisher.

Read at the publisher

Abstract

Automatic code Summarization generation technology is widely used in the development and maintenance of smart contracts. In recent years, with the advent of Large Language Models (LLMs), Gemini has received a lot of attention as the first Large Multimodal Models (LMMs) to support multimodal input. However, it is unclear how LMMs can generate contract code summarization from multimodal inputs. In this paper, we focus on evaluating Gemini on real-world smart contracts, comparing it to the MMTrans, and exploring how to combine multimodal prompts to generate a contract code summarization. We adopt several widely used metrics (BLEU, METEOR, and ROUGE-L) to measure the quality of the generated summarization. Our experiments show that Gemini-Pro-Vision achieves 21.17\% and 21.05\% scores for code comments generated by three-shot prompts under METEOR and ROUGE-L metrics. The above scores are better than those generated by one-shot and five-shot prompts.

Discussion

Topics

More

Suggest a correction or report