Adaptive Retrieval-Augmented Generation for Conversational Systems
Meta info.
- Authors: Xi Wang, Procheta Sen, Ruizhe Li, Emine Yilmaz
- Paper: https://arxiv.org/pdf/2407.21712
- Published: July 31, 2024
TL; DR
์ฃผ์ด์ง ๋ํ์์ ์ ํ์ ์ธ๋ถ ์ง์์ ์ฆ๊ฐ์ด ํ์ํ์ง ์ฌ๋ถ๋ฅผ ์ ํ์ ์ผ๋ก ๊ฒฐ์ ํ๋ ๋งค์ปค๋์ฆ ์ ์




Problem States
knowledge ground(์ธ๋ถ ์ง์์ ํตํฉํ๋) dialogue system์์ RAG๊ฐ ํจ๊ณผ์ ์ธ ๊ฒ์ ์ฌ์ค์ด๊ณ (Figure 1), ์ด์ ๋ฐ๋ผ ๋งค ํด๋ง๋ค RAG๋ฅผ ์ํํ๋ ๊ฒ์ด ์ผ๋ฐ์ ์ด๋, ์ค์ง์ ์ผ๋ก ๋งค ํด๋ง๋ค RAG๋ฅผ ์คํํ ํ์๋ ์๊ณ , ๋ถํ์ํ ๊ฒฝ์ฐ์ ๋ํด์ retrieve๋ ๊ฒฐ๊ณผ๊ฐ ๋ง๋ถ์ ๊ฒฝ์ฐ ์คํ๋ ค hallucination ๋ฐ์
Suggestions
System Response์ ๊ฐ ํด๋ง๋ค ์ธ๋ถ ์ง์์ผ๋ก ์ฆ๊ฐ๋์ด์ผ ํ ํ์์ฑ์ ์กฐ์ฌํ๋ RAGate ์ ์ย Figure 2
- Objective: ์์ฐ์ค๋ฝ๊ณ ๊ด๋ จ์ฑ์ด ์์ผ๋ฉฐ ์ํฉ์ ๋ง๋ ๋ํ ์์คํ ์ ์๋ต
- Task: ์ธ๋ถ ์ง์์ผ๋ก ์์คํ ์๋ต์ ๋ณด๊ฐํ ์์ ์ ์๋ณ
- Gate Mechanism: binary mechanism (dialogue history) vs. (dialogue history + external knowledge)
- RAG-Prompt: ํ๋กฌํํธ์ ์ง์
- Backbone: Llama-v2-7B, Llama-v2-13B
- ICL: zero-shot, few-shot
- RAGate-PEFT: QLoRA๋ก instruction-input-output ํ๋
- Backbone: Llama-v2-7B
- input feature: dialogue history, system response, synthetic responses, named entities, retrieved knowledge
- output: ์ธ๋ถ์ง์ ํ์ ์ฌ๋ถ ํ๋จ
- RAGate-MHA: Multi-Head Attention encoder ํ์ฉ
- input: token embedding + position encoding + MHA ๋ฑ layer์ ํฌํจํ๋ FFNN ๊ตฌ์ฑ(ํ์ดํผ ํ๋ผ๋ฏธํฐ ํ์ ํฌํจ)
- output: (์๋)
Effects
- Experiment
- task: Binary Classification
- metric: Precision, Recall, F1-Score, AUC, FDR
- dataset: KETOD
- 52K์ turn์ ๊ฐ์ง๋ ์ฝ 5K ๋ํ ๋ฐ์ดํฐ์
- 33K์ external knowledge snippet ํฌํจ(์ฝ 12.1% turn)
- baseline: No-Aug, Aug-all
- retriever: TF-IDF, BERT-Ranker
- metric: Recall@1 & Recall@3
- generator: GPT-2
- metric: BLEU, ROUGE-1/2/L, & BERTScore
- task: Binary Classification
- Result
- RAGateย
Table 2- RAGate-Prompt๊ฐ ์ด๋์ ๋๋ ํ๋๋ผ๋ ์๋์ ์ผ๋ก finetuning-st ๋ค๋ฅธ ๋ ๋ฐฉ์์ด ๋ ๋์ ์์ธก
- dialogue history-only input์ธ ๊ฒฝ์ฐ ํนํ RAGate-PEFT ์ฑ๋ฅ์ด RAGate-Prompt๋ณด๋ค ํฐํญ์ผ๋ก ๊ฐ์
- ๋์ฒด๋ก Input feature๋ฅผ ์ถ๊ฐํ๋ฉด ์ฑ๋ฅ์ด ๋๊ธด ํ๋, recall์ ํ๋ฝํ๊ธฐ๋.
- RAGate-MHA๊ฐ ๊ฐ์ฅ ์ข์ recall์ ๋ณด์ด๋ฉด์ โRAGโ๊ฐ ํ์ํ ๊ฒฝ์ฐ ์๋ณ์ ํนํ ์ ์ํ๋, Precision์ ์๋์ ์ผ๋กRAGate-PEFT ๋ฐฉ์์ด ๋ ๋์.
- ์๋ง ์ ์ถฉ์์ด ์์ง ์์์ง?
- ablation
- ๋ํ์ ์์ ๋ถ๋ถ์์ ๋ ๋ง์ RAG ์๋
- ์ค์ ๋ก ์ด๊ธฐ ๋ํ์ RAGํ๋ฉด ํฅํ ๋ํ์์๋ ๋ ์์ฐ์ค๋ฌ์์ง์ผ๋ก ๊ทธ ๊ฐ์น๊ฐ ๋ ํฐ๋ฏ
- ์ฌํ, ํธํ , ํญ๊ณตํธ ๋ฑ ๋๋ฉ์ธ์์ ๋ ๋ง์ RAG: RAGate-MHA๊ฐ ๋ ์ฌ๋๊ณผ ๋น์ท
- RAGateย
- Generationย
Table 3- No-Aug, Aug-all๋ณด๋ค RAGate๊ฐ ๋ ๋์ ์ฑ๋ฅ
- ํนํ RAGate-MHA๋ ํจ์ฌ ์ ์ ์์ ์ฆ๊ฐ์ผ๋ก Aug-All์ ์ฑ๋ฅ๊ณผ ๊ฑฐ์ ์ผ์น
- ๊ฐ์ฅ relevantํ snippet๋ง ์ฌ์ฉํ๋ฉด(BERT-ranker๋ก ๊ฒฐ์ ) ์ ๋ขฐ๋ ์ ์ง + ๊ฐ์
- No-Aug, Aug-all๋ณด๋ค RAGate๊ฐ ๋ ๋์ ์ฑ๋ฅ