← 전체 결과로 돌아가기
Benchmark ELI5 · code generation

설명서를 주고,
작동하는 코드를 만들게 한다

BigCodeBench는 “코드가 그럴듯해 보이나?”를 묻지 않습니다. 모델이 만든 Python 코드를 실제 테스트에 넣어 돌리고, 첫 답이 모든 검사를 통과하면 1점입니다.

우리 실행 91개strict 분석 87개Pass@1실제 Python 실행

놀이로 비유하면

레고 설명서를 읽고 자동차를 한 번 만드는 시험입니다. 심사위원은 모양을 보고 박수치지 않습니다. 바퀴가 도는지, 핸들이 움직이는지, 사고 상황에서도 멈추지 않는지를 직접 확인합니다.

01문제 설명해야 할 일, 입력·출력, 예시를 줍니다.
02고정된 시작 코드함수 이름과 signature는 다섯 조건 모두 그대로입니다.
03모델의 Python한 조건당 답 하나를 생성합니다.
04Unit tests전부 통과하면 Pass@1=1, 하나라도 실패하면 0입니다.

실제로 나온 문제

아래는 동결된 실험 데이터의 BigCodeBench/1040입니다. 편집해서 만든 예시가 아닙니다.

비차단 echo server 만들기BigCodeBench/1040
Original EN instruction

Run a non-blocking echo server that appends the server's current time to received data and sends it back to the client, while handling exceptional conditions for each socket.

고정 출력 요구: 서버 동작과 실행 시간을 알려주는 문자열을 반환해야 합니다. 시작 코드는 task_func(server_address, server_port, buffer_size, run_duration)로 고정됩니다.
EN

Run a non-blocking echo server that appends the server's current time to received data and sends it back to the client, while handling exceptional conditions for each socket.

KO

수신한 데이터에 서버의 현재 시간을 덧붙여 클라이언트에 다시 전송하고, 각 소켓의 예외 상황을 처리하는 비차단 에코 서버를 실행하세요.

MIX1

수신한 data에 server의 현재 시간을 덧붙여 client에 다시 전송하고, 각 socket의 예외 상황을 처리하는 비차단 echo server를 실행하세요.

MIX2

수신한 data에 server의 current time을 덧붙여 client에 다시 전송하고, 각 socket의 exception condition을 처리하는 non-blocking echo server를 실행하세요.

MIX3

수신한 data에 server의 current time을 덧붙여 client에 다시 전송하고, 각 socket의 exception condition을 처리하는 non-blocking echo server를 run하세요.

모델이 실제로 받은 전체 MIX3 프롬프트 보기
수신한 data에 server의 current time을 덧붙여 client에 다시 전송하고, 각 socket의 exception condition을 처리하는 non-blocking echo server를 run하세요.
function은 다음과 함께 output해야 합니다:
    str: server의 동작 및 execution time을 나타내는 status message.
다음으로 시작하는 자체 완결적인 code를 write해야 합니다:
```
import socket
import select
import queue
from datetime import datetime, timedelta
def task_func(
    server_address="localhost", server_port=12345, buffer_size=1024, run_duration=5
):
```

모델의 실제 출력

두 번째 독립 실행에서 MIX3가 낸 답입니다. 아래 코드는 요약본이 아니라 저장된 응답 전문입니다.

Replicate 2 · MIX3 output · FAIL
```python
import queue
import select
import socket
from datetime import datetime, timedelta


def task_func(
    server_address="localhost",
    server_port=12345,
    buffer_size=1024,
    run_duration=5,
):
    """Runs a non-blocking echo server that appends the server's current time

    to received data before echoing it back to the client. Handles socket
    exception conditions and runs for a specified duration.

    Args:
        server_address (str): The server hostname or IP address to bind to.
        server_port (int): The port number to listen on.
        buffer_size (int): The buffer size for receiving data.
        run_duration (int): Duration in seconds for which the server runs.

    Returns:
        str: Status message indicating server operation and execution time.
    """
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    server.setblocking(False)
    server.bind((server_address, server_port))
    server.listen(5)

    inputs = [server]
    outputs = []
    message_queues = {}

    start_time = datetime.now()
    end_time = start_time + timedelta(seconds=run_duration)

    while datetime.now() < end_time:
        remaining_time = max(0.0, (end_time - datetime.now()).total_seconds())
        if remaining_time == 0:
            break

        readable, writable, exceptional = select.select(
            inputs, outputs, inputs, remaining_time
        )

        for s in readable:
            if s is server:
                try:
                    connection, client_address = s.accept()
                    connection.setblocking(False)
                    inputs.append(connection)
                    message_queues[connection] = queue.Queue()
                except socket.error:
                    pass
            else:
                try:
                    data = s.recv(buffer_size)
                    if data:
                        current_time_str = datetime.now().strftime(
                            " %Y-%m-%d %H:%M:%S"
                        )
                        response = data + current_time_str.encode("utf-8")
                        message_queues[s].put(response)
                        if s not in outputs:
                            outputs.append(s)
                    else:
                        if s in outputs:
                            outputs.remove(s)
                        inputs.remove(s)
                        s.close()
                        message_queues.pop(s, None)
                except socket.error:
                    if s in outputs:
                        outputs.remove(s)
                    inputs.remove(s)
                    s.close()
                    message_queues.pop(s, None)

        for s in writable:
            try:
                next_msg = message_queues[s].get_nowait()
                s.send(next_msg)
            except queue.Empty:
                if s in outputs:
                    outputs.remove(s)
            except socket.error:
                if s in outputs:
                    outputs.remove(s)
                if s in inputs:
                    inputs.remove(s)
                s.close()
                message_queues.pop(s, None)

        for s in exceptional:
            if s in inputs:
                inputs.remove(s)
            if s in outputs:
                outputs.remove(s)
            s.close()
            message_queues.pop(s, None)

    # Clean up any remaining open sockets
    for s in inputs:
        s.close()

    elapsed_time = (datetime.now() - start_time).total_seconds()
    return f"Server successfully ran and stopped after {elapsed_time:.2f} seconds."
```
0점

이 응답은 unit test 2개를 통과하지 못했습니다. 저장된 공개 분석 artifact에는 상세 exception 문구를 싣지 않았으므로, 여기서는 실패 원인을 단정하지 않습니다.

같은 샘플을 세 번 실행한 결과
조건
Run 1
Run 2
Run 3
EN
PASS
PASS
PASS
KO
PASS
PASS
PASS
MIX1
PASS
PASS
PASS
MIX2
PASS
PASS
PASS
MIX3
FAIL
FAIL
FAIL

이 시험의 성격

좋은 점

  • 문법이 아니라 실제 동작을 봅니다.
  • 함수 signature, 라이브러리, 숫자 조건을 그대로 고정할 수 있습니다.
  • API·파일·데이터 처리처럼 기술 용어가 풍부해 MIX 조건을 만들기 좋습니다.

주의할 점

  • 네트워크·시간·외부 파일에 기대는 테스트는 evaluator artifact가 생길 수 있습니다.
  • 생성 코드가 길고 갈림길이 많아 같은 설정으로 다시 물어도 결과가 바뀝니다.
  • 정적 공개 benchmark라 최신 모델의 오염 가능성을 완전히 없앨 수 없습니다.

실제 풀에는 이런 문제도 있습니다

BigCodeBench/10030일치 무작위 시계열을 만들고 Arial 글꼴로 line plot을 그리는 함수
BigCodeBench/1003URL에서 XML을 받아 parsing한 뒤 pandas DataFrame으로 바꾸는 함수
BigCodeBench/1004텍스트 파일을 내려받아 단어 빈도를 세고 상위 10개를 bar chart로 그리는 함수
이 페이지의 핵심: BigCodeBench 점수는 “답변 문장이 좋다”가 아니라 “첫 번째 코드가 모든 실행 검사를 통과했다”는 뜻입니다. 그래서 작은 표현 차이가 코드의 선택을 바꾸면 점수가 바로 1에서 0으로 바뀔 수 있습니다.