DBMS_VECTOR
The DBMS_VECTOR package simplifies common operations with Oracle AI Vector Search, such as extracting chunks or embeddings from user data, generating text for a given prompt or an image, creating a vector index, or reporting on index accuracy.
This table lists the DBMS_VECTOR subprograms and briefly describes them.
Table 12-1 DBMS_VECTOR Package Subprograms
| Subprogram | Description |
|---|---|
|
ONNX Model Related Procedures: These procedures enable you to load an ONNX model into Oracle Database and drop the ONNX model. |
|
|
Loads an ONNX model into the database |
|
| Loads an ONNX model from object storage into the database | |
|
Drops the ONNX model |
|
|
Chainable Utility (UTL) Functions: These functions are a set of modular and flexible functions within vector utility PL/SQL packages. You can chain these together to automate end-to-end data transformation and similarity search operations. |
|
|
Splits data into smaller pieces or chunks |
|
|
Converts text or an image to one or more vector embeddings |
|
|
Generates text for a prompt (input string) or an image |
|
|
Credential Helper Procedures: These procedures enable you to securely manage authentication credentials in the database. You require these credentials to enable access to third-party service providers for making REST calls. |
|
|
Creates a credential name |
|
|
Drops an existing credential name |
|
|
Data Access Functions: These functions enable you to retrieve data, create index, and perform simple similarity search operations. |
|
|
Creates a vector index |
|
|
Rebuilds a vector index |
|
|
Describes the status of a vector index creation |
|
|
Enables the Checkpoint feature for a vector index user and index name |
|
|
Disables the Checkpoint feature for a vector index user and index name |
|
|
Determines the vector memory size that is needed for a vector index |
|
|
Performs a similarity search query |
|
|
Reorders search results for a more relevant output |
|
|
Accuracy Reporting Function: These functions enable you to determine the accuracy of existing search indexes and to capture accuracy values achieved by approximate searches performed by past workloads. |
|
|
Verifies the accuracy of a vector index |
|
|
Captures accuracy values achieved by approximate searches |
|
Note:
DBMS_VECTOR is a lightweight package that does not support text processing or summarization operations. Therefore, the UTL_TO_TEXT and UTL_TO_SUMMARY chainable utility functions and all the chunker helper procedures are available only in the advanced DBMS_VECTOR_CHAIN package.
- CREATE_CREDENTIAL
Use theDBMS_VECTOR.CREATE_CREDENTIALcredential helper procedure to create a credential name for storing user authentication details in Oracle Database. - CREATE_INDEX
Use theDBMS_VECTOR.CREATE_INDEXprocedure to create a vector index. - DISABLE_CHECKPOINT
Use theDISABLE_CHECKPOINTprocedure to disable the Checkpoint feature for a given Hierarchical Navigable Small World (HNSW) index user and HNSW index name. This operation purges all older checkpoints for the HNSW index. It also disables the creation of future checkpoints as part of the HNSW graph refresh. - DROP_CREDENTIAL
Use theDBMS_VECTOR.DROP_CREDENTIALcredential helper procedure to drop an existing credential name from the data dictionary. - DROP_ONNX_MODEL Procedure
This procedure deletes the specified ONNX model. - ENABLE_CHECKPOINT
Use theENABLE_CHECKPOINTprocedure to enable the Checkpoint feature for a given Hierarchical Navigable Small World (HNSW) index user and HNSW index name. - GET_INDEX_STATUS
Use theGET_INDEX_STATUSprocedure to query the status of a vector index creation. - INDEX_ACCURACY_QUERY
Use theDBMS_VECTOR.INDEX_ACCURACY_QUERYfunction to verify the accuracy of a vector index for a given query vector, top-K, and target accuracy. - INDEX_ACCURACY_REPORT
Use theDBMS_VECTOR.INDEX_ACCURACY_REPORTfunction to capture from your past workloads, accuracy values achieved by approximate searches using a particular vector index for a certain period of time. - INDEX_VECTOR_MEMORY_ADVISOR
Use theINDEX_VECTOR_MEMORY_ADVISORprocedure to determine the vector memory size needed for a particular vector index. This helps you evaluate the number of indexes that can fit for each simulated vector memory size. - LOAD_ONNX_MODEL
This procedure enables you to load an ONNX model into the Database. - LOAD_ONNX_MODEL_CLOUD
This procedure enables you to load an ONNX model from object storage into the Database. - QUERY
Use theDBMS_VECTOR.QUERYfunction to perform a similarity search operation which returns the top-k results as a JSON array. - REBUILD_INDEX
Use theDBMS_VECTOR.REBUILD_INDEXfunction to rebuild a vector index. - RERANK
Use theDBMS_VECTOR.RERANKfunction to reassess and reorder an initial set of results to retrieve more relevant search output. - UTL_TO_CHUNKS
Use theDBMS_VECTOR.UTL_TO_CHUNKSchainable utility function to split a large plain text document into smaller chunks of text. - UTL_TO_EMBEDDING and UTL_TO_EMBEDDINGS
Use theDBMS_VECTOR.UTL_TO_EMBEDDINGandDBMS_VECTOR.UTL_TO_EMBEDDINGSchainable utility functions to generate one or more vector embeddings from textual documents and images. - UTL_TO_GENERATE_TEXT
Use theDBMS_VECTOR.UTL_TO_GENERATE_TEXTchainable utility function to generate a text response for a given prompt or an image, by accessing third-party text generation models.
Parent topic: Vector Search PL/SQL Packages