VectorDatabaseObject

VectorDatabaseObject[]

represents a vector database, as created by CreateVectorDatabase.

VectorDatabaseObject[source]

attempts to recreate a VectorDatabaseObject from source.

Details and Options

  • VectorDatabaseObject represents a vector database instance, allowing interaction with and management of the stored vectors.
  • Returned by CreateVectorDatabase, this symbolic object enables common database management operations such as adding data, searching and listing content and properties.
  • Database properties can be accessed via VectorDatabaseObject[]["prop"].
  • The following properties are supported:
  • "Dimensions"number of arrays stored and array size
    "DistanceFunction"distance function used
    "ID"database ID
    "Location"where the database is stored
    "Metadata"metadata associated with each vector
    "Vectors"vectors stored in the database
    "WorkingPrecision"numerical precision for storage and computation
    {prop1,}a list of properties
  • Possible values of source include:
  • File[]a local file
    LocalObject[]a local object
    CloudObject[]a cloud object
  • The following options can be specified:
  • OverwriteTargetAutomaticwhether to overwrite an existing location
    GeneratedAssetLocation $GeneratedAssetLocationwhere to save the database

Examples

open allclose all

Basic Examples  (2)

Initialize a new vector database:

Access some database properties:

Initialize a new vector database with a list of vectors:

Perform a search operation:

Scope  (2)

Extract a list of available properties:

Extract the stored vectors:

Extract multiple properties at once:

Store a vector database in a file:

Recreate the database object from the file:

Options  (1)

GeneratedAssetLocation  (1)

Create a vector database:

Copy the database in a new location:

Delete the original database:

Properties & Relations  (1)

In many situations, an existing vector database can be referred to by name only:

This is equivalent to:

Possible Issues  (1)

Create a database in a specified location:

A naked string is interpreted as the database name:

Use the File wrapper to specify the source is a file path:

Wolfram Research (2024), VectorDatabaseObject, Wolfram Language function, https://reference.wolfram.com/language/ref/VectorDatabaseObject.html.

Text

Wolfram Research (2024), VectorDatabaseObject, Wolfram Language function, https://reference.wolfram.com/language/ref/VectorDatabaseObject.html.

CMS

Wolfram Language. 2024. "VectorDatabaseObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VectorDatabaseObject.html.

APA

Wolfram Language. (2024). VectorDatabaseObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VectorDatabaseObject.html

BibTeX

@misc{reference.wolfram_2024_vectordatabaseobject, author="Wolfram Research", title="{VectorDatabaseObject}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/VectorDatabaseObject.html}", note=[Accessed: 03-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_vectordatabaseobject, organization={Wolfram Research}, title={VectorDatabaseObject}, year={2024}, url={https://reference.wolfram.com/language/ref/VectorDatabaseObject.html}, note=[Accessed: 03-November-2024 ]}