Weaviate Vector Store 节点(Weaviate Vector Store node)#
使用 Weaviate 节点可以将你的 Weaviate 集合作为 向量存储 进行交互。你可以向向量数据库中插入文档或从中检索文档。你还可以检索文档以提供给连接到 链 的检索器,或者将此节点直接连接到 代理 以用作 工具。 在此页面,你可以找到 Weaviate 节点的参数,以及更多资源的链接。
🌐 Use the Weaviate node to interact with your Weaviate collection as a vector store. You can insert documents into or retrieve documents from a vector database. You can also retrieve documents to provide them to a retriever connected to a chain or connect this node directly to an agent to use as a tool. On this page, you'll find the node parameters for the Weaviate node, and links to more resources.
凭证
你可以在这里找到该节点的认证信息。
Parameter resolution in sub-nodes
Sub-nodes behave differently to other nodes when processing multiple items using an expression.
Most nodes, including root nodes, take any number of items as input, process these items, and output the results. You can use expressions to refer to input items, and the node resolves the expression for each item in turn. For example, given an input of five name values, the expression {{ $json.name }} resolves to each name in turn.
In sub-nodes, the expression always resolves to the first item. For example, given an input of five name values, the expression {{ $json.name }} always resolves to the first name.
节点使用模式(Node usage patterns)#
你可以在以下模式下使用 Weaviate 向量存储节点。
🌐 You can use the Weaviate Vector Store node in the following patterns.
作为常规应用使用用于插入和检索文档的节点(Use as a regular node to insert and retrieve documents)#
你可以将 Weaviate 向量存储作为常规节点来插入或获取文档。这种模式将 Weaviate 向量存储放在常规连接流程中,而不使用代理。
🌐 You can use the Weaviate Vector Store as a regular node to insert or get documents. This pattern places the Weaviate Vector Store in the regular connection flow without using an agent.
直接连接到 AI 代理作为工具(Connect directly to an AI agent as a tool)#
你可以将 Weaviate 向量存储节点直接连接到 AI 代理 的工具连接器,以在回答查询时将向量存储作为资源使用。
🌐 You can connect the Weaviate Vector Store node directly to the tool connector of an AI agent to use a vector store as a resource when answering queries.
这里,连接将是:AI 代理(工具连接器)-> Weaviate 向量存储节点。
🌐 Here, the connection would be: AI agent (tools connector) -> Weaviate Vector Store node.
使用检索器获取文档(Use a retriever to fetch documents)#
你可以将 Vector Store Retriever 节点与 Weaviate 向量存储节点一起使用,从 Weaviate 向量存储节点中获取文档。这通常与 Question and Answer Chain 节点一起使用,以获取与给定聊天输入匹配的向量存储文档。
🌐 You can use the Vector Store Retriever node with the Weaviate Vector Store node to fetch documents from the Weaviate Vector Store node. This is often used with the Question and Answer Chain node to fetch documents from the vector store that match the given chat input.
使用 Vector Store 问答工具回答问题(Use the Vector Store Question Answer Tool to answer questions)#
另一种模式使用 向量存储问答工具 来总结结果并回答来自 Weaviate 向量存储节点的问题。这种模式不是将 Weaviate 向量存储直接作为工具连接,而是使用专门设计用于总结向量存储中数据的工具。
🌐 Another pattern uses the Vector Store Question Answer Tool to summarize results and answer questions from the Weaviate Vector Store node. Rather than connecting the Weaviate Vector Store directly as a tool, this pattern uses a tool specifically designed to summarizes data in the vector store.
节点参数(Node parameters)#
多租户
您可以将数据分隔到相同集合的独立租户中(例如,针对不同的客户)。为此,您在插入和检索对象时必须始终提供租户名称。在 Weaviate 文档中了解更多关于多租户的信息。
Operation Mode#
This Vector Store node has four modes: Get Many, Insert Documents, Retrieve Documents (As Vector Store for Chain/Tool), and Retrieve Documents (As Tool for AI Agent). The mode you select determines the operations you can perform with the node and what inputs and outputs are available.
Get Many#
In this mode, you can retrieve multiple documents from your vector database by providing a prompt. The prompt is embedded and used for similarity search. The node returns the documents that are most similar to the prompt with their similarity score. This is useful if you want to retrieve a list of similar documents and pass them to an agent as additional context.
Insert Documents#
Use insert documents mode to insert new documents into your vector database.
Retrieve Documents (as Vector Store for Chain/Tool)#
Use Retrieve Documents (As Vector Store for Chain/Tool) mode with a vector-store retriever to retrieve documents from a vector database and provide them to the retriever connected to a chain. In this mode you must connect the node to a retriever node or root node.
Retrieve Documents (as Tool for AI Agent)#
Use Retrieve Documents (As Tool for AI Agent) mode to use the vector store as a tool resource when answering queries. When formulating responses, the agent uses the vector store when the vector store name and description match the question details.
获取多个参数(Get Many parameters)#
- Weaviate 集合:输入要使用的 Weaviate 集合的名称。
- 提示:请输入搜索查询。
- 限制:输入要从向量存储中获取的结果数量。例如,将其设置为
10可获取十个最佳结果。
插入文档参数(Insert Documents parameters)#
- Weaviate 集合:输入要使用的 Weaviate 集合的名称。
- 嵌入批量大小:一次嵌入的文档数量。默认值为 200 篇文档。
检索文档(作为链/工具的向量存储)参数(Retrieve Documents (As Vector Store for Chain/Tool) parameters)#
- Weaviate 集合:输入要使用的 Weaviate 集合的名称。
检索文档(作为工具) (适用于 AI 代理)参数(Retrieve Documents (As Tool for AI Agent) parameters)#
- Weaviate 集合:向量存储的名称。
- 描述:向大型语言模型(LLM)解释此工具的功能。具体而清晰的描述可以让大型语言模型更频繁地产生预期的结果。
- Weaviate 集合:输入要使用的 Weaviate 集合的名称。
- 限制:输入要从向量存储中获取的结果数量。例如,将其设置为
10可获取十个最佳结果。
包含元数据(Include Metadata)#
是否包含文档元数据。
🌐 Whether to include document metadata.
你可以将此与 Get Many 和 Retrieve Documents (As Tool for AI Agent) 模式一起使用。
🌐 You can use this with the Get Many and Retrieve Documents (As Tool for AI Agent) modes.
重新排序结果(Rerank Results)#
Enables reranking. If you enable this option, you must connect a reranking node to the vector store. That node will then rerank the results for queries. You can use this option with the Get Many, Retrieve Documents (As Vector Store for Chain/Tool) and Retrieve Documents (As Tool for AI Agent) modes.
节点选项(Node options)#
搜索过滤器(Search Filters)#
可用于 Get Many、检索文档(作为链/工具的向量存储) 和 检索文档(作为 AI 代理的工具) 操作模式。
🌐 Available for the Get Many, Retrieve Documents (As Vector Store for Chain/Tool), and Retrieve Documents (As Tool for AI Agent) operation modes.
在搜索数据时,使用此功能匹配与文档关联的元数据。你可以在 Weaviate 的条件过滤器文档 中了解有关操作符和查询结构的更多信息。
🌐 When searching for data, use this to match metadata associated with documents. You can learn more about the operators and query structure in Weaviate's conditional filters documentation.
你可以将 AND 和 OR 与不同的运算符一起使用。运算符不区分大小写:
🌐 You can use both AND and OR with different operators. Operators are case insensitive:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
支持的运算符:
🌐 Supported operators:
| Operator | Required Field(s) | Description |
|---|---|---|
'equal' |
valueString or valueNumber |
Checks if the property is equal to the given string or number. |
'like' |
valueString |
Checks if the string property matches a pattern (for example, sub-string match). |
'containsAny' |
valueTextArray (string[]) |
Checks if the property contains any of the given values. |
'containsAll' |
valueTextArray (string[]) |
Checks if the property contains all of the given values. |
'greaterThan' |
valueNumber |
Checks if the property value is greater than the given number. |
'lessThan' |
valueNumber |
Checks if the property value is less than the given number. |
'isNull' |
valueBoolean (true/false) |
Checks if the property is null or not. (must enable before ingestion) |
'withinGeoRange' |
valueGeoCoordinates (object with geolocation data) |
Filters by proximity to geographic coordinates. |
在插入数据时,文档加载器会设置元数据。有关加载文档的更多信息,请参阅 默认数据加载器。
🌐 When inserting data, the document loader sets the metadata. Refer to Default Data Loader for more information on loading documents.
元数据键(Metadata Keys)#
你可以定义希望 Weaviate 在查询中返回哪些元数据键。这可以减少网络负载,因为你只会获得已定义的属性。默认情况下,服务器会返回所有属性。
🌐 You can define which metadata keys you want Weaviate to return on your queries. This can reduce network load, as you will only get properties you have defined. Returns all properties from the server by default.
可用于 Get Many、检索文档(作为链/工具的向量存储) 和 检索文档(作为 AI 代理的工具) 操作模式。
🌐 Available for the Get Many, Retrieve Documents (As Vector Store for Chain/Tool), and Retrieve Documents (As Tool for AI Agent) operation modes.
租户名称(Tenant Name)#
要存储或检索文档的特定租户。
🌐 The specific tenant to store or retrieve documents for.
必须在创建时启用
您必须在首次导入时提供租户名称,才能为集合启用多租户功能。创建后无法启用或禁用多租户功能。
文本键(Text Key)#
包含嵌入文本的文档中的键。
🌐 The key in the document that contains the embedded text.
跳过初始化检查(Skip Init Checks)#
在实例化客户端时是否跳过初始化检查。
🌐 Whether to skip initialization checks when instantiating the client.
初始化超时(Init Timeout)#
在初始检查期间,超时之前等待的秒数。
🌐 Number of seconds to wait before timing out during initial checks.
插入超时(Insert Timeout)#
在插入过程中等待超时前的秒数。
🌐 Number of seconds to wait before timing out during inserts.
查询超时(Query Timeout)#
在查询过程中等待超时之前的秒数。
🌐 Number of seconds to wait before timing out during queries.
gRPC 代理(GRPC Proxy)#
用于 gRPC 请求的代理。
🌐 A proxy to use for gRPC requests.
清除数据(Clear Data)#
适用于插入文档操作模式。
🌐 Available for the Insert Documents operation mode.
是否在插入新数据之前清除集合或租户。
🌐 Whether to clear the collection or tenant before inserting new data.
模板和示例(Templates and examples)#
相关资源(Related resources)#
有关该服务的更多信息,请参阅 LangChain 的 Weaviate 文档。
🌐 Refer to LangChain's Weaviate documentation for more information about the service.
请参考 Weaviate 安装 来部署自托管的 Weaviate 集群。
🌐 Refer to Weaviate Installation for a self hosted Weaviate Cluster.
View n8n's Advanced AI documentation.