IP Library Granted Patent US 12711321
Granted Patent B2
US 12711321 · App. 18/418,272 · Granted Aug 18, 2026

Heuristic expressions for flow builder conditionals

Inventors: Nikhil Sharma (San Francisco, CA); Vidhu Priya (San Francisco, CA)
G06F40/40
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 12711321
App. No.
18/418,272
Granted
Aug 18, 2026
Kind
B2
Abstract

In one aspect, a computerized method comprising: providing a user-specified condition, wherein the user-specified condition comprises a flow builder conditional that the user specifies what is to be tested for on a heuristic basis; with a condition optimizer; obtains a user input, wherein the user input is obtained from the user specified condition, wherein the user-specified condition is in a freeform, and optimizes the user-specified condition by rewriting the user-specified condition in a form that is most likely generate an output of a prediction with a highest accuracy; with the optimized form of the user-specified condition, structuring a conditional prompt; passing the conditional prompt to a large language model (LLM), wherein the conditional prompt comprises the information that is input into the LLM to obtain an LLM output; and with the LLM, performing a model that makes an inference about the conditional prompt along with a base prompt for asking a large language model for prediction to obtain a predicted evaluation.

Claims (33)

1 . A computerized method comprising:

receiving, via a user interface of a flow builder, a freeform natural-language condition text defining a heuristic condition for a conditional node;

detecting an engagement event associated with a target profile and storing, in an engagement-history database, engagement history records associated with the target profile;

generating, by a data augmenter, a prompt payload for evaluating the heuristic condition by: selecting a plurality of example profiles that include (i) at least one positive example profile labeled as satisfying the heuristic condition and (ii) at least one negative example profile labeled as not satisfying the heuristic condition;

obtaining, for each of the plurality of example profiles and for the target profile, profile data comprising at least biographical description data and post history data;

obtaining, for the target profile, social graph records representing social connections of the target profile;

obtaining, for the target profile, customer relationship management records representing interactions between the target profile and an administrator configuring a flow in the flow builder;

synchronizing the customer relationship management records and the social graph records into a vector database that organizes unstructured information for semantic search access by a large language model;

retrieving, from the vector database, a set of records associated with the target profile, wherein the set of records includes at least one of the engagement history records, the social graph records, or the customer relationship management records;

structuring a prompt template that includes (i) a base prompt in template form configured to be hydrated with profile data and retrieved records and (ii) an output constraint requiring a binary output that consists of only a first token corresponding to true and a second token corresponding to false, without modified capitalization and without added spacing or punctuation;

hydrating the prompt template using (i) the freeform natural-language condition text, (ii) normalized representations of the set of records associated with the target profile, and (iii) normalized representations of the plurality of example profiles;

submitting the prompt payload to a large language model to obtain a model output;

validating the model output against the output constraint and, in response to validating the model output, extracting a predicted evaluation comprising the binary output; and

executing the conditional node in the flow builder by selecting, based on the predicted evaluation, a first branch when the predicted evaluation corresponds to true and selecting a second branch when the predicted evaluation corresponds to false.

2 . The computerized method of claim 1 , wherein the freeform natural-language condition text is received from an administrator configuring a flow in the flow builder.

3 . The computerized method of claim 2 , wherein the predicted evaluation infers data about the target profile based on social connections represented by the social graph records associated with the target profile.

4 . The computerized method of claim 3 , wherein the engagement history records comprise a post history of the target profile that is relevant to the predicted evaluation.

5 . The computerized method of claim 4 , wherein the customer relationship management records comprise interaction data between the target profile and a client that configured the heuristic condition in the flow builder.

6 . The computerized method of claim 5 , wherein retrieving the set of records from the vector database comprises performing a semantic search over unstructured information organized in the vector database to retrieve records responsive to the freeform natural-language condition text.

7 . The computerized method of claim 6 , further comprising, prior to hydrating the prompt template, determining that the freeform natural-language condition text is not well formed and rewriting the freeform natural-language condition text using at least one machine-learning model to generate a rewritten condition text used to hydrate the prompt template.

8 . The computerized method of claim 7 , wherein generating the prompt payload further comprises obtaining, by the data augmenter, biographical description data for the plurality of example profiles and the target profile, and unrolling the biographical description data into standardized natural-language representations included in the prompt payload.

9 . The computerized method of claim 8 , wherein executing the conditional node comprises evaluating a heuristic expression corresponding to the heuristic condition using the predicted evaluation to control branching in a visual flow builder.

10 . A computerized method comprising:

receiving, via a user interface of a flow builder, a freeform natural-language condition text defining a heuristic condition for a conditional node;

generating, by a data augmenter, a prompt payload for evaluating a heuristic expression corresponding to the heuristic condition by:

selecting zero or more positive example profiles labeled as satisfying the heuristic condition and zero or more negative example profiles labeled as not satisfying the heuristic condition;

retrieving, from a vector database that organizes unstructured information for semantic search access by a large language model, a set of records associated with a target profile, the set of records including at least one of engagement history records, social graph records, or customer relationship management records;

structuring a prompt template including (i) a base prompt in template form configured to be hydrated with the freeform natural-language condition text, the set of records, and the selected example profiles and (ii) an output constraint requiring a binary output that consists of only a first token corresponding to true and a second token corresponding to false, without modified capitalization and without added spacing or punctuation;

hydrating the prompt template using (i) the freeform natural-language condition text, (ii) normalized representations of the set of records associated with the target profile, and (iii) normalized representations of the selected example profiles;

submitting the prompt payload to a large language model to obtain a model output;

validating the model output against the output constraint and, in response to validating, extracting a predicted evaluation comprising the binary output;

evaluating the heuristic expression for the conditional node using the predicted evaluation; and

executing the conditional node in the flow builder by selecting, based on the predicted evaluation, a first branch when the predicted evaluation corresponds to true and selecting a second branch when the predicted evaluation corresponds to false.