Use SQL Functions to Generate Embeddings

Choose to implement Vector Utility SQL functions to perform parallel or on-the-fly chunking and embedding operations, within Oracle Database.

Vector Utility SQL functions are intended for a direct and quick interaction with data, within pure SQL.

To get chunks, this function uses the in-house implementation with Oracle Database. To get an embedding, this function uses ONNX embedding models that you load into the database (and not third-party REST providers).

VECTOR_CHUNKS

Use the VECTOR_CHUNKS SQL function if you want to split plain text into chunks (pieces of words, sentences, or paragraphs) in preparation for the generation of embeddings, to be used with a vector index.

For example, you can use this function to build a standalone Text Chunking system that lets you break down a large amount of text into smaller yet semantically meaningful chunks. You can experiment with your chunks by inspecting and accordingly amending the chunking results and then proceed further.

For detailed information, see VECTOR_CHUNKS in Oracle Database SQL Language Reference.

VECTOR_EMBEDDING

Use the VECTOR_EMBEDDING function if you want to generate a single vector embedding for different data types.

For example, you can use this function in information-retrieval applications or chatbots, where you can generate a query vector on the fly from a user's natural language text input.

For detailed information, see VECTOR_EMBEDDING in Oracle Database SQL Language Reference.