린 언어 모델을 활용한 검색 강화 추론
Retrieval-augmented reasoning with lean language models
August 15, 2025
저자: Ryan Sze-Yin Chan, Federico Nanni, Tomas Lazauskas, Rosie Wood, Penelope Yong, Lionel Tarassenko, Mark Girolami, James Geddes, Andrew Duncan
cs.AI
초록
본 기술 보고서는 단일의 경량화된 언어 모델 아키텍처 내에서 추론과 검색 증강 생성(RAG)을 결합하는 새로운 접근 방식을 상세히 설명합니다. 기존의 RAG 시스템이 대규모 모델과 외부 API에 의존하는 반면, 본 연구는 자원이 제한적이거나 보안이 중요한 환경에서도 배포 가능한 고성능 및 개인정보 보호 솔루션에 대한 증가하는 수요를 해결합니다. 최근의 테스트 시점 스케일링 및 소규모 추론 모델 개발을 기반으로, 우리는 경량 백본 모델을 사용하여 복잡한 도메인 특화 질의를 해석할 수 있는 검색 증강 대화 에이전트를 개발했습니다. 본 시스템은 NHS A-to-Z 조건 페이지와 같은 선별된 코퍼스에 대해 프론티어 모델(예: DeepSeek-R1)에서 도출된 합성 질의 생성 및 추론 흔적을 사용하여 미세 조정된 Qwen2.5-Instruct 모델과 밀집 검색기를 통합합니다. 요약 기반 문서 압축, 합성 데이터 설계, 그리고 추론 인지 미세 조정이 모델 성능에 미치는 영향을 탐구합니다. 비추론 및 일반 목적 경량 모델과의 평가를 통해, 우리의 도메인 특화 미세 조정 접근법이 답변 정확성과 일관성에서 상당한 향상을 가져오며, 프론티어 수준의 성능에 근접하면서도 로컬 배포가 가능함을 입증합니다. 재현성과 다양한 도메인 간 적용을 지원하기 위해 모든 구현 세부 사항과 코드를 공개합니다.
English
This technical report details a novel approach to combining reasoning and
retrieval augmented generation (RAG) within a single, lean language model
architecture. While existing RAG systems typically rely on large-scale models
and external APIs, our work addresses the increasing demand for performant and
privacy-preserving solutions deployable in resource-constrained or secure
environments. Building on recent developments in test-time scaling and
small-scale reasoning models, we develop a retrieval augmented conversational
agent capable of interpreting complex, domain-specific queries using a
lightweight backbone model. Our system integrates a dense retriever with
fine-tuned Qwen2.5-Instruct models, using synthetic query generation and
reasoning traces derived from frontier models (e.g., DeepSeek-R1) over a
curated corpus, in this case, the NHS A-to-Z condition pages. We explore the
impact of summarisation-based document compression, synthetic data design, and
reasoning-aware fine-tuning on model performance. Evaluation against both
non-reasoning and general-purpose lean models demonstrates that our
domain-specific fine-tuning approach yields substantial gains in answer
accuracy and consistency, approaching frontier-level performance while
remaining feasible for local deployment. All implementation details and code
are publicly released to support reproducibility and adaptation across domains.