In this paper, we present GeneGPT, a novel method for teaching large language models (LLMs) to use the Web Application Programming Interfaces (APIs) of the National Center for Biotechnology Information (NCBI) and answer genomics questions. Specifically, we prompt Codex (code-davinci-002) to solve the GeneTuring tests with few-shot URL requests of NCBI API calls as demonstrations for in-context learning. During inference, we stop the decoding once a call request is detected and make the API call with the generated URL. We then append the raw execution results returned by NCBI APIs to the generated texts and continue the generation until the answer is found or another API call is detected. Our preliminary results show that GeneGPT achieves state-of-the-art results on three out of four one-shot tasks and four out of five zero-shot tasks in the GeneTuring dataset. Overall, GeneGPT achieves a macro-average score of 0.76, which is much higher than retrieval-augmented LLMs such as the New Bing (0.44), biomedical LLMs such as BioMedLM (0.08) and BioGPT (0.04), as well as other LLMs such as GPT-3 (0.16) and ChatGPT (0.12).
翻译:在本文中,我们提出了GeneGPT,这是一种新的方法,用于教授大型语言模型(LLM)使用国家生物技术信息中心(NCBI)的Web应用程序编程接口(API),并回答基因组学问题。具体而言,我们提示Codex(code-davinci-002)使用少量NCBI API调用的URL请求来解决GeneTuring测试,作为上下文学习的演示。在推理过程中,一旦检测到调用请求,我们停止解码并使用生成的URL进行API调用。然后,我们将NCBI API返回的原始执行结果附加到生成的文本中,并继续生成,直到找到答案或检测到另一个API调用。我们的初步结果表明,在GeneTuring数据集的四个一次性任务中,GeneGPT在三个任务中实现了最新的结果,并在五个零次任务中实现了四个最新的结果。总体而言,GeneGPT实现了0.76的宏平均得分,远高于检索增强的LLM,如New Bing(0.44),生物医学LLM,如BioMedLM(0.08)和BioGPT(0.04),以及其他LLM,如GPT-3(0.16)和ChatGPT(0.12)。