IP Library Granted Patent US 12688240
Granted Patent B1
US 12688240 · App. 19/417,144 · Granted Jul 21, 2026

Computationally efficient search filter

Inventors: Sophia Cui (Mountain View, CA); Aashish Dhamdhere (Mountain View, CA)
Assignee: Intuit Inc.
G06F16/90344
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 12688240
App. No.
19/417,144
Granted
Jul 21, 2026
Kind
B1
Abstract

A method including receiving a number of results to a query. The method also includes interweaving execution of regular expressions and prompts on the number of results. Interweaving removes negative results from the number of results. Interweaving continues until a stop condition is satisfied. Interweaving generates, after the stop condition is satisfied, final results including a subset of the number of results including positive results to the query. The regular expressions are executed by a processor. The prompts are executed by a language model being executed by the processor. The method also includes returning the final results.

Claims (108)

1 . A method comprising:

receiving a plurality of results to a query;

generating, from the query, a plurality of regular expressions each comprises a noise tag and a recall tag:

processing an initial subset of the plurality of regular expressions on the plurality of results to generate a reduced plurality of results, wherein the initial subset comprises the regular expression recall tag being recall safe;

determining, from the regular expression noise tag of the initial subset, an estimated remaining noise value in the reduced plurality of results;

interweaving execution of a selected regular expression from the regular expressions outside the initial subset and prompts on the plurality of results to remove negative results and generate a pool of remaining results, wherein the noise tag for the selected regular expression comprises a higher permitted noise than the initial subset and the regular expression recall tag for the selected regular expression is less than recall safe, wherein:

the interweaving continues until a stop condition is satisfied,

identifying the negative results that were removed as rejected results;

determining, from the set of rejected results and based on the noise tags and recall tags, a coverage for the plurality of results, wherein the coverage being a predicted number of true positives remaining in the pool of remaining results;

executing, responsive to the coverage failing to satisfy a coverage threshold, a recall rescue pass by processing a large language model on the set of rejected results to identify recalled results representing true positive results in the rejected results;

adding the rejected true positive results back into the pool of remaining results to generate adjusted results;

determining, after processing the recall rescue pass and based on the estimated remaining noise value, a reduced estimated noise value;

continuing the interweaving and the recall rescue pass until the reduced estimated noise value satisfies a noise threshold; and

returning final results comprising the adjusted results from the pool of remaining results as determined upon termination of the interweaving and the recall rescue pass when the reduced estimated noise satisfies the noise threshold.

2 . The method of claim 1 , further comprising:

generating the regular expressions by modifying a plurality of regular expression templates according to the query, wherein the regular expressions are programmed to filter the plurality of results.

3 . The method of claim 1 , further comprising:

generating the prompts by modifying a plurality of prompt templates according to the query, wherein the prompts instruct the language model to filter the plurality of results.

4 . The method of claim 1 , wherein each of the prompts comprises a portion of the plurality of results and a command to check the portion of the plurality of results against a standard.

5 . The method of claim 4 , wherein the prompts instruct the large language model to return a single answer token.

6 . The method of claim 1 , wherein the interweaving comprises:

alternating execution of at least some of the regular expressions and at least some of the prompts.

7 . The method of claim 1 , wherein the interweaving comprises:

executing at least some of the regular expressions before executing any of the prompts.

8 . The method of claim 1 , wherein:

each of the regular expressions comprises a regex noise tag, and each of the prompts comprises a prompt noise tag.

9 . The method of claim 8 , wherein the interweaving further comprises:

executing, first, first ones of the regular expressions that comprise regex noise tags having a recall safe setting.

10 . The method of claim 9 , wherein the interweaving further comprises:

executing, second, a second regular expression comprising regex noise tag indicating the estimated remaining noise value after execution of the second regular expression;

identifying the rejected results, from among the plurality of results, that were rejected by executing the second regular expression;

sampling the rejected results to generate a sampling;

executing, third, the large language model on the sampling to identify the rejected positives.

11 . The method of claim 10 , further comprising:

continuing the interweaving until the stop condition is satisfied.

12 . The method of claim 9 , wherein the interweaving further comprises:

executing, second, a micro prompt from among the prompts, wherein the micro prompt comprises a noise tag indicating the estimated remaining noise value after execution of the micro prompt;

identifying the rejected results, from among the plurality of results, that were rejected by executing the micro prompt;

sampling the rejected results to generate a sampling;

executing, third, the large language model on the sampling to identify rejected positives.

13 . The method of claim 9 , wherein the interweaving comprises:

interweaving a first process and a second process, wherein the first process comprises:

executing a second regular expression comprising a first noise tag indicating a first estimated remaining noise value after execution of the second regular expression;

identifying first rejected results, from among the plurality of results, that were rejected by executing the second regular expression;

sampling the first rejected results to generate a sampling;

executing the large language model on the sampling to identify first rejected positives;

determining a first coverage from the first rejected positives;

comparing the first coverage to a first coverage threshold;

executing, responsive to the first coverage failing to satisfy the first coverage threshold, a first recall rescue pass by executing the large language model on the first rejected results to identify first rejected true positive results remaining in the first rejected results; and

adding the first rejected true positive results back into the pool of remaining results; and

wherein the second process comprises:

executing a micro prompt from among the prompts, wherein the micro prompt comprises a second noise tag indicating a second estimated remaining noise value after execution of the micro prompt;

identifying second rejected results, from among the plurality of results, that were rejected by executing the micro prompt;

sampling the second rejected results to generate a second sampling;

executing the large language model on the second sampling to identify second rejected positives; determining a second coverage from the second rejected positives;

comparing the second coverage to a second coverage threshold; executing, responsive to the second coverage failing to satisfy the second coverage threshold, a second recall rescue pass by executing the large language model on the second rejected results to identify second rejected true positive results remaining in the second rejected results; and

adding the second rejected true positive results back into the pool of remaining results.

14 . The method of claim 1 , further comprising:

generating at least one of the regular expressions or at least one of the prompts by:

generating a template for the at least one of the regular expressions or the at least one of the prompts,

applying the template to a test set of results to a test query to determine a predicted remaining noise after applying the template and a predicted safety value representing a likelihood of the template, when executed, filtering a true positive from the test set of results,

assigning a noise tag to the template, wherein the noise tag represents the predicted remaining noise,

assigning a recall safe tag to the template, wherein the recall safe tag represents the likelihood being one percent or less, and

generating the at least one of the regular expressions or the at least one of the prompts by modifying the template.

15 . The method of claim 14 , wherein the template comprises a prompt template, and wherein the generating of the at least one of the regular expressions or the at least one of the prompts further comprises assigning a token output limit of a single token to the prompt template.

16 . The method of claim 1 , wherein the method further comprises:

tracking, while interweaving, a total number of tokens used during execution of the prompts, and

wherein the stop condition comprises the total number of tokens exceeding a token threshold.

17 . The method of claim 1 , wherein the method further comprises:

tracking, while interweaving, a net remaining noise in the pool of remaining results comprising the plurality results less negative results removed from the plurality of results;

tracking, while interweaving, a current coverage in the pool of remaining results, and wherein:

the stop condition comprises the net remaining noise being less than a target noise, and

the stop condition further comprises the current coverage being greater than a predetermined coverage.

18 . The method of claim 17 , wherein the method further comprises:

tracking, while interweaving, a total number of tokens used during execution of the prompts, and

wherein the stop condition comprises the total number of tokens exceeding a token threshold.

19 . A system comprising:

a computer processor;

a server controller executable by the computer processor to:

receive a plurality of results to a query,

generate, from the query, a plurality of regular expressions each comprises a noise tag and a recall tag;

process an initial subset of the plurality of regular expressions on the plurality of results to generate a reduced plurality of results, wherein the initial subset comprises the regular expression recall tag being recall safe;

determine, from the regular expression noise tag of the initial subset, an estimated remaining noise value in the reduced plurality of results;

interweave execution of a selected regular expression from the regular expressions outside the initial subset and prompts on the plurality of results to remove negative results and generate a pool of remaining results, wherein the noise tag for the selected regular expression comprises a higher permitted noise than the initial subset and the regular expression recall tag for the selected regular expression is less than recall safe, wherein:

the interweaving continues until a stop condition is satisfied,

and

identify the negative results that were removed as rejected results;

determine, from the set of rejected results and based on the noise tags and recall tags, a coverage for the plurality of results, wherein the coverage being a predicted number of true positives remaining in the pool of remaining results;

execute, responsive to the coverage failing to satisfy a coverage threshold, a recall rescue pass by processing a large language model on the set of rejected results to identify recalled results representing true positive results in the rejected results;

add the rejected true positive results back into the pool of remaining results to generate adjusted results;

determine, after processing the recall rescue pass and based on the estimated remaining noise value, a reduced estimated noise value;

continue the interweaving and the recall rescue pass until the reduced estimated noise value satisfies a noise threshold; and

return final results comprising the adjusted results from the pool of remaining results as determined upon termination of the interweaving and the recall rescue pass when the reduced estimated noise satisfies the noise threshold.

20 . A non-transitory computer-readable medium having stored thereon executable instructions, which when executed by a computer processors, cause the computer processor to implement a method comprising:

processing a query on a plurality of data sources to return a plurality of results;

generating, using the query and a plurality of regular expression templates, a plurality of regular expressions, wherein each of the plurality of regular expression templates comprises a regular expression noise tag and a regular expression recall tag;

generating, using the query and a plurality of prompt templates, a plurality of prompts, wherein each of the plurality of prompt templates comprises a prompt noise tag and a prompt recall tag;

processing an initial subset of the plurality of regular expressions to the plurality of results to generate a reduced plurality of results, wherein the initial subset comprises the regular expression recall tag being recall safe;

determining, after applying the initial subset and from the regular expression noise tag of the initial subset of the plurality of regular expressions, an initial estimated noise in the reduced plurality of results;

selecting a selected regular expression from the plurality of regular expressions, wherein the selected regular expression is outside the initial subset, wherein the regular expression noise tag for the selected regular expression comprises a higher permitted noise than the regular expression noise tag in the initial subset, and wherein the regular expression recall tag for the selected regular expression is less than recall safe;

processing the selected regular expression on the reduced plurality of results to generate rejected results that are removed from the reduced plurality of results;

determining, after processing the selected regular expression and from the regular expression noise tag of the selected regular expression and the initial estimated noise, a reduced estimated noise;

processing a selected prompt from the plurality of prompts on the rejected results to generate recalled results representing true positive results in the rejected results;

determining, from the recalled results and the reduced estimated noise, a coverage of the reduced plurality of results, wherein the coverage being a predicted number of true positives remaining in the reduced plurality of results;

processing, responsive to the coverage failing to satisfy a coverage threshold and from the plurality of prompts, a recall prompt on the rejected results to generate updated recalled results;

combining the reduced plurality of results, the rejected results, and the updated recalled results to generate adjusted results;

iterating, responsive to the reduced estimated noise failing to satisfy a noise threshold, the selecting the selected regular expression, the processing the selected regular expression, the determining the reduced estimated noise, the processing the selected prompt, the determining the coverage, the processing the recall prompt, and the combining, wherein the iterating terminates when the reduced estimated noise satisfies the noise threshold, and wherein the iterating generates final results upon termination of the iterating; and

returning the final results comprising the adjusted results upon the termination of the iterating.