0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Amazon Kendra Index typesメモ

Posted at

最近学んでいる GenU の機能のひとつに、RAG チャットがある。
その RAG チャットを支える AWS サービス、Amazon Kendra について学ぼうと思った。
まずはインデックスから、手始めに Index types in Amazon Kendra を読んだ。

このページ、まだ日本語訳は無かった。
Index type のひとつである GenAI index は、どうやら最近出た新しいものらしい。



AWS の GenAI index 紹介ブログがあった(2024/12/4 公開の記事だ)。

  • RAG はリトリーバーと LLM の組み合わせで実現される。リトリーバーの構築には、様々なデータソースから成るデータパイプラインの構築や、データのアクセス制御など、高い専門性と多くのリソースを要する複雑なタスクだ
  • GenAI Index は、RAG やインテリジェント検索のために設計された新しいインデックスで、AI アシスタント構築にまつわる複雑なタスクを支援してくれる
  • Amazon Bedrock や Amazon Q Busimness と組み合わせて使用できる

的なことが書かれている。

詳しく知りたい方は、リンク先のブログを読んでほしい。



本題のメモは以下だ。

インデックスとは

インデックスはドキュメントの内容を保持し、ドキュメントを検索可能にするために構造化されたもの

Index types

Amazon Kendra には3つの Index type がある

  • GenAI Enterprise Edition index
  • Enterprise Edition index
  • Developer Edition index

GenAI Enterprise Edition index

Retrieve API と RAG ユースケースに対し最高の精度を提供する。

最新の情報検索技術に支えられている:

  • ハイブリッド検索(キーワードとベクトルの組み合わせ)
  • セマンティック埋め込み
    • 埋め込み…情報のピース(テキスト、ドキュメント、画像、音声など)の一部の数値表現
  • リランカーモデル


Query API は、Developer Edition や Enterprise Edition のインデックスと同程度の精度を提供する。


インデックス化されたデータを AWS のその他の生成 AI サービスでも使える:

  • Amazon Bedrock Knowledge Base
    • Bedrock ツール(Agent や Prompt flow によるより進んだ AI アシスタントの構築)
  • Amazon Q Business

より小さく、よりきめ細かなキャパシティユニットと比較的低い初期費用(他2つに比べると)

AWS的には、ベストな体験と精度を求めるならこちらがおすすめ。

サポート対象機能

RAGに使用される Retrieve API と、検索に使用される Query API がある。
Full Support を O、Partial support を ▲ で示した

feature Retrieve API Query API
document ranking - O
extractive question answering - O
confidence score buckets O O
filtering O O
faceting O O
sorting - O
collapsing and expanding query results - O
indexing browsing - O
Boolean queries - O
exact match - O
wildcard queries - O
query suggestions - O
query spell checker - O
relevance tuning O O
incremental learning - O
custom document enrichment O O
custom metadata O O
adjustingquery capacity and document capacity O O
data source connectors
user context filtering

制限

  • サポートリージョン
    • US East (N. Virginia)
    • US West (Oregon)
  • 英語のコンテンツのみサポート
  • data source connectors v2.0 のみサポート
  • user context filtering で使えるのは user attributes のみ
  • ドキュメントに対する下記のアクセス制御はサポート対象外
    • token-based user access control
    • user ID and group-based user access control
  • CreateAccessControlConfiguration API は無効化されている

Enterprise Edition index

セマンティック検索と、本番環境の負荷に適した高可用性を提供

サポート対象機能

Retrieve API

  • advance query syntax
  • suggested spell connections
  • faceting
  • query suggestions
  • incremental learning

Query API

すべて(何をもってすべてなのかわからなかった)

Developer Edition index

テスト用途でのセマンティック検索を提供(本番環境での使用は非推奨)

サポート対象機能

Retrieve API

  • advance query syntax
  • suggested spell corrections
  • faceting
  • query suggestions
  • incremental learning

Query API

すべて(何をもってすべてなのかわからなかった)

3つのエディションに共通する制限

  • Amazon Q Business で使用する場合の注意点
    • インデックス内のドキュメントへのエンドユーザアクセスは Email ID で決まる
    • Kendra index を Amazon Q Business に接続する時、エンドユーザに対するドキュメントフィルタリングを行うため、Amazon Q Business は Kendra にユーザ識別 Email ID を渡す
    • Kendra index に接続されたデータソースが Email ID ベースのドキュメントフィルタリングを使用しない、あるいは Email が存在しない場合、Amazon Q Business はパブリックなドキュメントのみを使用して回答を生成する

感想

本当はまとめたかったけど、機械学習全般や自然言語処理の用語、Kendra に対する知識が無いのでただのメモになってしまった。
でも、Index type を概観することができた。

サポート対象機能は、Edition と API で結構違うんだなーと思った。

GenU を便利に使うだけでなく、背後で何が動いているのか理解したい。
Kendra 全体を理解するため、引き続き学んでいきたい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?