Skip to main content

Elastic

Bundles 包含支援特定第三方整合的自訂Components,與 AgentBuilder 搭配使用。

此頁面描述 Elastic bundle 中可用的Components。

Elasticsearch

Elasticsearch Components使用 ElasticsearchStore 讀取和寫入 Elasticsearch 實例。

關於向量儲存實例

Because AgentBuilder is based on LangChain, vector store components use an instance of LangChain vector store to drive the underlying read and write functions. These instances are provider-specific and configured according to the component's parameters, such as the connection string, index name, and schema.

In component code, this is often instantiated as vector_store, but some vector store components use a different name, such as the provider name.

Some LangChain classes don't expose all possible options as component parameters. Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in AgentBuilder. For information about specific options, see the LangChain API reference and vector store provider's documentation.

如果您使用向量儲存Components查詢您的向量資料庫,它會產生搜尋結果,您可以將其作為 Data 物件清單或表格 DataFrame 傳遞給FLOW中的下游Components。 如果支援兩種類型,您可以在視覺編輯器中向量儲存Components的輸出連接埠附近設定格式。

Elasticsearch 參數

您可以檢查向量儲存Components的參數,以了解它接受的輸入、支援的功能以及如何配置它。

某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。

某些參數是條件性的,只有在您設定其他參數或為其他參數選取特定選項後才可用。 條件參數在您設定所需的依賴項之前,可能不會在 Controls 窗格中顯示。

如需接受值和功能的資訊,請參閱 Elasticsearch 文件 或檢查Components程式碼

NameTypeDescription
elasticsearch_urlString輸入參數。Elasticsearch 伺服器 URL。
cloud_idString輸入參數。Elasticsearch Cloud ID。
index_nameString輸入參數。Elasticsearch 索引的名稱。
ingest_dataData輸入參數。要載入到向量儲存的記錄。
search_queryString輸入參數。相似性搜尋的查詢字串。
cache_vector_storeBoolean輸入參數。如果為 true,Components會在記憶體中快取向量儲存以加快讀取速度。預設:啟用 (true)。
usernameString輸入參數。Elasticsearch 驗證的使用者名稱。所有本機部署都需要。雲端部署如果 api_key 為空則需要。
passwordSecretString輸入參數。Elasticsearch 驗證的密碼。所有本機部署都需要。雲端部署如果 api_key 為空則需要。
embeddingEmbeddings輸入參數。要使用的嵌入模型。
search_typeString輸入參數。要執行的搜尋類型。選項為 similarity(預設)或 mmr
number_of_resultsInteger輸入參數。要返回的搜尋結果數量。預設:4。
search_score_thresholdFloat輸入參數。搜尋結果的最小相似性分數閾值。預設:0。
api_keySecretString輸入參數。Elastic Cloud 驗證的 API 金鑰。如果提供,則不需要 usernamepassword
verify_certsBoolean輸入參數。連接到 Elasticsearch 時是否驗證 SSL 憑證。預設:啟用 (true)。

OpenSearch

OpenSearch Components使用 OpenSearchVectorSearch 讀取和寫入 OpenSearch 實例。

關於向量儲存實例

Because AgentBuilder is based on LangChain, vector store components use an instance of LangChain vector store to drive the underlying read and write functions. These instances are provider-specific and configured according to the component's parameters, such as the connection string, index name, and schema.

In component code, this is often instantiated as vector_store, but some vector store components use a different name, such as the provider name.

Some LangChain classes don't expose all possible options as component parameters. Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in AgentBuilder. For information about specific options, see the LangChain API reference and vector store provider's documentation.

OpenSearch 參數

您可以檢查向量儲存Components的參數,以了解它接受的輸入、支援的功能以及如何配置它。

某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。

某些參數是條件性的,只有在您設定其他參數或為其他參數選取特定選項後才可用。 條件參數在您設定所需的依賴項之前,可能不會在 Controls 窗格中顯示。

如需接受值和功能的資訊,請參閱 OpenSearch 文件 或檢查Components程式碼

NameTypeDescription
opensearch_urlString輸入參數。OpenSearch 叢集的 URL,例如 https://192.168.1.1:9200
index_nameString輸入參數。向量在 OpenSearch 叢集中儲存的索引名稱。預設:langflow
ingest_dataData輸入參數。要擷取到向量儲存的資料。
search_inputString輸入參數。輸入搜尋查詢。如果使用混合搜尋,請留空以檢索所有文件。
cache_vector_storeBoolean輸入參數。如果為 true,Components會在記憶體中快取向量儲存以加快讀取速度。預設:啟用 (true)。
embeddingEmbeddings輸入參數。附加 嵌入模型Components 以用於從搜尋查詢生成嵌入。
search_typeString輸入參數。要執行的搜尋類型。選項為 similarity(預設)、similarity_score_thresholdmmr
number_of_resultsInteger輸入參數。搜尋中要返回的結果數量。預設:4。
search_score_thresholdFloat輸入參數。搜尋結果的最小相似性分數閾值。預設:0。
usernameString輸入參數。OpenSearch 叢集的使用者名稱。預設:admin
passwordSecretString輸入參數。OpenSearch 叢集的密碼。
use_sslBoolean輸入參數。是否使用 SSL。預設:啟用 (true)。
verify_certsBoolean輸入參數。是否驗證 SSL 憑證。預設:停用 (false)。
hybrid_search_queryString輸入參數。以 JSON 格式提供自訂混合搜尋查詢。這允許您結合向量相似性和關鍵字匹配。

OpenSearch 輸出

如果您使用向量儲存Components查詢您的向量資料庫,它會產生搜尋結果,您可以將其作為 Data 物件清單或表格 DataFrame 傳遞給FLOW中的下游Components。 如果支援兩種類型,您可以在視覺編輯器中向量儲存Components的輸出連接埠附近設定格式。

向量儲存連線連接埠

OpenSearch Components有一個額外的已棄用 Vector Store Connection 輸出。 此輸出只能連接到 VectorStore 輸入連接埠,並且原本打算與專用的 Graph RAG Components一起使用。

OpenSearch Components不需要單獨的 Graph RAG Components,因為 OpenSearch 實例透過內建 RAG 功能和外掛程式支援圖形遍歷。

Search