Retriever
- Knowledge Base에서 Question과 관련된 Passage를 찾는 모델
- 전통적으로는 Sparse Representation을 나타내는 모델을 사용 (예 : BM25)
- Encoder 구조의 모델(예: BERT)
- retriever score
- retriever에 의해 산출되는 Passage와 Question의 내적값
- Answer 산출 시 Passage의 Weight로 작용
- score가 높다 = 해당 passage의 answer가 추론 시 중요
Reader
- Passage에서 Answer 후보가 될 수 있는 Span을 찾는 모델
- Encoder 구조의 모델(예: BERT)
- reader score
- reader에 의해 산출되는 각 span별 answer의 점수(logit)
- span의 시작과 끝 토큰의 hidden representation을 이용
- 각 passage마다 산출 후 marginalize하여 최종 answer 선택
Generator
- Passage와 Question을 입력으로 하여 Answer을 생성하는 모델
- RAG 논문에서 처음으로 제안
- Encoder-Decoder 구조의 모델 (예 : BART, T5)
참고자료
'LLM' 카테고리의 다른 글
RAG (Retrieval-Augmented Generation) 관련 논문 (1) | 2024.07.24 |
---|---|
[LLM] Transformer Architecture (1) | 2024.05.24 |
[LLM] Dense Vector Indexing 이란? (0) | 2024.04.18 |
DPR (Dense Passage Retriever) 란? (0) | 2024.04.17 |
[LLM] LLM Task : ODQA, KIT (0) | 2024.04.16 |