Skip to Content
엔터프라이즈 AI를 위한 벡터 데이터베이스 (Korean Edition)
book

엔터프라이즈 AI를 위한 벡터 데이터베이스 (Korean Edition)

by Emma McGrattan
May 2026
Intermediate
49 pages
33m
Korean
O'Reilly Media, Inc.
Content preview from 엔터프라이즈 AI를 위한 벡터 데이터베이스 (Korean Edition)

제3장. RAG 시스템의 벡터 파이프라인

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

제2장에서는 쿼리 시점에 벡터 데이터베이스가 어떻게 동작하는지 살펴보았으며, 이 장에서는 검색이 생성 전에 증거를 선택, 필터링 및 조합해야 하는 종단간 시스템의 일부가 되었을 때 어떤 일이 발생하는지 살펴봅니다.

이를 설명하기 위해, 사용자가 “지난 분기에 고객 이탈률이 증가한 이유는 무엇인가요?”라고 묻는 상황을 생각해 봅시다. 검색 강화 생성(RAG) 시스템에서 이 질문에 대한 답변은 일반적으로 두 단계로 이루어집니다. 첫째, 쿼리가 임베딩으로 변환되고 벡터 데이터베이스에서 관련 문서가 검색됩니다. 둘째, 검색된 컨텍스트가 대규모 언어 모델(LLM)로 전달되며, LLM은 해당 자료를 증거로 사용하여 응답을 생성합니다.

검색 단계에서는 쿼리가 임베딩되고, 벡터 데이터베이스에서 관련 문서가 검색되며, 권한 및 시간 범위와 같은 필터가 적용됩니다. 또한 재순위 지정 단계를 통해 가장 관련성 높은 구절을 우선순위로 정렬하여 바운디드 컨텍스트 세트가 조립되기 전에 후보 문서의 순서를 재조정할 수 있습니다. 이 컨텍스트가 준비된 후에야 비로소 LLM은 검색된 자료를 기반으로 한 응답을 생성합니다.

그림 3-1은 이러한 검색 및 컨텍스트 조립 파이프라인을 설명하며, 사용자 쿼리가 어떻게 임베딩되고, 후보 문서가 벡터 데이터베이스에서 검색되어 필터링 및 재순위를 거친 후, 최종적으로 LLM이 응답을 생성하는 데 사용하는 바운디드 컨텍스트로 조립되는 과정을 보여줍니다.

Diagram showing the RAG Retrieval and Context Assembly Pipeline, illustrating the process of query embedding, document retrieval from a vector database, filtering, reranking, and context assembly before LLM generates a response.
그림 3-1. RAG시스템에서는 생성 전에 컨텍스트를 검색, 필터링 및 조립합니다. 모델은 전체 데이터셋이 아닌, 이렇게 선택된 컨텍스트만을 기반으로 답변을 생성합니다.

이 파이프라인은 중요한 함의를 갖습니다. LLM은 유한한 컨텍스트 창 내에서 작동하며 생성 시점에 제공된 정보만 처리할 수 있기 때문에, 전체 기업 데이터셋을 대상으로 추론하지 않습니다. 대신, LLM은 검색 과정에서 선별된 정보의 하위 집합을 기반으로 추론합니다. 결과적으로 최종 답변의 신뢰성, 구체성, 검증 가능성은 주로 컨텍스트가 어떻게 검색되고, 범위가 설정되며, 우선순위가 매겨지는지에 따라 결정됩니다. 조립된 컨텍스트가 불완전하거나, 오래되었거나, 지나치게 일반적이라면, 모델이 아무리 정교하더라도 응답에는 이러한 한계가 반영될 것입니다.

효과적인 RAG 검색의 모습

검색이 질문과 잘 부합할 때, 조립된 컨텍스트는 관련성이 높으면서도 충분히 구체적입니다. 지난 분기 이탈률 증가에 대한 질의의 경우, 시스템은 분기별 이탈 분석, 지역별 유지율 대시보드, 최근 고객 이탈 요약, 그리고 해당 기간과 관련된 사고 로그를 제시해야 합니다. 검색된 출처가 단순히 ...

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’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
QuotationMarkI 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
QuotationMarkI’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
QuotationMarkI'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.
Mark W.
Embedded Software Engineer

You might also like

벡터 데이터베이스 (Korean Edition)

벡터 데이터베이스 (Korean Edition)

Nitin Borwankar
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner
Professional C# 2012 and .NET 4.5

Professional C# 2012 and .NET 4.5

Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner

Publisher Resources

ISBN: 0642572396213