검색 상세

Speculative RAG 의 효율적 초안 생성을 위한 다중 클러스터링과 유사도 기반 샘플링 기법

Multi-Clustering and Similarity-based Sampling for Efficient Draft Generation in Speculative RAG

초록(요약문)

대규모 언어 모델(LLM)의 발전으로 검색 증강 생성(RAG) 시스템이 널리 활용되고 있으나, 검색된 다수의 문서를 처리하는 과정에서 긴 입력 컨텍스트로 인한 지연시간 증가와 성능 저하 문제가 발생하고 있다. Speculative RAG 는 초안-검증 파이프라인을 도입하여 처리 속도를 개선하였으나, K-means 클러스터링과 무작위 샘플링 방식은 문서 간 관계 구조를 충분히 고려하지 못하고 관련성이 낮은 문서를 선택할 가능성이 있다. 본 연구에서는 Speculative RAG 의 검색 문서 선별 과정을 개선한 방법을 제안한다. Hierarchical 과 Spectral 클러스터링을 통해 문서 간 의미적 관계를 정교하게 파악하고, 유사도 기반 샘플링으로 관련성 높은 문서를 선별하였다. TriviaQA 데이터셋 실험 결과, 제안 방법은 베이스라인 대비 정확도 9.0%p, LLM Judge(GPT-4o mini) 6.4%p, LLM Judge(Claude-3.5-Haiku) 5.8%p 향상되었다. 클러스터링 및 샘플링 처리 시간은 증가하였으나, 전체 파이프라인에서 차지하는 비중은 5% 내외로 제한적이어서 실제 응용 환경에서 충분히 활용 가능한 수준임을 확인하였다. 클러스터링과 샘플링 알고리즘 개선을 통해 RAG 시스템의 정확도를 향상시킬 수 있음을 입증하였으며, 향후 실용적인 지식 검색 시스템 구축에 기여할 것으로 기대된다.

more

초록(요약문)

With the advancement of large language models (LLMs), retrieval- augmented generation (RAG) systems have been widely adopted. However, processing multiple retrieved documents introduces challenges of increased latency and performance degradation due to long input contexts. Speculative RAG has improved processing speed through a draft-then-verify pipeline, but its use of K-means clustering and random sampling fails to adequately consider the relational structure among documents and risks selecting documents with low relevance. This study proposes an improved method for the document selection process in Speculative RAG. We employ Hierarchical and Spectral clustering to precisely identify semantic relationships among documents, and apply cosine similarity-based sampling to select highly relevant documents. Experimental results on the TriviaQA dataset demonstrate that the proposed method achieves improvements of 9.0%p in Accuracy, 6.4%p in LLM Judge (GPT-4o mini), and 5.8%p in LLM Judge (Claude-3.5-Haiku) compared to the baseline. Although clustering and sampling processing time increased, their proportion in the overall pipeline remained limited to approximately 5%, confirming their feasibility for practical application environments. This research demonstrates that RAG system accuracy can be enhanced through improvements in clustering and sampling algorithms, and is expected to contribute to the development of practical knowledge retrieval systems.

more

목차

제 1 장 서 론 1
제 2 장 관련 연구3
제 1 절 Retrieval-Augmented Generation3
제 2 절 Lost-in-the-Middle 4
제 3 절 문서 축소 기법 5
제 3 장 연구 동기7
제 1 절 Speculative RAG7
제 2 절 Speculative RAG 의 한계점 11
제 4 장 연구 방법 13
제 1 절 계층적스펙트럴 클러스터링 기반 문서 분할 13
(1) 계층적 클러스터링과 실루엣 점수 기반 군집 수 결정 13
(2) 유사도 그래프 기반 스펙트럴 클러스터링 14
제 2 절 대표 문서 선별 전략 16
제 5 장 실험 결과 및 분석 19
제 1 절 실험 환경 19
제 2 절 실험 구현 20
제 3 절 실험 설계 22
제 4 절 평가 방법 23
(1) 정확도 23
(2) LLM Judge 23
제 5 절 결과 분석 25
(1) 클러스터링 알고리즘 비교 25
(2) 샘플링 알고리즘 비교 28
(3) 통합 성능 분석 30
(4) 검색 문서 수에 따른 성능 분석 34
제 6 장 결 론 38
참고문헌 40

more