# US 2025/0094398 A1 · Unified rdbms framework for hybrid vector search on different data types via sql and nosql

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094398 A1
- Document ID: US20250094398A1
- Status: Published application
- Kind: A1
- Application number: 18/885,531
- Filed: 2024-09-13
- Published: 2025-03-20
- Earliest claimed: 2023-09-15
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Aleksandra Czarlinska; Saurabh Naresh Netravalkar; Denis B. Mukhin; Harichandan Roy; Zhen Hua Liu; Sebastian de la Hoz Luna; Beda Christoph Hammerschmidt; George R. Krupka; Bo Xia; David Chih-Wei Jiang
- Web page: https://patentgrep.com/patent/US20250094398A1

## CPC

- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/316: {Indexing structures}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/3347: {using vector based model}
- G06F 16/93: Document management systems
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for a unified relational database framework for hybrid vector search are provided. In one technique, multiple documents are accessed and a vector table and a text table are generated. For each accessed document, data within the document is converted to plaintext, multiple chunks are generated based on the plaintext, an embedding model generates a vector for each of the chunks, the vectors are stored in the vector table along with a document identifier that identifies the accessed document, tokens are generated based on the plaintext, the tokens are stored in the text table along with the document identifier. Such processing may be performed in a database system in response to a single database statement to create a hybrid index. In response to receiving a hybrid query, a vector query and a text query are generated and executed and the respective results may be combined.

## Claims

### Claim 1

A method performed within a database system comprising:
accessing a plurality of documents;
generating a vector table and a text table;
for each document of the plurality of documents:
converting data within said each document to plaintext;
generating a plurality of chunks based on the plaintext;
generating, by an embedding model, a plurality of vectors based on the plurality of chunks;
storing the plurality of vectors in the vector table;
storing, in the vector table, a document identifier, that identifies said each document, in association with each vector of the plurality of vectors;
generating a plurality of tokens based on the plaintext;
storing the plurality of tokens in the text table;
storing, in the text table, the document identifier in association with each token of the plurality of tokens;
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
the plurality of documents comprise a first document of a first type and a second document of a second type that is different than the first type;
converting the data with said each document comprises:
for the first document of the plurality of documents, performing a first conversion operation on the first document based on the first document being of the first type;
for the second document of the plurality of documents, performing a second conversion operation on the second document based on the second document being of the second type.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
receiving a database statement that instructs a database system to create a hybrid index;
wherein generating the vector table and the text table is performed in response to receiving the database statement.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
generating a vector index on the vector table in response to receiving the database statement;
generating a text index on the text table in response to receiving the database statement.

### Claim 5 (depends on 3)

The method of claim 3, wherein the database statement indicates the embedding model.

### Claim 6 (depends on 3)

The method of claim 3, wherein the database statement indicates a type of vector index, the method further comprising:
generating the type of vector index in response to receiving the database statement.

### Claim 7 (depends on 3)

The method of claim 3, wherein the database statement indicates a technique for chunking the plaintext, wherein generating the plurality of chunks is performed using the technique.

### Claim 8 (depends on 3)

The method of claim 3, wherein the database statement indicates a distance operation for computing a distance between two vectors.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
receiving a hybrid query that indicates one or more search terms;
generating one or more query vectors based on the one or more search terms;
identifying, based on the one or more query vectors, one or more document identifiers from the vector table.

### Claim 10 (depends on 9)

The method of claim 9, wherein the one or more search terms are one or more first search terms, the method further comprising:
in response to receiving the hybrid query, generating a text query that includes one or more second search terms, wherein the one or more second search terms are either (i) one or more of the one or more first search terms or (ii) different than the one or more first search terms;
executing the text query, wherein executing the text query comprises identifying, based on the one or more second search terms, one or more second document identifiers from the text table.

### Claim 11 (depends on 9)

The method of claim 9, wherein the hybrid query is a first hybrid query, wherein the first hybrid query is a SQL query, the method further comprising:
receiving a second hybrid query that indicates the hybrid index, wherein the second hybrid query is a NOSQL query or a low SQL query.

### Claim 12 (depends on 9)

The method of claim 9, further comprising:
using the one or more query vectors to identify a plurality of chunks in the vector table;
determining that two or more chunks in the plurality of chunks belong to a particular document of the plurality of documents;
for a first chunk of the two or more chunks:
identifying a first plurality of chunk scores of chunks that surround the first chunk;
generating, for the first chunk, a first adjustment score based on the first plurality of chunk scores and a first chunk score of the first chunk;
for a second chunk of the two or more chunks:
identifying a second plurality of chunk scores of chunks that surround the second chunk;
generating, for the second chunk, a second adjustment score based on the second plurality of chunk scores and a second chunk score of the second chunk;
determining a score for the particular document based on the first adjustment score and the second adjustment score.

### Claim 13 (depends on 9)

The method of claim 9, further comprising:
using the one or more query vectors to identify a set of chunks in the vector table;
determining that a plurality of chunks in the set of chunks belong to a particular document of the plurality of documents;
identifying a window size that is less than the number of chunks in the plurality of chunks;
identifying a plurality of subsets of the plurality of chunks;
for each subset in the plurality of subsets:
generating an average score of chunks scores of chunks in said each subset;
adding the average score to a set of average scores;
identifying the maximum average score in the set of average scores;
associating the maximum average score with the particular document.

### Claim 14 (depends on 1)

The method of claim 1, further comprising:
receiving a hybrid query that indicates one or more search terms;
in response to receiving the hybrid query, generating (1) a text sub-query that targets the text table and (2) a vector sub-query that targets the vector table;
executing the text sub-query to generate a first set of results;
executing the vector sub-query to generate a second set of results;
combining the first set of results with the second set of results to generate a final set of results.

### Claim 15 (depends on 14)

The method of claim 14, wherein the first set of results is a first set of document identifiers, wherein the second set of results is a second set of document identifiers, wherein the final set of results is (i) a union of the first set of document identifiers and the second set of document identifiers or (ii) an intersection of the first set of document identifiers and the second set of document identifiers.

### Claim 16

A method performed by a database system, comprising:
accessing a plurality of documents that comprises documents of different types;
for each document of the plurality of documents:
identifying a type of said each document;
selecting a conversion operation that corresponds to the type;
using the conversion operation to convert data within said each document to plaintext;
generating a vector index based on the plaintext;
generating a text index based on the plaintext;
wherein the method is performed by one or more computing devices.

### Claim 17

One or more non-transitory storage media storing instructions which, when executed by one or more computing devices of a database system, cause:
accessing a plurality of documents;
generating a vector table and a text table;
for each document of the plurality of documents:
converting data within said each document to plaintext;
generating a plurality of chunks based on the plaintext;
generating, by an embedding model, a plurality of vectors based on the plurality of chunks;
storing the plurality of vectors in the vector table;
storing, in the vector table, a document identifier, that identifies said each document, in association with each vector of the plurality of vectors;
generating a plurality of tokens based on the plaintext;
storing the plurality of tokens in the text table;
storing, in the text table, the document identifier in association with each token of the plurality of tokens.

### Claim 18 (depends on 17)

The one or more storage media of claim 17, wherein:
the plurality of documents comprise a first document of a first type and a second document of a second type that is different than the first type;
converting the data with said each document comprises:
for the first document of the plurality of documents, performing a first conversion operation on the first document based on the first document being of the first type;
for the second document of the plurality of documents, performing a second conversion operation on the second document based on the second document being of the second type.

### Claim 19 (depends on 17)

The one or more storage media of claim 17, wherein instructions which, when executed by the one or more computing devices, further cause:
receiving a database statement that instructs a database system to create a hybrid index;
wherein generating the vector table and the text table is performed in response to receiving the database statement.

### Claim 20 (depends on 19)

The one or more storage media of claim 19, wherein instructions which, when executed by the one or more computing devices, further cause:
generating a vector index on the vector table in response to receiving the database statement;
generating a text index on the text table in response to receiving the database statement.
