使用 s3vectors-embed-cli 建立向量嵌入和執行語義搜尋 - Amazon Simple Storage Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 s3vectors-embed-cli 建立向量嵌入和執行語義搜尋

Amazon S3 Vectors 提供名為 Amazon S3 Vectors Embed CLI (s3vectors-embed-cli) 的獨立開放原始碼工具,可將嵌入產生與向量運算結合在單一命令中,藉以簡化向量資料的使用。此 CLI 工具透過使用 Amazon Bedrock 基礎模型自動產生向量嵌入,以及向量索引中的語義搜尋運算,協助您快速開始使用 S3 Vectors。

S3 Vectors Embed CLI 提供兩個主要命令,用於整合 Amazon Bedrock 嵌入模型與 S3 Vectors 運算:

  • s3vectors-embed put:產生向量嵌入,並將其插入向量索引。具體來說,就是透過 Amazon Bedrock 模型將文字和影像轉換為向量嵌入,並自動將其儲存在向量索引中。

  • s3vectors-embed query:透過 Amazon Bedrock 模型從查詢輸入產生向量嵌入,並且在向量索引中查詢向量。

Amazon Web Services – Labs GitHub 儲存庫中提供了 Amazon S3 Vectors Embed CLI。如需詳細安裝指示、命令參數、範例和最佳實務,請參閱 Amazon S3 Vectors Embed CLI GitHub 儲存庫

如需提供更多控制和自訂的較低層級 S3 Vectors API 操作,請參閱《Amazon Simple Storage Service API 參考》中的 Amazon S3 Vectors