HIL-BENCH: AI 에이전트는 언제 도움을 요청해야 할지 알고 있을까?
HiL-Bench (Human-in-Loop Benchmark): Do Agents Know When to Ask for Help?
TL;DR Highlight
AI 코딩 에이전트가 불완전한 명세를 받았을 때 언제 사람에게 질문해야 하는지 판단하는 능력을 측정하는 벤치마크.
Who Should Read
프로덕션에 코딩 에이전트(Claude Code, Codex, Cursor 등)를 도입하려는 엔지니어링 팀. AI 에이전트가 모호한 요구사항에서 왜 실패하는지 이해하고 싶은 ML/AI 엔지니어.
Core Mechanics
- 현재 SWE-bench, HumanEval 같은 벤치마크는 완전한 명세를 제공해서 '운 좋게 추측하는 에이전트'와 '올바르게 질문하는 에이전트'를 구분하지 못함. HIL-BENCH는 이 맹점을 정면으로 겨냥함.
- 완전한 정보가 주어지면 75~89% pass@3를 달성하던 모델들이, 스스로 언제 질문할지 판단해야 하는 조건에서는 4~24%로 폭락함. 이건 능력 문제가 아니라 판단력 문제.
- ASK-F1이라는 새 메트릭 도입: 질문 정밀도(Precision, 쓸데없는 질문 안 하기)와 blocker 재현율(Recall, 필요한 정보 격차 다 찾기)의 조화평균. 질문 폭탄으로 점수 올리는 치팅을 구조적으로 방지함.
- 각 모델 패밀리마다 고유한 실패 패턴이 있음: GPT 계열은 틀린 믿음으로 자신 있게 실행, Claude는 불확실성을 감지하지만 행동으로 옮기지 않음, Gemini는 외부 신호에 반응하지만 도메인 간 편차가 큼.
- blocker는 3가지 유형: 명세에 없는 정보(42%), 여러 해석이 가능한 모호한 요청(36%), 서로 모순되는 정보(22%). 각각 실제 프로덕션 장애의 전형적 패턴.
- RLVR(강화학습 기반 훈련)로 Qwen3-32B를 학습시킨 결과, 도움 요청 판단력이 학습 가능하다는 걸 증명. SQL로 학습한 모델이 SWE에서도 성능 향상을 보임 — 도메인 특화 규칙이 아니라 일반적인 불확실성 감지 능력을 학습한 것.
Evidence
- GPT-5.3-Codex는 완전한 정보로 SQL 87% pass@3를 달성하지만, ask_human() 도구가 있어도 스스로 판단해야 할 때는 5%로 급락. Ask-F1은 18.8%에 불과.
- Claude Opus 4.6는 모델 중 가장 높은 Ask-F1(SQL 62.0%)을 기록했지만, SWE에서는 28.2%로 도메인 간 격차가 가장 큼. 완전한 정보 조건 대비 여전히 -53pp 차이.
- RLVR로 훈련한 Qwen3-32B: SQL Ask-F1이 18%→46%로 +28pp 향상, pass@3도 4%→21%로 +17pp 향상. SQL로만 훈련했는데 SWE Ask-F1도 +13pp 올라 크로스 도메인 전이 확인.
- ask_human() 판정 모델(Llama-3.3-70B-Instruct)의 판정 정확도: 정밀도 97%, 재현율 91%로 사람 판정과 높은 일치율.
How to Apply
- 프로덕션 에이전트에 ask_human() 같은 질문 도구를 붙일 때, 단순히 도구만 추가하면 안 됨. 모델이 언제 질문할지 판단하는 능력 자체를 ASK-F1로 따로 평가해야 함. 현재 GPT/Claude/Gemini 모두 이 판단력이 부족함을 확인.
- RL로 에이전트를 파인튜닝할 때, 관련 blocker 질문에 +0.3, 무관한 질문에 -0.1의 비대칭 per-step 보상 + 전체 blocker 커버리지 terminal 보상을 조합하면 질문 정밀도와 재현율을 동시에 개선 가능.
- 에이전트 벤치마크를 자체 구축할 때, 명세에서 정보를 일부 제거하고 탐색 중에만 드러나는 blocker를 심어라(progressive discovery). 처음부터 모든 모호함이 보이면 실제 현장과 다른 조건이 됨.
Code Example
# HIL-BENCH ask_human() 도구 및 ASK-F1 계산 예시
def ask_human(question: str) -> str:
"""
에이전트가 불확실한 정보를 만났을 때 호출하는 도구.
Llama-3.3-70B-Instruct가 시맨틱 판정을 수행하여
등록된 blocker에 해당하면 해결책을 반환, 아니면 'irrelevant question' 반환.
"""
# 실제 구현에서는 blocker registry와 시맨틱 매칭
pass
def compute_ask_f1(questions: list[str], blockers: list[str], ask_human_fn) -> dict:
"""
ASK-F1 계산: Precision x Recall 조화평균
Args:
questions: 에이전트가 던진 질문 목록
blockers: 태스크에 등록된 blocker 목록
ask_human_fn: ask_human 도구 함수
"""
relevant_questions = set()
addressed_blockers = set()
for q in questions:
response = ask_human_fn(q)
if response != 'irrelevant question':
relevant_questions.add(q)
# 어떤 blocker를 해결했는지 추적
# (실제 구현에서는 blocker ID 매핑 필요)
addressed_blockers.add(response)
precision = len(relevant_questions) / len(questions) if questions else 0
recall = len(addressed_blockers) / len(blockers) if blockers else 0
ask_f1 = (2 * precision * recall / (precision + recall)
if (precision + recall) > 0 else 0)
return {
'precision': precision,
'recall': recall,
'ask_f1': ask_f1,
'relevant_questions': len(relevant_questions),
'addressed_blockers': len(addressed_blockers)
}
# RLVR 보상 함수 설계
def compute_reward(question: str, is_relevant: bool, is_duplicate: bool,
blockers_discovered: int, total_blockers: int,
is_terminal: bool) -> float:
"""HIL-BENCH 논문의 shaped reward 구현"""
reward = 0.0
# Per-step reward: 질문 정밀도 유도
if is_relevant and not is_duplicate:
reward += 0.3 # 관련 blocker 적중
elif not is_relevant or is_duplicate:
reward -= 0.1 # 무관하거나 중복 질문 페널티
# Terminal reward: blocker 재현율 유도
if is_terminal and blockers_discovered >= 1:
reward += blockers_discovered / total_blockers
return rewardTerminology
Related Resources
Original Abstract (Expand)
Frontier coding agents solve complex tasks when given complete context but collapse when specifications are incomplete or ambiguous. The bottleneck is not raw capability, but judgment: knowing when to act autonomously and when to ask for help. Current benchmarks are blind to this failure mode. They supply unambiguous detailed instructions and solely reward execution correctness, so an agent that makes a lucky guess for a missing requirement will score identically to one that would have asked to be certain. We present HiL-Bench (Human-in-the-Loop Benchmark) to measure this selective escalation skill. Each task contains human-validated blockers (missing information, ambiguous requests, contradictory information) that surface only through progressive exploration, not upfront inspection. Our core metric, Ask-F1, the harmonic mean of question precision and blocker recall, captures the tension between over-asking and silent guessing; its structure architecturally prevents gaming through question spam. Evaluation across SWE and text-to-SQL domains reveals a large universal judgment gap: no frontier model recovers more than a fraction of its full-information performance when deciding whether to ask. Failure analysis identifies three key help-seeking patterns: overconfident wrong beliefs with no gap detection; high uncertainty detection yet persistent errors; broad, imprecise escalation without self-correction. These consistent patterns confirm poor help-seeking is a model-level flaw, not task-specific. RL training on shaped Ask-F1 reward shows judgment is trainable: a 32B model improves both help-seeking quality and task pass rate, with gains that transfer across domains. The model does not learn domain-specific heuristics for when to ask; it learns to detect unresolvable uncertainty and act on it.