Skip to main content
QUICK REVIEW

[논문 리뷰] A Preliminary Analysis on the Code Generation Capabilities of GPT-3.5 and Bard AI Models for Java Functions

Giuseppe Destefanis, Silvia Bartolucci|arXiv (Cornell University)|2023. 05. 16.
Scientific Computing and Data Management인용 수 17
한 줄 요약

본 논문은 CodingBat 함수 설명으로부터 Java 코드를 생성하는 과정에서 GPT-3.5와 Bard를 비교한다; GPT-3.5는 약 90.6%의 정확도를 달성했고, Bard는 53.1%를 달성했다.

ABSTRACT

This paper evaluates the capability of two state-of-the-art artificial intelligence (AI) models, GPT-3.5 and Bard, in generating Java code given a function description. We sourced the descriptions from CodingBat.com, a popular online platform that provides practice problems to learn programming. We compared the Java code generated by both models based on correctness, verified through the platform's own test cases. The results indicate clear differences in the capabilities of the two models. GPT-3.5 demonstrated superior performance, generating correct code for approximately 90.6% of the function descriptions, whereas Bard produced correct code for 53.1% of the functions. While both models exhibited strengths and weaknesses, these findings suggest potential avenues for the development and refinement of more advanced AI-assisted code generation tools. The study underlines the potential of AI in automating and supporting aspects of software development, although further research is required to fully realize this potential.

연구 동기 및 목표

  • CodingBat.com에서 출처한 함수 설명으로부터 Java 코드를 생성하는 GPT-3.5와 Bard의 능력을 평가한다.
  • CodingBat.com's 실시간 테스트 시스템을 사용하여 생성된 코드의 정확도를 평가한다.
  • 각 모델이 뛰어난 영역과 어려움을 겪는 범주를 식별하여 AI 지원 코드 생성을 안내한다.

제안 방법

  • Warmup, String-3, Array-3, Functional-2, Recursion-2인 다섯 개의 CodingBat 섹션에서 64개의 Java 함수 설명을 수집한다.
  • 각 설명으로 GPT-3.5와 Bard에 프롬프트를 걸어 Java 코드를 생성하도록 한다.
  • CodingBat.com 테스트 케이스를 사용하여 생성된 코드의 정확도를 평가한다.
  • 같은 함수 설명에 대해 모델의 성공률을 비교하기 위해 McNemar 검정을 적용한다.

실험 결과

연구 질문

  • RQ1기능 설명에서 올바른 Java 코드를 생성하는 데 GPT-3.5와 Bard는 어떻게 비교되는가?
  • RQ2문제 카테고리 전반에서 GPT-3.5가 일관되게 Bard를 능가하는가, 그리고 통계적으로 유의미한 차이가 있는가?
  • RQ3어떤 문제 카테고리가 두 모델 모두에게 가장 어려움을 주는가?

주요 결과

  • GPT-3.5는 64개 설명 중 약 90.6%에 대해 올바른 코드를 생성했고; Bard는 53.1%이다.
  • 네 가지 문제 카테고리에서 GPT-3.5가 Bard보다 우수했다.
  • Bard는 더 복잡한 카테고리에서 어려움을 겪었고(주로 String-3, Array-3, Recursion-2), Functional-2에 대해선 모든 설명에서 올바른 코드를 생성했다.
  • 두 모델 모두 Functional-2 과제의 모든 문제를 올바르게 코딩하지만, 다른 카테고리의 모든 문제를 양 모델이 모두 올바르게 해결한 것은 아니다.
  • McNemar 검정은 성공률에 통계적으로 유의한 차이가 있음을 나타내며, GPT-3.5가 Bard를 능가했다 (p = 0.0001768).
  • 실패 예시는 Bard의 잘못된 해답과 GPT-3.5의 올바른 접근 방식(예: front3)을 보여준다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.