ChatPaper.aiChatPaper

테스트 주도 AI 에이전트 정의(TDAD): 행동 명세로부터 도구 사용 에이전트 컴파일하기

Test-Driven AI Agent Definition (TDAD): Compiling Tool-Using Agents from Behavioral Specifications

March 9, 2026
저자: Tzafrir Rehan
cs.AI

초록

우리는 Test-Driven AI Agent Definition(TDAD)을 제안합니다. 이 방법론은 에이전트 프롬프트를 컴파일된 아티팩트로 취급합니다. 엔지니어가 행동 명세를 제공하면, 코딩 에이전트가 이를 실행 가능한 테스트로 변환하고, 두 번째 코딩 에이전트가 테스트를 통과할 때까지 프롬프트를 반복적으로 개선합니다. 도구 사용 LLM 에이전트를 프로덕션에 배포하려면 현재 개발 방식으로는 달성하기 어려운 측정 가능한 행동 준수도가 필요합니다. 사소한 프롬프트 변경은 침묵하는 회귀(regression)를 일으키고, 도구 오용은 탐지되지 않으며, 정책 위반은 배포 후에야 발견됩니다. TDAD는 명세 회피(specification gaming)를 완화하기 위해 세 가지 메커니즘을 도입합니다: (1) 컴파일 중 평가 테스트를 제외하는 가시/비가시 테스트 분할, (2) 컴파일 후 에이전트를 통한 의미론적 돌연변이 테스트로 그럴듯한 오류가 있는 프롬프트 변형을 생성하고 테스트 스위트가 이를 탐지하는지를 측정, (3) 요구사항 변경 시 회귀 안전성을 정량화하는 명세 진화 시나리오. 우리는 TDAD를 정책 준수, 근거 기반 분석, 런북 adherence, 결정론적 enforcement 등 네 가지 영역의 상세히 명세화된 에이전트로 구성된 벤치마크인 SpecSuite-Core에서 평가합니다. 24개 독립 시험에서 TDAD는 92%의 v1 컴파일 성공률과 97%의 평균 비가시 테스트 통과율을 달성했습니다. 진화된 명세는 58% 컴파일 성공률을 보였으며, 대부분의 실패한 실행은 1-2개를 제외한 모든 가시 테스트를 통과했고, 86-100% 돌연변이 점수, 78% v2 비가시 테스트 통과율, 97% 회귀 안전성 점수를 기록했습니다. 구현 코드는 https://github.com/f-labs-io/tdad-paper-code 에서 오픈 벤치마크로 이용 가능합니다.
English
We present Test-Driven AI Agent Definition (TDAD), a methodology that treats agent prompts as compiled artifacts: engineers provide behavioral specifications, a coding agent converts them into executable tests, and a second coding agent iteratively refines the prompt until tests pass. Deploying tool-using LLM agents in production requires measurable behavioral compliance that current development practices cannot provide. Small prompt changes cause silent regressions, tool misuse goes undetected, and policy violations emerge only after deployment. To mitigate specification gaming, TDAD introduces three mechanisms: (1) visible/hidden test splits that withhold evaluation tests during compilation, (2) semantic mutation testing via a post-compilation agent that generates plausible faulty prompt variants, with the harness measuring whether the test suite detects them, and (3) spec evolution scenarios that quantify regression safety when requirements change. We evaluate TDAD on SpecSuite-Core, a benchmark of four deeply-specified agents spanning policy compliance, grounded analytics, runbook adherence, and deterministic enforcement. Across 24 independent trials, TDAD achieves 92% v1 compilation success with 97% mean hidden pass rate; evolved specifications compile at 58%, with most failed runs passing all visible tests except 1-2, and show 86-100% mutation scores, 78% v2 hidden pass rate, and 97% regression safety scores. The implementation is available as an open benchmark at https://github.com/f-labs-io/tdad-paper-code.
PDF51March 12, 2026