Skip to main content
QUICK REVIEW

[논문 리뷰] RAGProbe: An Automated Approach for Evaluating RAG Applications

Shangeetha Sivasothy, Scott Barnett|arXiv (Cornell University)|2024. 09. 24.
Cardiovascular Function and Risk FactorsMedicine인용 수 3
한 줄 요약

RAGProbe는 Retrieval-Augmented Generation(RAG) 파이프라인을 평가하기 위해 다양한 시나리오 기반의 질문-답변 쌍을 자동으로 생성하는 프레임워크이다. 복잡한 질의 패턴을 대상으로 하는 6개의 평가 시나리오를 도입함으로써, 특히 다중 질문 및 다중 문서 질의에서의 핵심 실패 요인을 파악하였으며, 최신 기술 대비 평균 실패율을 51% 높게 기록하였다.

ABSTRACT

Retrieval Augmented Generation (RAG) is increasingly being used when building Generative AI applications. Evaluating these applications and RAG pipelines is mostly done manually, via a trial and error process. Automating evaluation of RAG pipelines requires overcoming challenges such as context misunderstanding, wrong format, incorrect specificity, and missing content. Prior works therefore focused on improving evaluation metrics as well as enhancing components within the pipeline using available question and answer datasets. However, they have not focused on 1) providing a schema for capturing different types of question-answer pairs or 2) creating a set of templates for generating question-answer pairs that can support automation of RAG pipeline evaluation. In this paper, we present a technique for generating variations in question-answer pairs to trigger failures in RAG pipelines. We validate 5 open-source RAG pipelines using 3 datasets. Our approach revealed the highest failure rates when prompts combine multiple questions: 91% for questions when spanning multiple documents and 78% for questions from a single document; indicating a need for developers to prioritise handling these combined questions. 60% failure rate was observed in academic domain dataset and 53% and 62% failure rates were observed in open-domain datasets. Our automated approach outperforms the existing state-of-the-art methods, by increasing the failure rate by 51% on average per dataset. Our work presents an automated approach for continuously monitoring the health of RAG pipelines, which can be integrated into existing CI/CD pipelines, allowing for improved quality.

연구 동기 및 목표

  • 현재 수동적이고 시행착오적인 테스트에 의존하는 RAG 파이프라인에 대한 자동화되고 체계적인 평가의 부족을 해결하기 위해.
  • RAG 시스템의 실패 요인을 드러내는 질문-답변 쌍의 변형을 식별하고 분류하기 위해, 예를 들어 맥락 오해나 완전하지 못한 응답과 같은 문제들.
  • 도메인 특화의 다양한 QA 쌍을 생성하기 위한 스키마와 템플릿 기반 접근법을 개발하여 RAG 파이프라인을 시험하기 위해.
  • 자동화되고 반복 가능한 평가 시나리오를 통해 지속적 통합 테스팅을 가능하게 하여 RAG 파이프라인의 품질을 향상시키기 위해.
  • 기존 평가 프레임워크인 RAGAS를 능가하여 보다 효과적이고 실패를 유도하는 테스트 케이스를 생성함으로써 성능을 뛰어넘기 위해.

제안 방법

  • 단일 및 다중 문서 질의, 하나의 프롬프트 안의 다중 질문, 분포 외 질의를 포함한 다양한 QA 변형을 표현하기 위해 6개의 고유한 평가 시나리오를 제안한다.
  • 실제이고 도전적인 테스트 케이스를 생성하기 위해 시나리오별 프롬프팅 전략과 문서 샘플링/체이닝 방법을 설계한다.
  • 공통적인 RAG 실패 패턴에서 유도된 구조적 템플릿을 활용해 LLM을 사용해 문서 코퍼스 기반의 질문-답변 쌍을 생성한다.
  • 정확성, 관련성, 완전성, 일관성, 모순 여부 등의 평가 지표를 활용해 RAG 출력을 평가한다.
  • Qasper, Google NQ, MS Marco 세 가지 벤치마크 데이터셋을 사용해 Verba, Danswer, Ragflow 등 다섯 개의 오픈소스 RAG 파이프라인에서 RAGProbe를 검증한다.
  • CI/CD 워크플로우에 RAGProbe를 통합하여 파이프라인의 건강 상태를 자동으로 모니터링하고 지속적인 평가를 실현한다.
Figure 1. RAGProbe: Our automated approach to generate question-answer pairs. Our approach is extensible by adding different evaluation scenarios and different evaluation metrics.
Figure 1. RAGProbe: Our automated approach to generate question-answer pairs. Our approach is extensible by adding different evaluation scenarios and different evaluation metrics.

실험 결과

연구 질문

  • RQ1기존 평가 방법 대비 시나리오 기반 QA 쌍이 RAG 파이프라인의 실패 모드를 얼마나 효과적으로 드러내는가?
  • RQ2특히 다중 질문 또는 다중 문서 질의와 같은 질문-답변 변형 중 어떤 것이 RAG 파이프라인 실패를 가장 자주 유도하는가?
  • RQ3RAGProbe가 RAGAS와 같은 최신 평가 프레임워크보다 RAG 파이프라인 결함 탐지 능력에서 얼마나 뛰어나게 성과를 내는가?
  • RQ4도메인 특성(학술 도메인 대비 오픈 도메인)이 자동 테스트 하에서 RAG 파이프라인의 실패율에 어떤 영향을 미치는가?
  • RQ5자동화된 템플릿 기반 QA 생성이 기존 데이터 생성 기법보다 더 유효하고 실패를 유도하는 테스트 케이스를 더 효과적으로 생성할 수 있는가?

주요 결과

  • 한 문서 내에서 다중 질문을 포함한 시나리오에서 가장 높은 실패율(91%)이 발생하여, RAG 파이프라인 설계에 치명적인 취약점이 있음을 시사한다.
  • 다수의 문서를 통해 다중 질문을 처리하는 시나리오는 78%의 실패율을 기록하여, 다단계 추론 및 맥락 통합에서의 과제를 드러낸다.
  • RAGProbe는 RAGAS 대비 데이터셋 전반에서 평균 51% 높은 실패율을 탐지하여 뛰어난 결함 탐지 능력을 입증한다.
  • 학술 도메인 데이터셋(Qasper)은 60%의 실패율을 기록했고, 오픈 도메인 데이터셋(Google NQ 및 MS Marco)은 각각 53%와 62%의 실패율을 기록하였다.
  • RAGProbe는 데이터셋 전반에서 90–98%의 유효한 QA 쌍을 생성했으며, RAGAS의 85–93% 대비 더 높은 데이터 품질과 테스트 커버리지를 확보하였다.
  • 평가 시나리오는 프롬프트 설계 및 문서 검색 전략이 복잡한 질의 패턴 하에서 파이프라인의 강건성에 상당한 영향을 미친다는 점을 드러냈다.
Figure 2. Total failure rate combining all 5 RAG pipelines. The failure rate is calculated as the number of failures divided by the total number of questions.
Figure 2. Total failure rate combining all 5 RAG pipelines. The failure rate is calculated as the number of failures divided by the total number of questions.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.