AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

MongoDB Vector Search를 사용하여 로컬 RAG 구현 구축하기

이 튜토리얼에서는 API 키나 크레딧 없이 로컬에서 검색 보강 생성(RAG)을 구현 방법을 보여 줍니다. RAG 에 대해자세히 학습 MongoDB 사용한 검색 증대 생성(RAG) 을 참조하세요.

구체적으로 다음 조치를 수행합니다.

  1. 로컬 Atlas 배포서버를 생성합니다.

  2. 환경을 설정합니다.

  3. 로컬 임베딩 모델을 사용하여 벡터 임베딩을 생성합니다.

  4. 데이터에 MongoDB Vector Search 인덱스 생성합니다.

  5. 로컬 LLM을 사용하여 데이터에 대한 질문에 답합니다.

일반적인 전제 조건 외에 이 튜토리얼에는 다음이 필요합니다.

In this section, you load an embedding model locally and generate vector embeddings by using data from the sample_airbnb database, which contains a collection called listingsAndReviews.

This code might take several minutes to run. After it's finished, you can view your vector embeddings by connecting to your local deployment from mongosh or your application using your deployment's connection string. Then you can run read operations on the sample_airbnb.listingsAndReviews collection.

팁

샘플 데이터의 임베딩을 BSON 벡터로 변환하여 Atlas 에서 벡터를 효율적으로 저장 하고 수집할 수 있습니다. 자세한 학습 은 네이티브 임베딩을 BSON 벡터로 변환하는 방법을 참조하세요.

sample_airbnb.listingsAndReviews 컬렉션 에서 벡터 검색 활성화 하려면 MongoDB Vector Search 인덱스 만듭니다.