VectorDatabaseObject
表示一个由 CreateVectorDatabase 创建的向量数据库.
VectorDatabaseObject["name"]
represents the database with the specified name in the VectorDatabaseObjects[] list.
VectorDatabaseObject[source]
attempts to recreate a VectorDatabaseObject from source.
更多信息和选项

- VectorDatabaseObject 表示一个向量数据库实例,允许与存储的向量进行交互和管理.
- 该符号对象由 CreateVectorDatabase 返回,可实现常见的数据库管理操作,例如添加数据、搜索、列出内容和属性.
- source 的可能值包括:
-
"name" a named database from VectorDatabaseObjects[] File[…] 本地文件 LocalObject[…] 本地对象 CloudObject[…] 云对象 - 可通过 VectorDatabaseObject[…][prop] 获取数据库的属性.
- 支持以下属性 prop:
-
"Dimensions" 存储的数组的数量和数组的大小 "DistanceFunction" 使用的距离函数 "ID" 数据库的 ID "Location" 数据库被存储在何处 "Metadata" 与每个向量关联的元数据 "Vectors" 存储在数据库中的向量 "WorkingPrecision" 存储和计算的数值精度 {prop1,…} 属性列表 - When recreating a database, the following options can be specified:
-
GeneratedAssetLocation $GeneratedAssetLocation where to save the database OverwriteTarget Automatic whether to overwrite an existing location
范例
打开所有单元关闭所有单元范围 (6)
Metadata (3)
Create a vector database where each vector is associated with metadata:
Extract vector database metadata:
Extract vector database metadata and other properties:
Create a vector database where each vector is associated with metadata associations:
Extract vector database object metadata:
Extract a specific metadata element:
Extract multiple metadata elements:
选项 (2)
OverwriteTarget (1)
By default, copying the database to an existing file will fail:
Use OverwriteTarget -> True to override the existing file:
属性和关系 (4)
Create a database with vectors and metadata:
Both vectors and metadata are stored positionally:
A SemanticSearchIndex is backed by a VectorDatabaseObject:
Retrieve the underlying database:
Detailed information on the database can be extracted using vector database properties:
Modifying or deleting the underlying database may cause issues with the index:
Create a file-backed vector database:
Database information is stored in the "WXF" format:
More files could be generated for efficiently storing the vector information:
可能存在的问题 (2)
使用 File 包装器指定源为文件路径:
Create a database in the specified location:
The original database is no longer usable:
Use VectorDatabaseObject on the moved file with OverwriteTarget True to recreate the database and update the location data:
文本
Wolfram Research (2024),VectorDatabaseObject,Wolfram 语言函数,https://reference.wolfram.com/language/ref/VectorDatabaseObject.html (更新于 2025 年).
CMS
Wolfram 语言. 2024. "VectorDatabaseObject." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2025. https://reference.wolfram.com/language/ref/VectorDatabaseObject.html.
APA
Wolfram 语言. (2024). VectorDatabaseObject. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/VectorDatabaseObject.html 年