使用Amazon OpenSearch ML连接器API

OpenSearch提供了广泛的第三方机器学习(ML)连接器,以支持此增强。这篇文章突出显示了这些第三方ML连接器中的两个。我们演示的第一个连接器是Amazon Classend Connector。在这篇文章中,我们向您展示如何使用此连接器调用LangDetect API来检测摄入文档的语言。我们演示的第二个连接器是亚马逊基岩连接器,用于调用Amazon Titan Text Embeddings V2模型,以便您可以从摄入的文档中创建嵌入并执行语义搜索。

来源:亚马逊云科技 _机器学习
将数据摄入Amazon OpenSearch时,客户通常需要在将数据放入其索引之前增加数据。例如,您可能是在使用IP地址摄入日志文件,并希望获得IP地址的地理位置,或者您可能正在摄取客户评论并希望识别其语言。传统上,这需要一个外部过程,使数据摄入管道复杂化并可能导致管道失败。 OpenSearch提供了广泛的第三方机器学习(ML)连接器,以支持此增强。该帖子重点介绍了这些第三方ML连接器中的两个。我们演示的第一个连接器是Amazon Classend Connector。 In this post, we show you how to use this connector to invoke the LangDetect API to detect the languages of ingested documents.The second connector we demonstrate is the Amazon Bedrock connector to invoke the Amazon Titan Text Embeddings v2 model so that you can create embeddings from ingested documents and perform semantic search.Solution overviewWe use Amazon OpenSearch with Amazon Comprehend to demonstrate the language detection feature.为了帮助您复制此设置,我们提供了必要的源代码,Amazon Sagemaker笔记本电脑和AWS云形式模板。您可以在样本 - opensearch-ml-rest-api github repo中找到这些资源。上图中显示的参考体系结构显示了该解决方案中使用的组件。 A SageMaker notebook is used as a convenient way to execute the code that is provided in the Github repository provided above.PrerequisitesTo run the full demo using the sample-opensearch-ml-rest-api, make sure you have an AWS account with access to:Part 1: The Amazon Comprehend ML connectorSet up OpenSearch to access Amazon ComprehendBefore you can use Amazon Comprehend, you need to make sure that OpenSearch can call Amazon理解。您可以通过提供opensearch的角色来实现此操作,该角色可以访问调用检测