# GRACE: Parallel Best-of-N Multi-Agent Analysis of Closed-Form Questions over Dataframes with Guardrail Selection and Adaptive Retry

GRACE: 가드레일 선택과 적응형 재시도를 갖춘 데이터프레임 대상 닫힌 형식 질문의 병렬 Best-of-N 다중 에이전트 분석

Fabio Picariello, Salvatore Cipolla, Susanna Bonura, Vito Morreale · arXiv · 2026년 11월 16일

- **연구 문제** LLM 에이전트가 데이터프레임 질문에 단일 코드 실행으로 답하면 틀린 결과도 그대로 받아들여지며, 기존 다수결은 모든 후보가 틀린 경우에도 답을 내야 합니다.
- **연구 방법** N개의 에이전트가 출력 계약을 지키며 병렬로 코드를 만들고, 토너먼트와 guardrail이 실행 결과를 판정해 하나를 고르거나 풀 전체를 거부합니다.

## 단일 롤아웃 데이터프레임 에이전트의 한계

대규모 언어 모델 에이전트는 표 형태의 데이터프레임에 대한 폐쇄형 질문에 답하기 위해 Python 코드를 작성하고 실행합니다. 그런데 대부분의 시스템은 해석 하나, 스크립트 하나, 결과 하나만 만들고 그 결과를 비교 없이 받아들입니다. 일부 파이프라인은 여러 후보를 만들지만 후보들의 답이 일치하는지를 세는 다수결로 하나를 고르며, 이 방식은 모든 후보가 틀린 경우에도 반드시 한 답을 돌려주므로 답을 보류할 수 없습니다.

이 논문은 이 두 가정, 즉 단일 궤적으로만 답한다는 점과 결과를 무조건 확정한다는 점을 바꾸려 합니다. 평가 지표가 있는 검증 세트나 정답 기반 점수가 없는 상황에서도 후보를 고를 수 있어야 하며, 선택 대상은 스칼라 값이 아니라 실행된 결과 데이터프레임과 그 생성 코드입니다.

## GRACE의 세 단계 파이프라인

GRACE는 입력 데이터프레임과 자연어 과제를 받아 하나의 결과 데이터프레임을 만듭니다. 먼저 데이터프레임 설명 에이전트가 앞부분 20행을 보고 열의 의미와 자료형을 담은 df\_info 스키마를 만들며, 이 스키마는 이후 모든 프롬프트가 재사용합니다. 다음으로 N개의 코드 생성 에이전트가 동시에 독립적으로 Python 스크립트를 쓰고 샌드박스에서 실행합니다. 실행 오류가 나면 에이전트가 자기 코드를 내부에서 한 번 고칠 수 있고, 그래도 실패하면 그 슬롯은 후보 없이 끝납니다. 따라서 선택 단계의 후보는 모두 실행되었고 출력 계약을 만족한 결과입니다.

출력 계약은 단일 항목 딕셔너리이며 값이 pandas DataFrame이어야 한다는 조건, 선택적인 차트 아티팩트의 연결 조건, 사용자에게 의미 있는 데이터프레임 이름 조건으로 구성됩니다. 이 계약 덕분에 스칼라 누출이나 빈 프레임 같은 구조적 실패가 거의 사라지고, 남는 주된 실패는 의미 오류가 됩니다.

## 토너먼트와 guardrail의 선택 및 거부

선택 단계는 두 부분으로 이루어집니다. N이 3 이상이면 단일 제거 토너먼트가 먼저 돌아 후보를 두 명의 결승 진출자로 줄입니다. 각 대결에서 판정자는 두 후보의 코드와 결과 미리보기를 비교해 승자와 이유, 그리고 탈락자에게 줄 짧은 비평을 JSON으로 냅니다. 토너먼트는 N−2번의 판정 호출을 하며, N이 2 이하이면 우회됩니다.

그 뒤 guardrail이 최대 두 후보를 받아 판단합니다. 정답 후보가 하나라도 있으면 가장 결함이 적은 후보를 고르고 업무 언어로 된 결과 설명을 만듭니다. 정답 후보가 없으면 전역 근본 원인 조언과 결승 진출자별 비평을 내며 풀 전체를 거부합니다. 거부된 풀은 같은 예산 안에서 다시 생성되며, 재시도마다 온도 스케줄과 페르소나 회전이 적용되고, 각 후보는 자신에게 온 비평을 받습니다. 저자들은 재시도에서 기존 코드를 표면만 고치는 것을 금지하고 새 불변식이나 단언을 추가하도록 요구한다고 설명합니다.

## DAEval에서 에이전트 수와 재시도의 대체 관계

주 실험은 Qwen3.6-35B-A3B 백본으로 DAEval 246문항에서 병렬 에이전트 수 N을 1, 2, 4로, 재시도 예산 r을 0, 4, 10으로 바꾸어 답 일치율을 측정했습니다. 같은 질문 집합과 순서를 모든 셀이 공유했고, 짝지은 부트스트랩과 Benjamini–Hochberg 보정으로 차이를 검정했습니다.

![Table 2: Answer-match rate across the 3×3 sweep, where 𝑁 is the number of parallel code-generation](https://refivu.com/papers/4c0246c8-5ab8-438c-9f8c-5b30e61374e1/figures/figure-ca0da7dc7f3ce823cc7697d736612390.png?thumb=512)

**Table 2** : Answer-match rate across the 3×3 sweep, where 𝑁 is the number of parallel code-generation

[원문](https://arxiv.org/abs/2611.20983v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Fabio Picariello, Salvatore Cipolla, Susanna Bonura, Vito Morreale · GRACE: Parallel Best-of-N Multi-Agent Analysis of Closed-Form Questions over Dataframes with Guardrail Selection and Adaptive Retry · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

이 결과에서 저자들은 두 자원이 대체로 서로 바꿔 쓸 수 있다고 해석합니다. 재시도는 N=1일 때 가장 크게 도움이 되었고, 에이전트는 r=0일 때 가장 크게 도움이 되었습니다. 어느 한쪽이 충분히 주어지면 다른 쪽을 늘려도 차이가 작았습니다. 같은 비교 기준으로 9B 밀집 백본을 쓴 실험에서는 병렬 에이전트가 재시도 예산이 넉넉해도 계속 도움이 되어, 두 자원이 완전한 대체재가 아님을 보였습니다.

![Figure 2: Single-factor simple effects on DAEval (𝑀=246) under the paired-bootstrap + BH protocol](https://refivu.com/papers/4c0246c8-5ab8-438c-9f8c-5b30e61374e1/figures/figure-5ffea151abbbabb6049fa9de00610a50.png?thumb=512)

**Figure 2** : Single-factor simple effects on DAEval (𝑀=246) under the paired-bootstrap + BH protocol

[원문](https://arxiv.org/abs/2611.20983v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Fabio Picariello, Salvatore Cipolla, Susanna Bonura, Vito Morreale · GRACE: Parallel Best-of-N Multi-Agent Analysis of Closed-Form Questions over Dataframes with Guardrail Selection and Adaptive Retry · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

## 선택 품질과 답 보류의 한계

선택기 자체를 분리해 보기 위해 DAEval에서 N=4, r=4 설정을 따로 돌려 263개의 선택 결정을 정답과 대조했습니다. 같은 후보 풀에서 토너먼트와 guardrail은 66.9%를 맞혔고, 다수결 투표는 63.1%, 무작위 선택은 62.9%였습니다. 토너먼트와 guardrail은 두 기준선보다 약 3.8pp 높았지만 투표와 무작위의 차이는 통계적으로 구분되지 않았습니다. 이 비교는 같은 후보 풀에 대한 선택 품질의 비교이며, 판정 호출이 추가되므로 총 추론 비용을 맞춘 비교는 아닙니다.

![Table 3: Selection quality on DAEval (𝑁=4, 𝑟=4; 263 decisions), each conditioned on whether the pool](https://refivu.com/papers/4c0246c8-5ab8-438c-9f8c-5b30e61374e1/figures/figure-2a2cd53a75fa97afbf7034324d89bdab.png?thumb=512)

**Table 3** : Selection quality on DAEval (𝑁=4, 𝑟=4; 263 decisions), each conditioned on whether the pool

[원문](https://arxiv.org/abs/2611.20983v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Fabio Picariello, Salvatore Cipolla, Susanna Bonura, Vito Morreale · GRACE: Parallel Best-of-N Multi-Agent Analysis of Closed-Form Questions over Dataframes with Guardrail Selection and Adaptive Retry · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

반대로 모든 후보가 틀린 풀에서 guardrail은 10.2%만 거부했고, 대부분은 틀린 답을 받아들였습니다. 저자들은 이 점이 답 보류 능력이 약하다는 뜻이며, 모델이 정답 후보를 고르는 능력보다 방어 가능한 후보가 없다는 판단이 더 약하다고 봅니다.

## DataBench에서의 재현

같은 3×3 구성을 DataBench 400문항 부분집합에서 다시 돌렸습니다. 모든 비베이스라인 셀이 베이스라인보다 유의하게 높았습니다.

DataBench는 사실 기반 질문이 많아 DAEval보다 단일 롤아웃 베이스라인이 훨씬 높습니다. 그래서 같은 방향의 개선이라도 DAEval에서의 난이도 차이와 함께 읽어야 합니다. 두 벤치마크 모두 최고 셀에서 많은 개선이 나왔지만, 고성능 구간 안의 차이가 DataBench에서는 동등성 검정을 통과하지 못한 부분도 있었습니다.

## 한계

첫째, DAEval은 각 질문의 CSV를 정확한 고정 입력으로 제공하므로 실제 배포에서 생길 수 있는 업스트림 데이터 오류는 결과에 반영되지 않습니다. 둘째, 베이스라인과 다중 에이전트·재시도 구성은 총 추론 비용을 맞춘 비교가 아니므로, 반복 샘플링이나 일반적인 자기 개선보다 우월하다는 결론은 얻지 못합니다. 셋째, 페르소나, 회전, 온도, 불변식 강제, 토너먼트의 개별 기여를 분리하는 ablation은 수행하지 않았습니다. 넷째, 답 일치율은 근접한 오답과 완전한 실패를 구분하지 않습니다.

## 논문 정보

- **저자**: Fabio Picariello, Salvatore Cipolla, Susanna Bonura, Vito Morreale
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 11월 16일
- **등록일**: 2026년 11월 17일
- **수정일**: 2026년 11월 16일
- **버전**: v1
- **arXiv**: 2611.20983
- **분류**: cs.AI · cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2611.20983v1) · [원문 PDF ↗](https://arxiv.org/pdf/2611.20983v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

LLM agents answer closed-form questions over a tabular dataframe by writing and executing Python, almost always as a single rollout: one interpretation, one script, one result, accepted without comparison. The few pipelines that produce several candidates reconcile them by answer-agreement voting, which needs a single comparable scalar and always returns one, even when every candidate is wrong. We present GRACE (Generative, Ranked, Adaptive Code Ensemble), a production-oriented pipeline that instead runs parallel best-of-N selection specialised to dataframe code. N agents run concurrently under a strict, machine-checkable output contract, diversified by persona hints, per-retry rotation, and a two-regime temperature schedule. Rather than vote, GRACE judges the executed artefacts: a pairwise tournament pre-filters the pool and a domain-specialised guardrail either selects the best candidate or, when none is defensible, rejects the whole pool and abstains with a diagnosis (an option voting structurally lacks), which in turn drives an adaptive retry with per-agent feedback. On InfiAgent-DABench (DAEval, M = 246), using Qwen3.6-35B-A3B as the backbone, GRACE raises answer match from 39% for a single-rollout baseline to 71% (+32 pp, 1.8x), recovering 53% of previously wrong answers. On the same DAEval task, the smaller dense Qwen3.5-9B lifts answer match from 38% to 63% (+25 pp, 1.7x). A controlled 3 x 3 study that sweeps the number of parallel agents against the retry budget finds, on the 35B backbone, the two levers largely substitutable: once either one is generous, the other adds little, identifying a cheap operating point for deployment. The same directional pattern replicates on the independent DataBench benchmark, again on the Qwen3.6-35B-A3B backbone, where answer match rises by 15 percentage points (from 70% to 85%) across 400 sampled questions.

## 원문 인용

Fabio Picariello, Salvatore Cipolla, Susanna Bonura, Vito Morreale (2026). GRACE: Parallel Best-of-N Multi-Agent Analysis of Closed-Form Questions over Dataframes with Guardrail Selection and Adaptive Retry. arXiv:2611.20983v1. https://arxiv.org/abs/2611.20983v1

**BibTeX**

```
@misc{picariello2026grace,
  title = {{GRACE: Parallel Best-of-N Multi-Agent Analysis of Closed-Form Questions over Dataframes with Guardrail Selection and Adaptive Retry}},
  author = {Fabio Picariello and Salvatore Cipolla and Susanna Bonura and Vito Morreale},
  year = {2026},
  eprint = {2611.20983},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.20983v1}
}
```

## 이 논문의 용어

- [paired bootstrap](https://refivu.com/terms/63f3236bc607-paired-bootstrap)
- [Qwen3.5-9B](https://refivu.com/terms/a283434b9c30-qwen3-5-9b)
- [LLM-as-judge](https://refivu.com/terms/2b0403781168-llm-as-judge)
- [GRACE](https://refivu.com/terms/355f521161e0-grace)
- [abstention](https://refivu.com/terms/1e93a0a1c8d8-abstention)

## 다른 논문 해설

- [Navital Gym: Rule-Graded Agent Environments for Indian Workflows](https://refivu.com/papers/14524c7c-bc42-4225-92b0-86688747deeb-navital-gym-rule-graded-agent-environments-for-indian.md)
- [Experience Rot: Experienced Agents Fail Where Novices Succeed](https://refivu.com/papers/4f680630-ec46-4983-9967-76eafdd6997f-experience-rot-experienced-agents-fail-where-novices-succeed.md)
- [DetourBench: Trajectory-Level Evaluation of Interactive Agents with Exact Minimum-Action Bounds](https://refivu.com/papers/0e7c6359-9605-44df-8c48-79a61560a55c-detourbench-trajectory-level-evaluation-of-interactive.md)
- [AdMem: Expectation-Grounded Procedural Memory for Long-Horizon Task-Solving Agents](https://refivu.com/papers/38393e75-1ceb-46fa-abaa-bc11cb447cee-admem-expectation-grounded-procedural-memory-for-long.md)
- [ToolGraph as a Q-Function for Test-Time Scaling of Tool-Use Agents](https://refivu.com/papers/c86b8c10-1fa4-4795-ab5c-6d8fbed7450e-toolgraph-as-a-q-function-for-test-time.md)
- [Invariant-Aware Harness Enforcement to Protect LLM Agents from Silent API Failures](https://refivu.com/papers/bd28a6a6-5402-4777-8dd7-6c8f089fb4ba-invariant-aware-harness-enforcement-to-protect-llm-agents.md)
- [Breaking feature collapse in self-supervised time series encoders](https://refivu.com/papers/819f640a-5ad8-4d90-8850-3c039f21f3d1-breaking-feature-collapse-in-self-supervised-time-series.md)
- [Adaptive-Elbow Graph Traversal for Schema Retrieval in Text-to-SQL](https://refivu.com/papers/1d3e708c-277f-497f-9bbf-8b12de718d99-adaptive-elbow-graph-traversal-for-schema-retrieval-in.md)
- [FARCH: A Functional ARCH Model for Calibrated Prediction Bands](https://refivu.com/papers/803c6002-d508-4e87-b0e9-4d6db420de66-farch-a-functional-arch-model-for-calibrated-prediction.md)
- [A Convergence Analysis of the Random Feature Method for Linear PDEs](https://refivu.com/papers/e23ddbbe-6639-473b-8f15-06395434c589-a-convergence-analysis-of-the-random-feature-method.md)
- [Markov-Equivalent Conditional Independence Graphs on Path Spaces](https://refivu.com/papers/84d16c51-6617-4e77-bae7-fc57345e114e-markov-equivalent-conditional-independence-graphs-on-path.md)
- [It Depends on the Task: Rethinking Rhetorical Segmentation of Dutch Judicial Decisions](https://refivu.com/papers/783edff2-a49b-485b-af5d-d4d1c8c741f2-it-depends-on-the-task-rethinking-rhetorical-segmentation.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/4c0246c8-5ab8-438c-9f8c-5b30e61374e1-grace-parallel-best-of-n-multi-agent-analysis)
