Architecture for structured query language generation using synthetic joins
A machine learning-based architecture automatically generates SQL joins by parsing tables and determining similarities, addressing the challenge of organizing and querying large data sets, thereby improving data storage platform efficiency and utilization.
Patent Information
- Application Number
- US19/308835
- Authority / Receiving Office
- US · United States
- Patent Type
- Patents(United States)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-12-01
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Existing data storage technologies struggle to accurately organize and query large data sets containing billions of data items, leading to inefficiencies and loss of data within data storage platforms.
A machine learning-based architecture that automatically generates structured query language joins by parsing tables, determining semantic and textual similarities, and generating confidence scores using a decision tree model, with the option for user confirmation or denial of potential joins.
Enables automated and reliable creation of SQL joins, improving data contextualization and utilization, preventing data loss, and enhancing the performance of data storage platforms.
Smart Images

Figure US12817853-D00000_ABST
Abstract
Description
INTRODUCTION
[0001] Aspects of the present disclosure relate to systems for generating synthetic structured query language joins for data items stored within a database. In particular, embodiments relate to a machine learning-based architecture that creates synthetic joins automatically and in response to user prompts.BACKGROUND
[0002] A growing number of people, businesses, and organizations around the world use bulk data storage technologies to store data in an efficient and organized manner. For example, billions of data items associated with a software platform may be stored in storage platforms such as data lakes.
[0003] However, the volume of data stored in data storage platforms creates numerous technical challenges. For instance, using existing technologies, it may be impractical to accurately organize and query data sets that contain billions of data items. As a result, much of the data within these platforms may be effectively lost since users and associated platforms are unable to identify and contextualize the data. Accordingly, the performance of the data platforms and associated platforms may suffer.
[0004] Accordingly, there is a need in the art for improved techniques for organizing and querying data within data storage platforms.BRIEF SUMMARY
[0005] Certain embodiments provide a method. The method generally includes: parsing a plurality of tables to extract a plurality of table elements, wherein the plurality of table elements include rows or columns within a table of the plurality of tables; determining a level of semantic similarity between a first table element from a first table and a second table element from a second table based on an embedding representation of the first table element and an embedding representation of the second table element; determining a level of textual similarity between the first table element and the second table element; generating confidence scores for structured query language joins based on providing an input to a decision tree, the input comprising: the determined level of semantic similarity; the determined level of textual similarity; and occurrence frequency data associated with the structured query language joins; and selecting a given structured query language join of the structured query language joins based on the generated confidence scores.
[0006] Some embodiments provide a method. The method generally includes: parsing a plurality of tables to extract a plurality of table elements, wherein the plurality of table elements include rows or columns within a table of the plurality of tables; generating confidence scores for structured query language joins based on providing an input to a decision tree, the input comprising data associated with the plurality of table elements; generating a knowledge graph based on the generated confidence scores, wherein: nodes of the knowledge graph comprise a given set of nodes that represent tables or table entities; and edges of the knowledge graph comprise the generated confidence scores; mapping a token of a user prompt to a particular node of the knowledge graph; and selecting a given structured query language join of the structured query language joins based on the mapping and the knowledge graph.
[0007] Other embodiments provide processing systems configured to perform the aforementioned methods as well as those described herein; non-transitory, computer-readable media comprising instructions that, when executed by one or more processors of a processing system, cause the processing system to perform the aforementioned methods as well as those described herein; a computer program product embodied on a computer readable storage medium comprising code for performing the aforementioned methods as well as those further described herein; and a processing system comprising means for performing the aforementioned methods as well as those further described herein.
[0008] The following description and the related drawings set forth in detail certain illustrative features of one or more embodiments.BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The appended figures depict certain aspects of the one or more embodiments and are therefore not to be considered limiting of the scope of this disclosure.
[0010] FIG. 1 depicts example computing components related to automated join generation.
[0011] FIG. 2 depicts additional example computing components related to automated join generation.
[0012] FIG. 3 depicts additional example computing components related to automated join generation.
[0013] FIG. 4A depicts an example table for which a join may be generated according to embodiments disclosed herein.
[0014] FIG. 4B depicts an example table for which a join may be generated according to embodiments disclosed herein.
[0015] FIG. 5 depicts example operations related to automated join generation according to embodiments disclosed herein.
[0016] FIG. 6 depicts additional example operations related to automated join generation according to embodiments disclosed herein.
[0017] FIG. 7 depicts an example of a processing system for automated join generation according to embodiments disclosed herein.
[0018] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the drawings. It is contemplated that elements and features of one embodiment may be beneficially incorporated in other embodiments without further recitation.DETAILED DESCRIPTION
[0019] Aspects of the present disclosure provide apparatuses, methods, processing systems, and computer-readable mediums for automated generation of structured query language (SQL) joins.
[0020] According to certain embodiments, table elements (e.g., rows, columns, and / or the like) may be parsed from multiple tables stored in a data storage platform. Textual and semantic similarity may be determined for elements relative to other elements. For example, embedding representations of the table elements may be generated (e.g., using an encoder layer of a machine learning model) and a semantic similarity metric may be calculated based on the embeddings. An input to a machine learning model (e.g., a decision tree model) may be based on the determined levels of semantic and textual similarity. In some embodiments, the input may be further based on other metrics such as occurrence frequency data that indicates the frequency with which a join between two table elements is made. Based on the input, the machine learning model may generate confidence scores that indicate the likelihood of a join being a correct join. Based on these confidence scores, a knowledge graph may be generated. The knowledge graph may include vertices that represent table elements and the confidence scores may be edges that connect the vertices. Joins may be created automatically based on the confidence scores and / or the knowledge graph. Also, in some embodiments, user prompts (e.g., commands entered by users) may be mapped to nodes of the knowledge graph in order to generate joins based on the user prompts. Furthermore, in certain embodiments, if a potential join has a confidence score that fails to meet a threshold, a follow-up prompt may be generated and presented to the user. Based on the follow-up prompt, the user may confirm or deny the potential join.
[0021] Embodiments of the present disclosure provide numerous technical and practical effects and benefits. For example, embodiments disclosed herein enable automated and reliable creation of SQL joins. Such automated join creation may prevent the loss of data within massive data storage platforms by enabling users and associated platforms to accurately identify and contextualize data that would otherwise remain lost and / or unutilized within a data storage platform with existing techniques. Thus, according to embodiments of the present disclosure, the performance of data storage platforms and computing systems that utilize these platforms may be significantly improved by enabling improved contextualization and utilization of stored data through particular automated join creation techniques described herein.Example Computing Components Related to Automated Join Generation
[0022] FIG. 1 depicts an example of computing components related to automated join generation.
[0023] A user 103 may interact with a software platform via a user interface 110 associated with a computing device. The software application platform may be configured to allow the user 103 to interact with data stored in a data stored platform. The data storage platform may comprise a database 120 that stores multiple data items. The data items may be arranged in tables.
[0024] A join generation component 100 may generate structured query language (SQL) joins. SQL joins may be used to combine data from multiple different tables into a new table, as described in further detail below with respect to FIG. 4A and FIG. 4B. In an example, a first table may contain a column that contains a particular type of data, and a second table may contain a column that contains more data of the same type. The join generation component 100 may automatically generate a join between the two columns to create a single column or table that contains the data from both columns. As described in further detail below with respect to FIG. 2 and FIG. 3, the join generation component 100 may include a machine learning model (e.g., a decision tree model) that is configured to generate confidence scores for potential joins (e.g., a potential join may be any two data items from different tables). The confidence scores may be generated based on an input that includes a level of textual similarity between two data items, a level of semantic similarity between two data items, usage data for joins between two data items (e.g., the number of instances in which the potential join was selected by a user or generated), and / or the like. Joins may be selected based on the confidence scores. For example, joins with the highest confidence scores may be automatically created or presented to the user 103 for confirmation.
[0025] In some embodiments, the join generation component 100 generates a knowledge graph based on the confidence scores. Nodes of the knowledge graph may represent data items (also referred to as table elements) and the confidence scores may be vertices between the data items. The nodes may be arranged in the graph by the tables in which the data items are located. Thus, the map represents the tables and columns / rows within the tables, and the vertices represent joins between columns / rows.
[0026] As shown FIG. 1, user interface 110, join generation component 100, and database 120 interact over a network 140 (e.g., data may be transmitted from one component to another over network 140). Network 140 may be any connection over which data may be transmitted. In one example, network 140 is the Internet. Other embodiments provide that user interface 110, join generation component 100, and / or database 120 are implemented locally with respect to each other on one or more processors associated with a computing system.
[0027] FIG. 2. depicts additional example computing components related to automated join generation.
[0028] As shown in FIG. 2, the join generation component 100 includes a parsing component 200, a textual similarity component 210, a semantic similarity component 220, a usage data component 230, a machine learning model 240, and a knowledge graph component 250.
[0029] The parsing component 200 may include text parsers, SQL parsers, data parsers, and / or the like. The parsing component 200 may be used to parse tables stored in the database 120 to extract table elements such as rows and / or columns within the tables. The parsing component 200 may also parse previously generated SQL joins and queries. As an example, the parsing component 200 may parse archived joins and queries to obtain data related to the frequency at which the queries / joins are used. Usage data component 230 may use the parsing component 200 to compile the usage data. Thus, if historical join data parsed by the parsing component 200 indicates that a particular join has been made seven times (for example), the usage data component 230 may record this usage data. Usage data component 230 may then provide data to the machine learning model 240 that indicates that the particular join has been made seven times.
[0030] The join generation component 100 shown in FIG. 2 further includes textual similarity component 210, which may be a computing component configured to determine a level of textual / numerical similarity between two data items. For example, the textual similarity component 210 may generate n-gram representations of data items and compare the n-gram representations (n-grams are generally groups of up to n consecutive words or characters, where n is a positive integer). For instance, textual similarity component 210 may compare n-grams of data items using a bilingual evaluation understudy (BLEU) algorithm, a recall-oriented understudy for gisting evaluation (ROUGE) algorithm, an edit distance algorithm, and / or the like. Another metric of textual similarity calculated by the textual similarity component 210 may be the normalized intersection cardinality between data items. For example, the total number of unique values in a first column, the total number of unique values in a second column, and the number of unique values that are common to each column may be compared to determine the intersection cardinality between the two columns. Another metric of textual similarity calculated by the textual similarity component 210 may be a distributional similarity such as the Wasserstein distance between numerical columns / rows or the Jensen-Shannon Divergence for categorical columns / rows. Another metric of textual similarity calculated by the textual similarity component 210 may be a correlational similarity between data items, such as Pearson / Spearman coefficients for continuous data, Cramer's V coefficients for categorical data, or Pointwise Mutual Information (PMI) for co-occurrence patterns. The textual similarity metrics calculated by textual similarity component 210 may be provided as part of an input to machine learning model 240.
[0031] The join generation component 100 shown in FIG. 2 further includes semantic similarity component 220. Semantic similarity component 220 may be configured to determine the semantic similarity between two data items. The semantic similarity component 220 may comprise an embedding model (e.g., encoder layers of a machine learning model) that is configured to generate embedding representations of data items. The embedding model may be a Bidirectional Encoder Representations from Transformer (BERT) model or a similar model used to generate embeddings. An embedding generally refers to a vector representation of an entity that represents the entity as a vector in n-dimensional space such that similar entities are represented by vectors that are close to one another in the n-dimensional space. Embeddings may be generated through the use of an embedding model, such as an embedding layer or another type of machine learning model that learns a representation (embedding) for an entity through a training process that trains the model based on a data set, such as a plurality of features of a plurality of entities. The level of semantic similarity between two data items may be calculated by comparing embedding representations of the data items using semantic similarity algorithms such as edit distance or cosine similarity. The calculated semantic similarity metric may be provided as part of an input to the machine learning model 240.
[0032] The machine learning model 240 may generally be any type of machine learning model that is capable of generating confidence scores for potential joins. In certain embodiments, the machine learning model 240 comprises a decision tree model such as a random forest model or a gradient boosted decision tree. A tree model (e.g., a decision tree) makes a classification by dividing the inputs into smaller classifications (at nodes), which result in an ultimate classification at a leaf. A random forest extends the concept of a decision tree model, except the nodes included in any given decision tree within the forest are selected with some randomness. Thus, random forests may reduce bias and group outcomes based upon the most likely positive responses. The machine learning model 240 may have been trained based on historical associations between semantic similarity, textual similarity, usage data, and confidence scores such as using bagging techniques. Accordingly, the machine learning model 240 may generate a confidence score for a potential join of two table elements based on the semantic similarity between the elements, textual similarity (e.g., overlap, cardinality, and / or the like) between the elements, and usage data (such as usage data that indicates how often the two elements are joined). Bagging, or bootstrap aggregating, generally involves randomly sampling subsets of a training data set, fitting a model to these subsets, and aggregating predictions. In some embodiments, majority voting of predictions produced by a plurality of decision trees is used to determine a final model output.
[0033] In an example embodiment, the machine learning model 240 may be trained through a supervised learning process based on training data that comprises training inputs associated with labels indicating whether the joins corresponding to the training inputs were confirmed by users. The training inputs may be based on semantic similarity, textual similarity, and usage data for a given join. The training inputs may be provided to the machine learning model 240, and parameters of the machine learning model 240 may be adjusted based on a variance between the output generated by the machine learning model 240 based on the training inputs and the labels.
[0034] The training process used to train the machine learning model 240 may involve supervised, unsupervised or semi-supervised learning techniques. Supervised learning techniques generally involve providing training inputs to a machine learning model (or one or more layers thereof). The machine learning model processes the training inputs and outputs predictions based on the training inputs. The predictions are compared to known labels associated with the training inputs to determine the accuracy of the machine learning model, and parameters of the machine learning model are iteratively adjusted until one or more conditions are met. For instance, the one or more conditions may relate to an objective function (e.g., a cost function or loss function) for optimizing one or more variables (e.g., model accuracy). In some embodiments, the conditions may relate to whether the predictions produced by the machine learning model based on the training inputs match the known labels associated with the training inputs or whether a measure of error between training iterations is not decreasing or not decreasing more than a threshold amount. The conditions may also include whether a training iteration limit has been reached. Model parameters adjusted during training may include, for example, hyperparameters, values related to numbers of iterations, weights, functions used by nodes to calculate scores, level of randomness, and / or the like. In some embodiments, validation and testing are also performed for a machine learning model (e.g., machine learning model 240), such as based on validation data and test data, as is known in the art.
[0035] The join generation component 100 shown in FIG. 2 further includes a knowledge graph component 250. The knowledge graph component 250 may generate a knowledge graph based on the generated confidence scores. The knowledge graph may contain nodes that represent different table elements such as rows and columns. Table elements from different tables may be connected by vertices in the graph that include the confidence scores. Thus, each potential join in the database 120 may be represented by a respective pair of nodes and a respective edge that connects the respective nodes. The knowledge graph may further include metadata that tracks the inputs that were provided to the machine learning model 240 to generate the confidence scores.
[0036] The knowledge graph may further include semantic nodes that represent user choices, actions, synonyms, concepts, modifiers, and / or the like. As described in further detail below, the semantic nodes may be used to map user prompts to the knowledge graph so that joins may be selected and created based on the user prompts. The semantic nodes may be added to an edge between two table elements. Nodes that represent actions may be nodes that represent SQL operations, such as select, count, avg, and / or the like. Nodes that represent user choices may be generated for potential joins having confidence scores that fail to exceed a threshold. In an example, every potential join with an associated confidence score below a first threshold may be excluded from selection. Every potential join with an associated confidence score above a second, higher, threshold may be selected and created automatically. Every potential join with an associated confidence score that exceeds the first threshold but fails to exceed the second threshold may be selected and presented to the user. If the user confirms a join, the join may be created. If a user does not confirm the join, the join may not be created. A user choice node may then be updated based on the confirmation or non-confirmation of the join. Nodes that represent synonyms may be used to connect table elements to terms that are synonymous with terms within the table elements. For example, a column within a table may list “users” of a software platform, as indicated by a heading of the column. A column within another table may have a heading that includes the word “customers.” These columns may represent the same type of data that is labeled using different headings. Thus, including nodes that represent synonyms of terms within table elements may allow for connecting the table elements to the synonyms, Nodes that represent modifiers may represent temporal window modifiers, value range modifiers, filters, and / or the like. Nodes that represent concepts may represent composite query logic such as a combination of two commands, a combination of a command and a modifier, and / or the like.
[0037] As an illustrative example of how semantic nodes may be used, two tables may include user data for users of a software platform. A column in the first table may contain a list of “users” and a column in the second table may contain a list of “customers.” A user may submit a prompt that says “show me a list of customers that were added in the past year.” The phrase “show me a list of” may be mapped to a “select” node (e.g., based on a semantic similarity comparison involving an embedding representation of the user prompt). The word “customers” may be mapped to a synonym node that associates the word “customers” with the table that has the “users” heading and the table that has the “customers” heading. The phrase “that were added in the past year” may be mapped to a modifier node that limits data included in a join to the past year. Based on this mapping, a join between the first table and the second table may be selected. If the confidence score for the join fails to exceed a threshold, the user may be prompted to confirm the join. The join may then be generated. Based on the knowledge graph, joins between other tables may be included as well to produce a table that includes a list of all customers that were added in the past year.
[0038] A generated join 255 that is generated by the join generation component 100 may be provided to a user for confirmation. Alternatively, a generated join may be created automatically without input from the user (e.g., if the confidence score for the generated join 255 exceeds a threshold).
[0039] Once a join, such as generated join 255, has been generated and / or otherwise confirmed or selected as described herein, the join may be executed against one or more applicable databases (e.g., database 120 of FIG. 1).
[0040] As shown in FIG. 2, an artificial intelligence system 260 is connected to the join generation component 100. The artificial intelligence system 260 may be an agentic artificial intelligence system that is configured to generate responses and interact with users. The artificial intelligence system may comprise a generative machine learning model such as a large language model (LLM). If a confidence score associated with a potential join fails to exceed a threshold, the artificial intelligence system 260 may generate a follow-up prompt 265 that asks the user to confirm the potential join. If the join is confirmed, the machine learning model 240 may be retrained based on the confirmation and the confidence score for the join adjusted upward. If the join is not confirmed, the machine learning model 240 may be retrained based on the non-confirmation and the confidence score for the join adjusted downward. The artificial intelligence system 260 may also perform actions associated with mapping a user prompt to the knowledge graph. For example, the artificial intelligence system 260 may generate an embedding representation of the user prompt and compare the embedding representation to an embedding of the knowledge graph and / or nodes within the knowledge graph. The artificial intelligence system 260 may map the user prompt to the knowledge graph, and if an aspect of the mapping has a confidence score (e.g., a confidence score generated by the artificial intelligence system 260 or semantic similarity component 220 as part of a semantic similarity comparison) that fails to meet a threshold, the artificial intelligence system 260 may generate a prompt asking the user for a clarification. Based on the clarification, a mapping that results in a higher confidence score may be performed.
[0041] FIG. 3 depicts an additional example of computing components related to automated join generation. In particular, FIG. 3 depicts an example machine learning model 300 that is configured to implement embodiments of the present disclosure.
[0042] The machine learning model 300 includes one or more encoder layers 310. The encoder layers 310 may be trained and / or otherwise configured to generate embedding representations of inputs provided to the machine learning model 300. For example, the encoder layers 310 may generate an embedding representation of a user prompt 305. As described above with respect to FIG. 2, the user prompt 305 may comprise a request or command from a user (e.g., a command to perform an action, such as displaying a sorted list of data items). Based on the embedding representation generated by the encoder layers 310, the user prompt 305 may be mapped to the knowledge graph and joins may be created. Also, embedding representations of the knowledge graph and / or the table items 307 may be generated by the encoder layers 310.
[0043] The process of mapping the user prompt 305 to the knowledge graph may be based on a semantic similarity comparison involving the embedding representation of the user prompt 305 and the embedding representation of the table items 307. A semantic comparison layer 340 of the machine learning model 300 may be configured to generate an indication of semantic similarity between two entities (e.g., based on using semantic similarity algorithms such as cosine similarity, Jaccard similarity, Euclidean distance, Levenshtein distance, edit distance, and / or the like). The indication of semantic similarity may then be provided as part of an input to the decision tree 350 of the machine learning model 300. Textual similarity data 315 and usage data 317 may also be provided as part of the input to the decision tree 350. As discussed in further detail above with respect to FIG. 2, the decision tree 350 may then generate confidence scores for a potential join based on the input.
[0044] The confidence scores may be provided to the decoder layers 320 of the machine learning model 300. The decoder layers 320, which may also be referred to as hidden layers) may process the confidence scores and / or an output generated by the encoder layers 310. For example, based on the confidence scores and the embedding representations, the decoder layers 320 may generate a hidden state output that is converted into a knowledge graph, an updated knowledge graph, and / or a generated join 355. The decoder layers 320 may also be used to generate a hidden state output that is converted into a follow-up prompt 335 by the softmax layer 330. For example, in response to a low confidence score, a portion of the decoder layers 320 that is used to generate follow-up prompts may be activated.
[0045] The hidden state output generated by the decoder layers 320 may be converted into tokens by a softmax layer 330. The softmax layer 330 may be used to generate tokens (e.g., words and characters) based on a softmax function. For example, the softmax function may be used to convert probability values generated by the decoder layers 130 into tokens. The tokens generated by the softmax layer 330 may form a knowledge graph, an updated knowledge graph (with confidence scores adjusted upward downward based on confirmation / non-confirmation by a user), a follow-up prompt 335, and / or a generated join 355.
[0046] The machine learning model 300 may be implemented using hardware and / or software. Each of the layers of the machine learning model 300 (e.g., encoder layers 310, decoder layers 320, semantic comparison layer 340, decision tree 350, and / or softmax layer 330) may comprise one or more neurons arranged in one or more neuron arrays. In an example embodiment, a neuron may comprise a register, a microprocessor, and at least one input. Each neuron produces an output, or activation, based on an activation function that uses the outputs of the previous layer and a set of weights as inputs. Each neuron in a neuron array may be connected to another neuron via a synaptic circuit. A synaptic circuit may include a memory for storing a synaptic weight. An example machine learning model may be a neural network having an input layer, an output layer, and a plurality of fully connected hidden layers (e.g., decoder layers 320). In some embodiments, a machine learning model may be implemented by an application-specific integrated circuit (ASIC). ASICs may be specially customized for a specific artificial intelligence application and provide superior computing capabilities and reduced electricity consumption compared to traditional CPUs.
[0047] FIG. 4A and FIG. 4B depict example tables for which joins may be generated according to embodiments disclosed herein. The table shown in FIG. 4A contains email addresses and phone numbers for users associated with user identifiers. The table shown in FIG. 4B contains email addresses for members and membership types for members. Both tables represent data associated with users of a software platform despite the table of FIG. 4B using different terminology (“member” instead of “user”).
[0048] A user of an automated join generation system may submit a prompt that contains the request: “show me a list of all user email addresses.” The automated join generation system may complete this task by mapping the user prompt to semantic nodes of a knowledge graph (e.g., as described in further detail above with respect to FIG. 2 and FIG. 3). For example, “show me a list” may be mapped to a “select” node that corresponds to the select SQL operation. “User email addresses” may be mapped to the “email address” column of the “user information” table shown in FIG. 4A. The “email address” column of the “user information” table shown in FIG. 4A and the “email address” column of the “member information” table shown in FIG. 4B may be connected by an edge that includes a confidence score. The confidence score may exceed a threshold, and a join between the “email address” column of the “user information” table shown in FIG. 4A and the “email address” column of the “member information” table shown in FIG. 4B may be automatically created. As a result, the user of the automated join generation system may be presented with a list of email addresses that includes “alice@a.com,”“bob@b.com,”“charlie@c.com,” and “dave@d.com.”Example Operations Related to Automated Join Generation
[0049] FIG. 5 depicts example operations 500 related to automated join generation. For example, operations 500 may be performed by one or more of the components described with respect to FIG. 1, FIG. 2, and FIG. 3.
[0050] Operations 500 begin at step 502 with parsing a plurality of tables to extract a plurality of table elements, wherein the plurality of table elements include rows or columns within a table of the plurality of tables.
[0051] Operations 500 continue at step 504 with determining a level of semantic similarity between a first table element from a first table and a second table element from a second table based on an embedding representation of the first table element and an embedding representation of the second table element.
[0052] Operations 500 continue at step 506 with determining a level of textual similarity between the first table element and the second table element.
[0053] Operations 500 continue at step 508 with generating confidence scores for structured query language joins based on providing an input to a decision tree, the input comprising: the determined level of semantic similarity; the determined level of textual similarity; and occurrence frequency data associated with the structured query language joins.
[0054] Operations 500 continue at step 510 with selecting a given structured query language join of the structured query language joins based on the generated confidence scores. According to some embodiments, the selecting is further based on a knowledge graph, wherein the knowledge graph comprises: nodes that represent tables or table entities; and edges that comprise the generated confidence scores.
[0055] Certain embodiments provide that Operations 500 further include mapping a token of a user prompt to a given node of the knowledge graph, wherein the selecting is further based on the mapping. Some embodiments provide that the nodes of the knowledge graph further comprise a particular set of nodes that represent actions, synonyms, concepts, or modifiers. In certain embodiments, the user prompt comprises instructions to perform an action with respect to a specified table element; the mapping comprises selecting a given node of the particular set of nodes that represents the action based on a semantic similarity comparison involving an embedding representation of the user prompt and an embedding representation of the given node; and the action is performed based on selecting the given structured query language join, wherein the given structured query language join comprises a join between the specified table element and a corresponding table element that has a given confidence score with respect to the specified table element that exceeds a threshold. According to certain embodiments, the mapping is based on a semantic similarity comparison involving an embedding representation of the user prompt and an embedding representation of the given node. Some embodiments provide that the mapping further comprises: generating a follow-up prompt based on a mapping confidence score associated with the semantic similarity comparison; presenting the follow-up prompt to a user via a user interface; and receiving from the user, based on the presenting, confirmation of the given structured query language join.
[0056] FIG. 6 depicts example operations 600 related to automated join generation. For example, operations 600 may be performed by one or more of the components described with respect to FIG. 1, FIG. 2, and FIG. 3.
[0057] Operations 600 begin at step 602 with parsing a plurality of tables to extract a plurality of table elements, wherein the plurality of table elements include rows or columns within a table of the plurality of tables.
[0058] Operations 600 continue at step 604 with generating confidence scores for structured query language joins based on providing an input to a decision tree, the input comprising data associated with the plurality of table elements. In some embodiments, the input comprises a level of semantic similarity between a first table element from a first table and a second table element from a second table based on an embedding representation of the first table element and an embedding representation of the second table element. Certain embodiments provide that the input comprises occurrence frequency data associated with the structured query language joins. According to some embodiments, the decision tree is trained based on training data that comprises training inputs associated with labels indicating whether the training inputs were confirmed by users.
[0059] Operations 600 continue at step 606 with generating a knowledge graph based on the generated confidence scores, wherein: nodes of the knowledge graph comprise a given set of nodes that represent tables or table entities; and edges of the knowledge graph comprise the generated confidence scores. Certain embodiments provide that the nodes of the knowledge graph further comprise a particular set of nodes that represent actions, synonyms, concepts, or modifiers.
[0060] Operations 600 continue at step 608 with mapping a token of a user prompt to a particular node of the knowledge graph. According to some embodiments, the user prompt comprises instructions to perform an action with respect to a specified table element; the mapping comprises selecting a given node of the particular set of nodes that represents the action based on a semantic similarity comparison involving an embedding representation of the user prompt and an embedding representation of the given node; and the action is performed based on selecting the given structured query language join, wherein the given structured query language join comprises a join between the specified table element and a corresponding table element that has a given confidence score with respect to the specified table element that exceeds a threshold. Certain embodiments provide that the mapping is based on a semantic similarity comparison involving an embedding representation of the user prompt and an embedding representation of the particular node. In certain embodiments, the mapping further comprises: generating a follow-up prompt based on a mapping confidence score associated with the semantic similarity comparison; presenting the follow-up prompt to a user via a user interface; and receiving from the user, based on the presenting, confirmation of the given structured query language join.
[0061] Operations 600 continue at step 610 with selecting a given structured query language join of the structured query language joins based on the mapping and the knowledge graph.Example of a Processing System for Automated Join Generation
[0062] FIG. 7 illustrates an example system 700 with which embodiments of the present disclosure may be implemented. For example, system 700 may be configured to perform operations 400 of FIG. 4 and / or to implement one or more components as in FIG. 1, FIG. 2, and / or FIG. 3.
[0063] System 700 includes a central processing unit (CPU) 702, one or more I / O device interfaces that may allow for the connection of various I / O devices 704 (e.g., keyboards, displays, mouse devices, pen input, etc.) to the system 700, network interface 706, a memory 708, and an interconnect 712. It is contemplated that one or more components of system 700 may be located remotely and accessed via a network 710. It is further contemplated that one or more components of system 700 may comprise physical components or virtualized components.
[0064] CPU 702 may retrieve and execute programming instructions stored in the memory 708. Similarly, the CPU 702 may retrieve and store application data residing in the memory 708. The interconnect 712 transmits programming instructions and application data, among the CPU 702, I / O device interface 704, network interface 706, and memory 708. CPU 702 is included to be representative of a single CPU, multiple CPUs, a single CPU having multiple processing cores, and other arrangements.
[0065] Additionally, the memory 708 is included to be representative of a random access memory or the like. In some embodiments, memory 708 may comprise a disk drive, solid state drive, or a collection of storage devices distributed across multiple storage systems. Although shown as a single unit, the memory 708 may be a combination of fixed and / or removable storage devices, such as fixed disc drives, removable memory cards or optical storage, network attached storage (NAS), or a storage area-network (SAN).
[0066] As shown, memory 708 includes join generation component 714, which may be representative of join generation component 100 of FIG. 1 and FIG. 2. Memory 708 further comprises tables 722, which may correspond to tables stored in database 120 of FIG. 1 and / or FIG. 2 as well as the tables represented in FIG. 4A and FIG. 4B. Memory further comprises usage data 724, which may correspond to usage data 317 of FIG. 3. Memory 708 further comprises model outputs 726, which may correspond to outputs of any machine learning model described herein. Memory 708 further comprises knowledge graph 728, which may correspond to any knowledge graph described herein.
[0067] It is noted that in some embodiments, system 700 may interact with one or more external components, such as via network 710, in order to retrieve data and / or perform operations.ADDITIONAL CONSIDERATIONS
[0068] The preceding description provides examples, and is not limiting of the scope, applicability, or embodiments set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. For instance, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Also, features described with respect to some examples may be combined in some other examples. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects set forth herein. In addition, the scope of the disclosure is intended to cover such an apparatus or method that is practiced using other structure, functionality, or structure and functionality in addition to, or other than, the various aspects of the disclosure set forth herein. It should be understood that any aspect of the disclosure disclosed herein may be embodied by one or more elements of a claim.
[0069] The preceding description is provided to enable any person skilled in the art to practice the various embodiments described herein. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments. For example, changes may be made in the function and arrangement of elements discussed without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. Also, features described with respect to some examples may be combined in some other examples. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects set forth herein. In addition, the scope of the disclosure is intended to cover such an apparatus or method that is practiced using other structure, functionality, or structure and functionality in addition to, or other than, the various aspects of the disclosure set forth herein. It should be understood that any aspect of the disclosure disclosed herein may be embodied by one or more elements of a claim.
[0070] As used herein, a phrase referring to “at least one of” a list of items refers to any combination of those items, including single members. As an example, “at least one of: a, b, or c” is intended to cover a, b, c, a-b, a-c, b-c, and a-b-c, as well as any combination with multiples of the same element (e.g., a-a, a-a-a, a-a-b, a-a-c, a-b-b, a-c-c, b-b, b-b-b, b-b-c, c-c, and c-c-c or any other ordering of a, b, and c).
[0071] As used herein, the term “determining” encompasses a wide variety of actions. For example, “determining” may include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database or another data structure), ascertaining and other operations. Also, “determining” may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory) and other operations. Also, “determining” may include resolving, selecting, choosing, establishing and other operations.
[0072] The methods disclosed herein comprise one or more steps or actions for achieving the methods. The method steps and / or actions may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of specific steps and / or actions may be modified without departing from the scope of the claims. Further, the various operations of methods described above may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and / or software component(s) and / or module(s), including, but not limited to a circuit, an application specific integrated circuit (ASIC), or processor. Generally, where there are operations illustrated in figures, those operations may have corresponding counterpart means-plus-function components with similar numbering.
[0073] The various illustrative logical blocks, modules and circuits described in connection with the present disclosure may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any commercially available processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
[0074] A processing system may be implemented with a bus architecture. The bus may include any number of interconnecting buses and bridges depending on the specific application of the processing system and the overall design constraints. The bus may link together various circuits including a processor, machine-readable media, and input / output devices, among others. A user interface (e.g., keypad, display, mouse, joystick, etc.) may also be connected to the bus. The bus may also link various other circuits such as timing sources, peripherals, voltage regulators, power management circuits, and other types of circuits, which are well known in the art, and therefore, will not be described any further. The processor may be implemented with one or more general-purpose and / or special-purpose processors. Examples include microprocessors, microcontrollers, DSP processors, and other circuitry that can execute software. Those skilled in the art will recognize how best to implement the described functionality for the processing system depending on the particular application and the overall design constraints imposed on the overall system.
[0075] If implemented in software, the functions may be stored or transmitted over as one or more instructions or code on a computer-readable medium. Software shall be construed broadly to mean instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Computer-readable media include both computer storage media and communication media, such as any medium that facilitates transfer of a computer program from one place to another. The processor may be responsible for managing the bus and general processing, including the execution of software modules stored on the computer-readable storage media. A computer-readable storage medium may be coupled to a processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. By way of example, the computer-readable media may include a transmission line, a carrier wave modulated by data, and / or a computer readable storage medium with instructions stored thereon separate from the wireless node, all of which may be accessed by the processor through the bus interface. Alternatively, or in addition, the computer-readable media, or any portion thereof, may be integrated into the processor, such as the case may be with cache and / or general register files. Examples of machine-readable storage media may include, by way of example, RAM (Random Access Memory), flash memory, ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), registers, magnetic disks, optical disks, hard drives, or any other suitable storage medium, or any combination thereof. The machine-readable media may be embodied in a computer-program product.
[0076] A software module may comprise a single instruction, or many instructions, and may be distributed over several different code segments, among different programs, and across multiple storage media. The computer-readable media may comprise a number of software modules. The software modules include instructions that, when executed by an apparatus such as a processor, cause the processing system to perform various functions. The software modules may include a transmission module and a receiving module. Each software module may reside in a single storage device or be distributed across multiple storage devices. By way of example, a software module may be loaded into RAM from a hard drive when a triggering event occurs. During execution of the software module, the processor may load some of the instructions into cache to increase access speed. One or more cache lines may then be loaded into a general register file for execution by the processor. When referring to the functionality of a software module, it will be understood that such functionality is implemented by the processor when executing instructions from that software module.
[0077] The following claims are not intended to be limited to the embodiments shown herein, but are to be accorded the full scope consistent with the language of the claims. Within a claim, reference to an element in the singular is not intended to mean “one and only one” unless specifically so stated, but rather “one or more.” Unless specifically stated otherwise, the term “some” refers to one or more. No claim element is to be construed under the provisions of 35 U.S.C. § 112(f) unless the element is expressly recited using the phrase “means for” or, in the case of a method claim, the element is recited using the phrase “step for.” All structural and functional equivalents to the elements of the various aspects described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims.
Claims
1. A system, comprising:a remote database containing a plurality of tables;one or more processors communicatively coupled to the remote database, the one or more processors configured to implement an artificial intelligence system comprising a machine learning model, wherein the machine learning model comprises one or more encoder layers and a decision tree; anda memory comprising instructions that, when executed by the one or more processors, cause the system to:parse the plurality of tables to extract a plurality of table elements, wherein the plurality of table elements include rows or columns within a table of the plurality of tables;generate, via the one or more encoder layers, embedding representations of the plurality of table elements and an embedding representation of a user prompt;determine a level of semantic similarity between a first table element from a first table and a second table element from a second table based on the embedding representations;determine a level of textual similarity between the first table element and the second table element;generate confidence scores for structured query language joins based on providing an input to the decision tree, the input comprising:the determined level of semantic similarity;the determined level of textual similarity; andoccurrence frequency data associated with the structured query language joins;generate a knowledge graph based on the generated confidence scores, wherein nodes of the knowledge graph comprise the embedding representations of the plurality of table elements and edges of the knowledge graph comprise the generated confidence scores; anduse the knowledge graph to select a given structured query language join of the structured query language joins based on mapping the user prompt to the knowledge graph, wherein the mapping of the user prompt to the knowledge graph comprises performing semantic similarity comparisons involving the embedding representation of a user prompt and nodes of the knowledge graph.
2. The system of claim 1, wherein the mapping further comprises:generating a follow-up prompt based on a mapping confidence score associated with the semantic similarity comparison;presenting the follow-up prompt to a user via a user interface; andreceiving, from the user based on the presenting, confirmation of the given structured query language join.
3. A method, comprising:parsing a plurality of tables to extract a plurality of table elements, wherein the plurality of table elements include rows or columns within a table of the plurality of tables;determining a level of semantic similarity between a first table element from a first table and a second table element from a second table based on an embedding representation of the first table element and an embedding representation of the second table element;determining a level of textual similarity between the first table element and the second table element;generating confidence scores for structured query language joins based on providing an input to a decision tree, the input comprising:the determined level of semantic similarity;the determined level of textual similarity; andoccurrence frequency data associated with the structured query language joins;generating a knowledge graph that represents a set of potential structured query language joins, wherein the knowledge graph comprises:a particular set of nodes that represent actions, synonyms, concepts, or modifiers; andfor each respective join of the set of potential structured query language joins:a respective pair of nodes, wherein a first node of the pair of nodes represents a first table element and a second node of the pair of nodes represents a second table element to be joined with the first table element; anda respective edge between the first node and the second node, wherein the respective edge comprises a respective confidence score of the generated confidence scores;generating an embedding representation of a user prompt, wherein the user prompt comprises instructions to perform an action with respect to a specified table element;mapping the user prompt to:a given node of the particular set of nodes based on a first semantic similarity comparison involving the embedding representation of the user prompt and an embedding representation of the given node, wherein the given node represents the action; anda given pair of nodes of the pairs of nodes based on a second semantic similarity comparison involving the embedding representation of the user prompt and an embedding representation of a node of the given pair of nodes; andselecting a given structured query language join of the structured query language joins based on:the mapping of the user prompt; anda given confidence score for the given pair of nodes exceeding a threshold.
4. The method of claim 3, wherein the mapping of the user prompt further comprises:generating a follow-up prompt based on a mapping confidence score associated with the first semantic similarity comparison or the second semantic similarity comparison;presenting the follow-up prompt to a user via a user interface; andreceiving from the user, based on the presenting, confirmation of the given structured query language join.
5. A method, comprising:generating an embedding representation of a user prompt, wherein the user prompt comprises instructions to perform an action with respect to a specified table element;mapping the user prompt to a knowledge graph, wherein:nodes of the knowledge graph comprise a given set of nodes that represent tables or table entities and a particular set of nodes that represent actions, synonyms, concepts, or modifiers;edges of the knowledge graph comprise confidence scores that are generated based on providing semantic similarity data with respect to table elements, textual similarity data with respect to table elements, and join occurrence frequency data with respect to table elements as input to a decision tree;the mapping of the user prompt to the knowledge graph comprises:a first semantic similarity comparison involving the embedding representation of the user prompt and an embedding representation of a particular node of the particular set of nodes, wherein the particular node represents the action; anda second semantic similarity comparison involving the embedding representation of the user prompt and an embedding representation of a given node of the given set of nodes, wherein the given node represents a first table element, a second table element to be joined to the first table element is represented by a second node, and the given node and the second node are connected by an edge that comprises a given confidence score of the confidence scores that was generated with respect to the first table element and the second table element; andselecting a given structured query language join of the structured query language joins based on;the mapping of the user prompt; andthe given confidence score exceeding a threshold.
6. The method of claim 5, wherein the mapping further comprises:generating a follow-up prompt based on a mapping confidence score associated with the semantic similarity comparison;presenting the follow-up prompt to a user via a user interface; andreceiving from the user, based on the presenting, confirmation of the given structured query language join.
7. The method of claim 5, wherein the decision tree is trained based on training data that comprises training inputs associated with labels indicating whether the training inputs were confirmed by users.
Citation Information
Patent Citations
Recommending join operations of relational data among tables based on optimization model
US12093263B1
Generating structured query language using machine learning
US12511282B1
Automated creation of join graphs for unrelated data sets among relational databases
US20170193045A1
Inferring joins for data sets
US20210149896A1
Identifying Joins Of Tables Of A Database
US20230112250A1
