2607.14816v1 Jul 16, 2026 cs.SE

다국어 프롬프트를 활용한 코드 생성: 선별된 벤치마크 및 코드 품질에 대한 연구

Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality

A. Mastropaolo
A. Mastropaolo
Citations: 1,435
h-index: 15
Weiyuan Ding
Weiyuan Ding
Citations: 8
h-index: 2
Saima Afrin
Saima Afrin
Citations: 182
h-index: 6
Alessandro Midolo
Alessandro Midolo
Citations: 57
h-index: 4
C. Escobar-Velasquez
C. Escobar-Velasquez
Citations: 193
h-index: 7
Mario Linares-Vásquez
Mario Linares-Vásquez
Citations: 1,041
h-index: 15
Bowen Xu
Bowen Xu
Citations: 17
h-index: 3
M. D. Penta
M. D. Penta
Citations: 22,070
h-index: 81

대규모 언어 모델(LLM)은 동일한 프로그래밍 작업을 수행할 때, 입력되는 자연어의 종류에 따라 다른 성능을 보입니다. 이를 언어 편향이라고 합니다. 이러한 현상은 일반적인 텍스트 생성에서는 광범위하게 연구되었지만, 코드 생성 품질 및 프로그래밍 규칙에는 아직까지 큰 영향을 미치는 것으로 밝혀지지 않았습니다. 본 연구에서는 GPT-4o mini, DeepSeek, Claude 모델이 생성하는 소스 코드에 프로그래밍 작업 설명을 위해 사용되는 언어가 미치는 영향을 조사합니다. 우리는 460개의 코딩 작업을 대상으로 Python (230개) 및 Java (230개)를 사용했습니다. 원래의 영어 프롬프트를 중국어, 힌디어, 스페인어, 이탈리아어로 번역하고 기술적인 의미를 유지하면서 수동으로 검토했습니다. 생성된 코드에 대해 테스트 통과율을 통한 기능적 정확성, 확립된 코드 메트릭을 사용한 구조 품질, 정적 분석 도구로 감지되는 문제점, 식별자와 주석에서 사용되는 언어와 같은 어휘적 특징 등 다양한 측면으로 평가했습니다. 연구 결과는 다음과 같습니다 (i) 영어 프롬프트가 항상 가장 높은 기능적 정확성 또는 코드 품질을 보장하는 것은 아니며, (ii) 프롬프트 언어가 미치는 영향은 프로그래밍 언어 및 LLM에 따라 다르며, (iii) 생성된 코드는 주석과 문자열 리터럴에서 자주 영어와 프롬프트 언어를 혼합하여 사용하는 것을 알 수 있습니다. 이러한 결과는 코드 생성에서의 언어 편향을 연구하기 위한 첫 번째 선별된 다국어 벤치마크를 제공하며, 보다 강력한 다국어 코드 생성 시스템 개발에 대한 통찰력을 제시합니다.

Original Abstract

Large Language Models (LLMs) perform differently on identical programming tasks when prompted in different natural languages, a phenomenon known as language bias. While this behavior has been widely studied for general text generation, its impact on code generation quality and programming conventions remains largely unexplored. We investigate how the language used to describe programming tasks affects the source code generated by GPT-4o mini, DeepSeek, and Claude. Our study comprises 460 coding tasks spanning Python (230) and Java (230). We translate and manually curate the original English prompts into Chinese, Hindi, Spanish, and Italian while preserving their technical meaning. We evaluate the generated code using multiple dimensions, including functional correctness through test pass rates, structural quality using established code metrics, issues detected by static analysis tools, and lexical characteristics such as the language used in identifiers and comments. Our results show that (i) English prompts do not consistently produce the best functional correctness or code quality, (ii) the impact of prompt language depends on both the programming language and the LLM, and (iii) generated code frequently mixes English with the prompt language in comments and string literals. These findings provide the first curated multilingual benchmark for studying language bias in code generation and offer insights for developing more robust multilingual code generation systems.

0 Citations
0 Influential
30 Altmetric
150.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!