답하는 용도로 사용할 때는 세계 지식의 한계가 두드러진다. 특히 다음 두 문제가 중요하다.
환각
AI
의 맥락에서
환각
hallucination
은 모델이 그럴듯하게 들리지만 사실과 다르거나 현실에 기반하지 않은 결과물을 생
성하는 현상을 가리킨다. 이는 주로 모델이 훈련 데이터 범위를 벗어나는 정보 처리를 요청받았을 때 발생한다.
출처 제시 불가
기초 모델은 텍스트를 토큰 단위로 생성한다. 생성된 텍스트는 그 어떤 출처와 연결되지 않으므로, 모델은 사전
훈련을 기반으로 생성한 문장의 출처를 제시할 수 없다.
이러한 문제들은 여러 기업 용례에서 걸림돌이 된다.
3.1.2
해법
이 패턴이 제시하는 해법은
LLM
의 응답을
그라운딩
grounding
하는 것이다. 여기서 그라운딩은
LLM
이 ‘근거
ground
’, 즉 신뢰할 수 있는 지식 공급원
knowledge
source
들에 기반해서 응답을 생성하게
만드는 것을 의미한다.
모델을 훈련할 때가 아니라 실행 시점에서 기초 모델에 추가 지식을 제공할 수 있게 되면 앞에
서 언급한 문제들이 해결된다.
정적 지식 단절
RAG
를 사용하면 좀 더 최신의 외부 공급원에서 가져온 관련 정보로 기초 모델의 지식을 보강할 수 있다. 이를
통해 모델은 최신 정보에 입각해서 응답을 생성하게 된다.
모델 용량 한계
RAG
는 모델을 외부 지식 베이스에 연결한다. 그러면 모델의 지식 용량이 모델 자신의 매개변수들에 저장할 수
있는 것보다 훨씬 확장된다.
RAG
는 기초 모델을 ‘지능형 연구원
smart
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.