IP Library Granted Patent US 12694020
Granted Patent B1
US 12694020 · App. 19/074,026 · Granted Jul 28, 2026

Execution speed and efficacy of semantic queries based on selection of relevant document subsets

Inventors: Mark Sales (Castro Valley, CA); Ayush Sharma (Berkeley, CA); Arsal Imtiaz (Oakland, CA); Dean Kim (Oakland, CA); Joseph Kijewski (Berkeley, CA); Ram Subbaroyan (Berkeley, CA)
Assignee: Everlaw, Inc.
G06F16/243G06F16/24522G06F16/2453G06F40/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12694020
App. No.
19/074,026
Granted
Jul 28, 2026
Kind
B1
Abstract

Aspects of the invention may comprise a method for improving execution speed of a semantic query on a database by executing the semantic query on a subset of relevant documents in the database. The method may provide for improving execution speed without sacrificing accuracy because the subset of documents comprises documents relevant to the semantic query. Aspects of the invention may further provide for identifying key concepts in a semantic query and generating a filter query based on the identified key concepts. The filter query may be used to select the subset of relevant documents. Aspects further provide for generating one or more keyword queries based on a key concept and at least one search operator. The filter query may incorporate at least one keyword query. Aspects of the invention further comprise implementing entity recognition, metadata filtering, and essentialness to improve the selected subset.

Claims (104)

1 . A computing method, comprising:

receiving, at a computing device and via a network, a first semantic query to be executed against a document corpus, wherein the document corpus comprises a plurality of documents;

based on the computing device receiving the first semantic query, generating a filter query, wherein generating the filter query comprises:

generating, by the computing device, a first prompt based on the first semantic query, wherein the first prompt is configured to direct a large language model (LLM) to identify one or more key concepts in the first semantic query;

submitting, to a first LLM, the first prompt;

identifying, based on the first LLM executing and in response to the first prompt and based on the document corpus, one or more key concepts in the first semantic query;

determining, by the computing device and for each key concept of the key concepts, one or more selection parameters corresponding to each key concept and based on the document corpus, wherein:

the selection parameters corresponding to each key concept comprise at least a count parameter, wherein the count parameter is based on a frequency of each key concept in the document corpus;

generating, by the computing device, one or more keyword queries,

wherein a keyword query of the keyword queries is based on at least one key concept and at least one search operator; and

determining, by the computing device and for each keyword query of the keyword queries, one or more selection parameters based on the document corpus, wherein the selection parameters corresponding to each keyword query comprise at least a count parameter;

generating, by the computing device, the filter query by selecting one or more filter terms from the key concepts and the keyword queries, based at least in part on the count parameter corresponding to each respective filter term;

selecting, by the computing device, via the network and using the filter query, a subset of documents in the document corpus;

executing, by the computing device and via the network, the first semantic query against the subset of documents; and

receiving, at the computing device, results of the first semantic query executed against the subset of documents.

2 . The method of claim 1 , wherein generating the filter query further comprises:

selecting one or more filter terms for the filter query;

determining a count parameter corresponding to the filter query; and based on the count parameter corresponding to the filter query not exceeding a target count, selecting one or more additional filter terms for the filter query.

3 . The method of claim 1 , wherein the count parameter for a given key concept is a number of documents in the document corpus comprising the given key concept.

4 . The method of claim 1 , wherein a keyword query based on a first key concept is generated by:

determining, based on the count parameter associate corresponding with the first key concept, that the count parameter exceeds a first threshold;

selecting, from the key concepts, a second key concept; and

connecting the first key concept and second key concept with a search operator.

5 . The method of claim 1 , wherein the selection parameters further comprise an essentialness parameter, and wherein selecting the one or more filter terms for the filter query is further based on:

comparing the essentialness parameter corresponding to each respective filter term; and

based on the essentialness parameter corresponding to a respective filter term indicating that the respective filter term has a high degree of essentialness, selecting the respective filter term.

6 . The method of claim 5 , wherein determining the selection parameters for a respective key concept further comprises:

identifying, using the first LLM, the essentialness parameter corresponding to respective key concept; and

wherein essentialness is based on a likelihood that a document in the document corpus is relevant to the first semantic query and does not correspond to the respective key concept.

7 . The method of claim 1 , wherein identifying the key concepts further comprises:

predicting, using the first LLM, a likelihood that a first key concept corresponds to a first metadata field in the document corpus;

based on a high likelihood that the first key concept corresponds to the first metadata field, generating, using the first LLM, a first metadata query corresponding to the first key concept and the first metadata field; and

wherein the key concepts include the first metadata query.

8 . The method of claim 1 , wherein identifying the one or more key concepts in the first semantic query further comprises:

identifying, by the first LLM, a first term in the first semantic query;

determining, by the first LLM, that the first term corresponds to a first entity level concept; and

including the first entity level concept in the key concepts.

9 . The method of claim 8 , wherein an entity level concept comprises a plurality of key concepts referring to a same entity.

10 . The method of claim 8 , wherein the first entity level concept is a person.

11 . The method of claim 1 , wherein a first keyword query based on a first key concept is configured to exclude one or more negative keywords, and

wherein a negative keyword is a first keyword appearing in one or more documents in the document corpus which the first key concept also appears in and wherein the first keyword is not relevant to the first semantic query.

12 . The method of claim 1 , wherein a search operator comprises one of:

an AND operator;

an OR operator;

a NOT operator; or

a proximity operator.

13 . The method of claim 1 , wherein building the filter query further comprises:

selecting one or more filter terms for the filter query;

determining a count parameter corresponding to the filter query; and

based on the count parameter exceeding a target count:

selecting one or more additional filter terms for the filter query, and

adding the one or more additional filter terms to the filter query with an AND operator.

14 . A non-transitory computer readable medium having instructions stored thereon that, when executed by a computing device comprising one or more processors, cause the computing device to perform steps comprising:

receiving, at the computing device and via network, a first semantic query to be executed against a document corpus, wherein the document corpus comprises a plurality of documents;

based on the computing device receiving the first semantic query, generating a filter query, wherein generating the filter query comprises:

generating, by the computing device, a first prompt based on the first semantic query, wherein the first prompt is configured to direct a large language model (LLM) to identify one or more key concepts in the first semantic query;

submitting, to a first LLM, the first prompt;

identifying, based on the first LLM executing and in response to the first prompt and based on the document corpus, one or more key concepts in the first semantic query;

determining, by the computing device and for each key concept of the key concepts, one or more selection parameters corresponding to each key concept and based on the document corpus, wherein:

the selection parameters comprise at least a count parameter, wherein the count parameter is based on a frequency of each key concept in the document corpus;

generating, by the computing device, one or more keyword queries,

wherein a keyword query of the keyword queries is based on a key concept and at least one search operator; and

determining, by the computing device and for each keyword query of the keyword queries, one or more selection parameters based on the document corpus, wherein the selection parameters corresponding to each keyword query comprise at least a count parameter;

generating, by the computing device, the filter query by selecting one or more filter terms from the key concepts and the keyword queries, based at least in part on the count parameter corresponding to each respective filter term;

selecting, by the computing device, via the network an using the filter query, a subset of documents in the document corpus;

executing, by the computing device and via the network, the first semantic query against the subset of documents; and

receiving, at the computing device, results of the first semantic query executed against the subset of documents.

15 . The non-transitory computer readable medium of claim 14 ,

wherein generating the filter query further comprises:

selecting one or more filter terms for the filter query;

determining a count parameter corresponding to the filter query; and

based on the count parameter corresponding to the filter query not exceeding a target count, selecting one or more additional filter terms for the filter query.

16 . The non-transitory computer readable medium of claim 14 , wherein the selection parameters further comprise an essentialness parameter, and wherein selecting the one or more filter terms for the filter query is further based on:

comparing the essentialness parameter corresponding to each respective filter term; and

based on the essentialness parameter corresponding to a respective filter term indicating that the respective filter term has a high degree of essentialness, selecting the respective filter term.

17 . The non-transitory computer readable medium of claim 14 , wherein building the filter query further comprises:

selecting one or more filter terms for the filter query;

determining a count parameter corresponding to the filter query; and

based on the count parameter exceeding a target count:

selecting one or more additional filter terms for the filter query, and

adding the one or more additional filter terms to the filter query with an AND operator.

18 . A computing device, comprising:

one or more processors; and

memory storing instructions that, when executed by the one or more processors, cause the computing device to:

receive, at the computing device and via a network, a first semantic query to be executed against a document corpus;

based on the computing device receiving the first semantic query, generating a filter query, wherein generating the filter query comprises:

generating, by the computing device, a first prompt based on the first semantic query, wherein the first prompt is configured to direct an LLM to identify one or more key concepts in the first semantic query;

submitting, to a first LLM, the first prompt;

identifying, based on the first LLM executing and in response to the first prompt and based on the document corpus, one or more key concepts in the first semantic query;

determine, by the computing device and for each key concept of the key concepts, one or more selection parameters corresponding to each key concept and based on the document corpus, wherein:

the selection parameters corresponding to each key concept comprise at least a count parameter based on a frequency of each key concept in the document corpus;

generate, by the computing device, one or more keyword queries, wherein a keyword query of the keyword queries is based on a key concept and at least one search operator; and

determine, by the computing device and for each keyword query of the keyword queries, one or more selection parameters based on the document corpus, wherein the selection parameters corresponding to each keyword query comprise at least a count parameter;

generate, by the computing device, the filter query by selecting one or more filter terms from the key concepts and the keyword queries, based at least in part on the count parameter corresponding to each respective filter term;

select, by the computing device, via the network, and using the filter query, a subset of documents in the document corpus;

execute, by the computing device and via the network, the first semantic query against the subset of documents; and

receive, at the computing device, results of the first semantic query executed against the subset of documents.

19 . The computing device of claim 18 , wherein the memory storing instructions that, when executed by the one or more processors, further cause the computing device to generate the filter query by:

selecting one or more filter terms for the filter query;

determining a count parameter corresponding to the filter query; and

based on the count parameter corresponding to the filter query not exceeding a target count, selecting one or more additional filter terms for the filter query.

20 . The computing device of claim 18 , wherein the selection parameters further comprise an essentialness parameter, and the memory storing instructions that, when executed by the one or more processors, further cause the computing device to select the one or more filter terms by:

comparing the essentialness parameter corresponding to each respective filter term; and

based on the essentialness parameter corresponding to a respective filter term indicating that the respective filter term has a high degree of essentialness, selecting the respective filter term.