Upgrade to Pro — share decks privately, control downloads, hide ads and more …

カスタムベクトルストアでRAGワークフローをカスタマイズする

Pretzelisa
January 20, 2024
98

 カスタムベクトルストアでRAGワークフローをカスタマイズする

JAWS-UG横浜 #66 AWS re:Invent 2023 Recap Database

Pretzelisa

January 20, 2024
Tweet

Transcript

  1. re:Invent2023期間のアップデート 3 AWS「Amazon OpenSearch Serverless 用ベクトルエンジン」 https://aws.amazon.com/jp/opensearch-service/serverless-vector-engine/ Amazon OpenSearch Serverless

    用ベクトルエンジンがGA Amazon Web Servicesブログ 「Amazon OpenSearch Serverless 用ベクトルエンジンが利用可能になりました」 https://aws.amazon.com/jp/blogs/news/vector-engine-for-amazon-opensearch- serverless-is-now-generally-available/
  2. re:Invent2023期間のアップデート 4 AWS「Amazon OpenSearch Serverless 用ベクトルエンジン」 https://aws.amazon.com/jp/opensearch-service/serverless-vector-engine/ Amazon OpenSearch Serverless

    用ベクトルエンジンがGA Amazon Web Servicesブログ 「Amazon OpenSearch Serverless 用ベクトルエンジンが利用可能になりました」 https://aws.amazon.com/jp/blogs/news/vector-engine-for-amazon-opensearch- serverless-is-now-generally-available/ ベクトル化されたデータのクエリができる
  3. ベクトル化のイメージ 5 Titan Multimodal Embeddings Generation 1 (G1)で テキスト“This is

    a test”をベクトル化してもらう 実際はもっと下に続いてます
  4. データをベクトル化すると何ができる? 6 Amazon Web Servicesブログ「生成系 AI アプリケーションでベクトルデータストアが果たす役割とは」 https://aws.amazon.com/jp/blogs/news/the-role-of-vector-datastores-in-generative-ai-applications/ セマンティック検索、テキスト分類、 RAGの実装などができる

    RAG(Retrieval Augmented Generation, 検索拡張生成)…データソースから情報を取得し、 それを基に回答を生成する手法 ⚫ Keyword A ⚫ Keyword B ⚫ Keyword C ⚫ Keyword D ⚫ Keyword E 要素をマッピングして、 近接性から意味的類似性を表現する
  5. RAGワークフロー 7 Amazon Web Services ブログ「ナレッジベースは、Amazon Bedrock でフルマネージド型の RAG エクス

    ペリエンスを提供するようになりました」 https://aws.amazon.com/jp/blogs/news/knowledge-bases-now-delivers-fully-managed-rag- experience-in-amazon-bedrock/ AWS「RAG とは何ですか?」 https://aws.amazon.com/jp/what-is/retrieval-augmented-generation/ 指定したデータソースからの情報を基にAIに回答生成してもらいたい →入力プロンプトに関連するデータを抽出して、それを要約してもらう AWSではBedrockにKnowledge base(データソース)の情報を データベースにマッピングさせることで、 RAGワークフローを実装することができる
  6. BedrockでKnowledge baseを設定する カスタムベクトルストア(Vector engine for Amazon OpenSearch Serverless)でKnowledge baseを作成するときに指定するもの 

    回答の基になるデータのS3 URI(フルマネージドのRAGワークフローでも指定要)  OpenSearch ServerlessコレクションのARN  コレクションのインデックス名  ベクトルフィールド名  テキストフィールド名  メタデータフィールド名 14
  7. 参考サイト Amazon Web Servicesブログ「Amazon OpenSearch Serverless 用ベクト ルエンジンが利用可能になりました」 https://aws.amazon.com/jp/blogs/news/vector-engine-for-amazon- opensearch-serverless-is-now-generally-available/

    AWS「Amazon OpenSearch Serverless 用ベクトルエンジン」 https://aws.amazon.com/jp/opensearch-service/serverless-vector- engine/ Amazon Web Servicesブログ「生成系 AI アプリケーションでベクトルデー タストアが果たす役割とは」 https://aws.amazon.com/jp/blogs/news/the-role-of-vector-datastores- in-generative-ai-applications/ 23
  8. 参考サイト Amazon Web Services ブログ「ナレッジベースは、Amazon Bedrock でフルマネージド型の RAG エクスペリエンスを提供するよう になりました」

    https://aws.amazon.com/jp/blogs/news/knowledge-bases-now- delivers-fully-managed-rag-experience-in-amazon-bedrock/ AWS「RAG とは何ですか?」 https://aws.amazon.com/jp/what-is/retrieval-augmented- generation/ 24