DARE: R 통계 생태계와의 LLM 에이전트 연동 - 분포 정보를 활용한 검색
DARE: Aligning LLM Agents with the R Statistical Ecosystem via Distribution-Aware Retrieval
대규모 언어 모델(LLM) 에이전트는 데이터 과학 워크플로우를 자동화할 수 있지만, R에 구현된 많은 엄격한 통계 방법은 LLM이 통계 지식과 도구 검색에 어려움을 겪기 때문에 제대로 활용되지 못하고 있습니다. 기존의 검색 증강 방식은 함수 수준의 의미에만 집중하고 데이터 분포를 고려하지 않아 최적의 결과를 얻지 못합니다. 본 연구에서는 데이터 분포 정보를 함수 표현에 통합하여 R 패키지 검색 성능을 향상시키는 경량의 플러그 앤 플레이 검색 모델인 DARE (Distribution-Aware Retrieval Embedding)를 제안합니다. 주요 기여 내용은 다음과 같습니다: (i) 8,191개의 고품질 CRAN 패키지에서 추출한 R 패키지 지식 베이스인 RPKB; (ii) 분포적 특징과 함수 메타데이터를 결합하여 검색 정확도를 향상시키는 임베딩 모델인 DARE; (iii) 안정적인 R 코드 생성과 다양한 통계 분석 작업을 수행하며, 실제 분석 시나리오에서 LLM 에이전트를 체계적으로 평가할 수 있는 R 특화 LLM 에이전트인 RCodingAgent. 실험 결과, DARE는 NDCG at 10에서 93.47%의 성능을 달성하여, 최첨단 오픈 소스 임베딩 모델보다 패키지 검색 성능이 최대 17% 향상되었으며, 훨씬 적은 파라미터를 사용했습니다. DARE를 RCodingAgent에 통합하면 후속 분석 작업에서 상당한 성능 향상을 얻을 수 있습니다. 본 연구는 LLM 자동화와 성숙한 R 통계 생태계 간의 격차를 줄이는 데 기여합니다.
Large Language Model (LLM) agents can automate data-science workflows, but many rigorous statistical methods implemented in R remain underused because LLMs struggle with statistical knowledge and tool retrieval. Existing retrieval-augmented approaches focus on function-level semantics and ignore data distribution, producing suboptimal matches. We propose DARE (Distribution-Aware Retrieval Embedding), a lightweight, plug-and-play retrieval model that incorporates data distribution information into function representations for R package retrieval. Our main contributions are: (i) RPKB, a curated R Package Knowledge Base derived from 8,191 high-quality CRAN packages; (ii) DARE, an embedding model that fuses distributional features with function metadata to improve retrieval relevance; and (iii) RCodingAgent, an R-oriented LLM agent for reliable R code generation and a suite of statistical analysis tasks for systematically evaluating LLM agents in realistic analytical scenarios. Empirically, DARE achieves an NDCG at 10 of 93.47%, outperforming state-of-the-art open-source embedding models by up to 17% on package retrieval while using substantially fewer parameters. Integrating DARE into RCodingAgent yields significant gains on downstream analysis tasks. This work helps narrow the gap between LLM automation and the mature R statistical ecosystem.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.