검색 증강 생성(RAG)
Retrieval-augmented generation, or RAG, supplies retrieved material to a generative model when answering a request.
개요
It can give the system access to relevant documents without retraining the model for every document change. Retrieval does not guarantee that the final answer is supported or correct.
주요 시사점
- Keep provenance and document context.
- Enforce permissions before retrieval results reach the model.
- Evaluate retrieval and generation independently.
심층 분석
A typical pipeline collects documents, preserves their provenance, creates searchable representations, retrieves candidates for a query, and passes selected evidence to a model. Some systems combine keyword and semantic search or rerank results before generation. Each stage can introduce omissions or errors. Document preparation determines what evidence can be found. Preserve headings, dates, tables, and source identifiers when dividing content into passages. A passage separated from an exception or footnote can convey the wrong meaning even when the words are copied correctly. Apply access controls before evidence reaches the model. A search result that is semantically relevant may still belong to a document the requesting user is not allowed to see. Treat instructions inside retrieved documents as untrusted content rather than authority to change the application’s behavior. Evaluate retrieval and answering separately. Check whether the needed evidence appears in the candidate set, whether the selected context retains it, and whether the answer uses it faithfully. Include questions with no answer in the collection and conflicting or outdated documents. The system needs an explicit way to say that evidence is insufficient.
기술적 통찰력
Adding more context can introduce contradictory or irrelevant material. The objective is useful, authorized evidence, not the largest possible prompt.
Find where a grounded answer fails
- Construct two policies: an expired version allows returns for 30 days; the current version allows 14 days.
- If retrieval returns only the old policy, the failure is upstream of generation. If both are retrieved but the answer chooses 30 days, investigate context selection and evidence use.
- Add the effective-date conflict to both retrieval and answer evaluations.
The invented example separates two causes that would otherwise look like the same wrong answer.
전략적 영향
비용 및 예산
아키텍처 결정은 수년 동안 성능과 운영 비용을 결정합니다.
더 명확한 결정들
기술 교육은 팀이 최신 스택뿐만 아니라 올바른 스택을 선택하는 데 도움이 됩니다.
품질 관리
더 나은 엔지니어링 선택은 생산 시 신뢰성 사고를 줄입니다.
실제 구현
Answer a support question using the current policy and its effective date.
Return source passages alongside an explanation so a reader can verify it.
위험 및 가드레일
하나의 벤치마크를 최적화하면 더 광범위한 시스템 약점을 숨길 수 있습니다.
인프라 및 유지 관리 비용은 종종 과소평가됩니다.
시스템이 더욱 복잡해짐에 따라 보안 및 관찰 가능성의 격차가 커질 수 있습니다.
구현 로드맵
구현하기 전에 지연 시간, 품질, 비용 목표를 정의하세요.
현실적인 로드 및 데이터 조건에서 벤치마킹합니다.
오류, 드리프트 및 사용자 영향에 대한 계측기 모니터링.
확장하기 전에 롤백 및 사고 대응 경로를 준비하세요.
출처 및 추가 자료
- Lewis and colleaguesRetrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
계속 탐색하세요
Free newsletter
Get the daily AI briefing
Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.
One email each weekday. Unsubscribe in one click. We never sell or share your address.
Test yourself
Take the Retrieval-Augmented Generation (RAG) quiz
Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.
Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation
다음 가이드
추측적 RAG 및 검색 증강 제도
자주 묻는 질문
Does RAG eliminate hallucinations?
No. Retrieval can miss evidence, return misleading material, or be used incorrectly by the generator. The final answer still needs evaluation.