The emergence of Large Language Models (LLMs) has improved software development efficiency, but their performance can be hindered by training data limitations and prompt design issues. Existing LLM development tools often operate as black boxes, with users unable to view the prompts used and unable to improve performance by correcting prompts when errors occur. To address the aforementioned issues, GPTutor was introduced as an open-source AI pair programming tool, offering an alternative to Copilot. GPTutor empowers users to customize prompts for various programming languages and scenarios, with support for 120+ human languages and 50+ programming languages. Users can fine-tune prompts to correct the errors from LLM for precision and efficient code generation. At the end of the paper, we underscore GPTutor's potential through examples, including demonstrating its proficiency in interpreting and generating Sui-Move, a newly introduced smart contract language, using prompt engineering.
翻译:摘要:大型语言模型(LLMs)的出现提升了软件开发效率,但其性能可能受训练数据局限性及提示设计问题的制约。现有基于LLM的开发工具多呈现为黑箱运作,用户既无法查看所用提示,也无法在错误发生时通过修正提示来改善性能。针对上述问题,本文提出GPTutor这一开源AI结对编程工具,作为Copilot的替代方案。GPTutor赋予用户为不同编程语言和场景定制提示的能力,支持120余种人类语言及50余种编程语言。用户可通过微调提示修正LLM生成的错误,实现精准高效的代码生成。文末通过案例突显GPTutor的潜力,包括展示其运用提示工程解析并生成新型智能合约语言Sui-Move代码的能力。