Context control of machine learning-based input queries
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- リゾルブ エーアイ ピーエルシー
- Filing Date
- 2024-07-18
- Publication Date
- 2026-07-30
Smart Images

Figure 2026525398000001_ABST
Abstract
Description
Technical Field
[0004]
[0001] Cross - reference to Related Applications This application claims the benefit of priority under 35 U.S.C. § 119 of the United States Patent Law to U.S. Provisional Patent Application No. 63 / 515,164, filed on July 24, 2023, and this application is hereby incorporated by reference in its entirety for all purposes.
[0002] Technical Field This disclosure generally relates to machine learning (ML) based on the context of an input query, including (but not limited to) controlling the context of an input query via a machine learning (ML) model.
Background Art
[0003] Users can provide queries for information on a particular field or topic while searching for information online. A computing device can receive a user's query and provide a response that can be sent to the user.
Summary of the Invention
Problems to be Solved by the Invention
[0004] Summary The technical solution in this disclosure concerns the generation of machine learning (ML)-based query responses using validation and context control parameters. When an ML model is used to generate responses to queries from a client device, the ML model may output false positive (misjudgment) decisions, and hallucination of the ML model may occur. Such decisions can lead to increased consumption of computational and energy resources, including additional round-trip communication between the client and the ML-based system, and a decrease in the overall effectiveness and energy efficiency of the system. The technical solution overcomes these and other challenges by validating decisions from the neural network using validation and context control parameters during the ML process. [Means for solving the problem]
[0005] In one embodiment, the solution relates to a system. The system may include a data processing system including one or more processors combined with memory to receive a query containing multiple elements and generate multiple tokens. Each of the multiple tokens may correspond to any element of the multiple elements of the query. One or more processors may generate a data structure via one or more machine learning (ML) models having multiple graph neural networks (GNNs) and multiple transformers, and may identify the relationship between a first node of multiple nodes in the data structure corresponding to a first token of the multiple tokens and a second node of multiple nodes corresponding to a second token of the multiple tokens. One or more processors may validate the relationship between the first and second nodes based on validation parameters of the data structure via one or more ML models and based on the data structure. One or more processors may provide a response to the query via any of these ML models. The model among the one or more ML models may be trained using multiple descriptions of multiple products. One or more processors may send a response to a client device in response to a query.
[0006] In one embodiment, the present solution relates to a method. The method may include a data processing system comprising one or more processors combined with memory to receive queries containing multiple elements. The method may include the data processing system generating a plurality of tokens, each of which may correspond to any of the plurality of elements of the query. The method may include the data processing system generating a data structure that identifies relationships between a first node of a plurality of nodes in a data structure corresponding to a first token of a plurality of tokens and a second node of a plurality of nodes corresponding to a second token of a plurality of tokens, via one or more first machine learning (ML) models having a plurality of graph neural networks (GNNs) and a plurality of transformers. The method may include the data processing system verifying the relationships between the first and second nodes based on validation parameters of the data structure. The method may provide a response to a query via any of the one or more ML models and based on the data structure, which may be trained using a plurality of descriptions of a plurality of products. The method may include the data processing system sending a response to a client device in response to a query.
[0007] In one embodiment, the solution relates to a non-transient computer-readable medium which, when executed by one or more processors, causes one or more processors to receive a query containing multiple elements. When executed by one or more processors, the instruction causes one or more processors to generate multiple tokens. Each of the multiple tokens can correspond to any element of the multiple elements of the query. When executed by one or more processors, the instruction causes one or more processors to generate a data structure for identifying the relationship between a first node of multiple nodes of a data structure corresponding to a first token of the multiple tokens and a second node of multiple nodes corresponding to a second token of the multiple tokens, via one or more machine learning (ML) models having multiple graph neural networks (GNNs) and multiple transformers. When executed by one or more processors, the instruction causes one or more processors to validate the relationship between the first node and the second node based on validation parameters of the data structure, via one or more ML models. When an instruction is executed by one or more processors, it can cause one or more processors to provide a response to a query, via any model from one or more ML models and based on data structures. The model may be trained using multiple descriptions of multiple products. When an instruction is executed by one or more processors, it can cause one or more processors to send a response to a client device in response to a query.
[0008] Aspects of this disclosure are described in the following detailed description with reference to the noted drawings, by non-limiting examples of exemplary embodiments of this disclosure. [Brief explanation of the drawing]
[0009] [Figure 1]Figure 1 is an illustrative block diagram of a system according to an embodiment of this solution that uses an ML model to improve the query context before inputting it into a domain-specific, trained ML model that provides a response.
[0010] [Figure 2] Figure 2 shows an exemplary architecture of a computing system implemented in an embodiment of this disclosure.
[0011] [Figure 3] Figure 3 shows an exemplary block diagram of the structure of the query context model according to this embodiment of the solution.
[0012] [Figure 4] Figure 4 is an example of a process flow for using an ML model to validate and refine the prompt context before inputting it into a domain-specific, trained ML model that provides a response, according to an aspect of this disclosure. [Modes for carrying out the invention]
[0013] Detailed explanation The technical solution of this disclosure applies validation parameters or context parameters to a transformer-based graph neural network (GNN) model to improve the accuracy of ML-generated output responses to client device queries. This solution facilitates the use of a wide range of ML models trained on datasets targeting various specific domains (e.g., e-commerce, healthcare, law, science, or technology) and can provide ML-generated responses to domain-specific client device queries. This solution can use ML models, including multi-layer transformer and GNN model structures, which use validation and context parameters to ensure that the ML-generated response remains within the context of the user's query, thereby resulting in a context-aligned response to the user's query.
[0014] When providing an ML-based search system, it can be difficult for users to accurately determine the intended information they are seeking, as well as to maintain the ML-generated responses within the intended context. Since queries can target different products or information and be expressed using various phrases or terms, responses from the ML model can vary based on the user's choice of words in the query. Relying solely on keyword matching may fail to accurately capture the meaning and context of the user's query. ML-generated responses to client queries may include misdetermined information such as hallucination or drift, which can be inaccurate or irrelevant, potentially hindering the user experience and negatively impacting the system's computational resources and energy efficiency.
[0015] The technical solution of this disclosure can overcome these challenges by utilizing validation parameters or context parameters to maintain the performance of a transformer-based multilayer GNN within the intended context during ML execution. By utilizing the multilayer structure of the GNN and transformers, the technical solution can determine the relationships between different query elements and provide context-constrained input to a domain-specific trained ML model, thereby obtaining a more accurate response. The solution can use an encoder to decompose a query into elements (e.g., words, phrases, or sentences) that can be assigned to individual tokens. Tokens can be used to provide contextual information for establishing or determining relationships between different elements of a query. The transformer-based multilayer GNN can enable the query context model to determine and maintain relationships between tokens of query elements and tokens of the rest of the query, or other related or similar elements (e.g., terms with similar meanings but not included in the query). In doing so, the query context model can generate a contextual data structure that improves or enhances the representation of the context or semantics of the query across multiple layers of tokenized relationships.
[0016] A query context model can generate a context data structure that forms a nested tree structure of tokens representing relationships between other tokens and further relationships between other tokens (e.g., corresponding to words and phrases not included in the query). Within this nested tree structure, relationships between tokens can be represented using values (such as weights), defining the relationships between each token in the query and creating a hierarchical network of interconnected elements. The query context model can navigate these relationships and effectively traverse various contextual paths within the user's query. By capturing and analyzing these contextual relationships, the system can provide highly accurate and contextually relevant responses to the user's query. By using validation parameters and context parameters, this technical solution can keep decisions from the ML model within a desired context, thereby reducing or eliminating misdecisions (e.g., hallucination or drift), improving the accuracy of the ML model, and saving computational and energy resources.
[0017] To train domain-specific ML models to provide responses to queries, diverse and comprehensive datasets of a particular domain of interest can be utilized. Training data can include a broad set of descriptors relevant to any domain, such as product catalogs, websites, and specifications for sales in the context of an ML model for e-commerce. In the context of implementing an e-commerce model, the dataset could include simulated or recorded conversations that a customer might have with a sales assistant during pre- and post-sale interactions, product specifications, and catalogs. This solution can also include training data from experts who can evaluate and oversee the data, further improving the dataset.
[0018] In one example, upon receiving a user query, the encoder can begin processing by breaking down the query into elements and generating corresponding individual tokens. The query context model can create and maintain relationships between identified tokens that can be supplied to the query context model to enhance the query's context. The resulting context data structure can provide a network of interconnected and interrelated weighted tokens that can be used as input to a domain-specific, trained ML model to generate responses. While generating responses, the transformer-based GNN model can utilize validation parameters or context parameters to verify that decisions are within those parameters, thereby allowing corrective actions to be taken if the output does not conform to these parameters, and consequently improving the accuracy of decisions. The decoder can utilize the context data structure to transform the responses provided by the ML model into more contextual and user-friendly responses. By leveraging the context provided by the GNN, the decoder can ensure that responses are delivered in a way that evokes user empathy and reflects the context and interrelationships provided by the query. In this way, the solution can provide a context-driven approach to domain-specific ML model-based search systems to provide improved responses to user queries.
[0019] This solution can provide a large language model (LLM) for e-commerce recognition, trained on sales, post-sales, and e-commerce-specific data, capable of handling efficient embedding of product data or catalogs for fast and efficient discovery using natural language queries. The solution may include a data processing system that uses a multidimensional nested GNN-based graph transformer combining encoder and decoder models to drive a domain-specific (e.g., e-commerce) inference engine, which can maintain transformer-based GNN decisions within the context of the relevant nodes and the e-commerce query context by using an ensemble model with validation or context parameters.
[0020] Figure 1 is an exemplary block diagram of a system 100 for machine learning (ML)-based query response generation using validation and context control parameters. System 100 may be intended to use an ML model to improve the context of a query before inputting it into a domain-specific ML model that provides the response. The exemplary system 100 may include a data processing system (DPS) 102 that can communicate with a client device 106 via a network 104 with one or more queries 108 having elements 110 and responses 116 in response to the queries 108. The DPS 102 may include one or more queries 108 having elements 110 together with one or more model trainers, an NLP model 114, responses 116, a similarity function, and a tokenization function 120 that generates tokens 122. The DPS 102 may include one or more encoders 124, a decoder 126, a training dataset 130 in a repository 132, and one or more query context models (QCMs) 140. Each QCM140 may include, or utilize, one or more graph neural networks (GNNs), transformers, nodes 146, node features 148, and context data structures (CDS) 150. Each context data structure may include one or more validation parameters 152 and context parameters 154 for validating the decisions of the QCM140.
[0021] System 100 can include any combination of hardware and software for providing a response to a query of a client device using one or more ML models according to the context of the query. System 100 can include a system for providing a response generated by an ML model to a user query using an ML model trained in a field-specific manner and a transformer-based graph neural network (GNN) controlled by verification parameters. System 100 can include a data processing system 102, which can include or execute on any computing device (e.g., a server, a cloud-based service, or any other computing device or system). System 100 can include or execute using a computing system 200 (e.g., described in FIG. 2), which can store any commands, instructions, and / or data for executing or implementing the functionality of the data processing system 102 or its components (components). The data processing system 102 can be executed by one or more processors (e.g., 210) that can be combined with one or more memories (e.g., 215).
[0022] Query 108 can include any content such as text, media, or image content, which can elicit or request a response from the data processing system 102. Query 108 can include any text or text-based input from the client device 106 that seeks specific information, a response to a question, or content within or corresponding to a given context, dataset, or area (e.g., fields such as e-commerce, law, medicine, engineering, or technology). Query 108 can be generated by a user on the client device 106 using an application (e.g., a web browser and a graphical user interface) where the user can input any string of the query.
[0023] Query 108 can include natural language elements 110 such as sentences, phrases, words, parts of words, or other portions of text. Element 110 can include, be associated with, or be related to a particular meaning or context. Element 110 can be tokenized and processed by the tokenization function 120 of the data processing system 102. When tokenized, element 110 can have a corresponding token 122, which can include a numerical representation of element 110.
[0024] The tokenization function 120 can include any combination of hardware and software for decomposing query 108 into elements 110 and creating tokens 122 for each element 110 (e.g., each syllable, word, or sentence). The tokenization function 120 can assign a numerical representation (e.g., a token identifier) for each individual token 122 (e.g., corresponding to an individual element 110). The tokenization function 120 can use the numerical representation of the tokens to facilitate efficient information retrieval (acquisition) and understanding by the data processing system 102. When tokenized, the tokenization function 120 can generate an embedding corresponding to token 122. The embedding can represent one or more tokens 122 using a vector representation (e.g., in a vector space). The embedding can represent a single token or a sequence of tokens (e.g., a contextual embedding of the tokens of query 108). The tokenization function 120 can employ or cooperate with a QCM 140 (e.g., a multi-layer arrayed GNN 142 and a transformer 144) to analyze the contextual relationships and dependencies between these tokens 122, thereby, for example, analyzing the contextual relationships between the nodes 146 of QCM 140 corresponding to tokens 122 to comprehensively understand the context of query 108.
[0025] The natural language processing (NLP) model 114 may include any ML model trained using multiple descriptions, texts, or corpora belonging to a particular domain. The NLP model 114 may include any ML model (e.g., a computational framework) based on deep learning techniques. The NLP model 114 may be trained to process and understand human language and, by leveraging patterns, semantics, and context within text data, can enable or perform tasks such as text classification, sentiment analysis, language translation, and question answering (e.g., providing a response 116 to a query 108).
[0026] The NLP model 114 can be trained on a large training dataset 130 of descriptions or texts corresponding to any specific field. For example, the NLP model 114 can be trained on e-commerce using various e-commerce-related text data such as product descriptions, salesperson-customer interactions, frequently asked questions (FAQs), or any other data relating to responses to user questions in an e-commerce environment, such as queries 108 for purchasing different goods or services. For example, the NLP model 114 can be trained on any specific field such as medicine, law, engineering, technical support, history, geography, translation between different languages, or any other field that a user might search for in query 108.
[0027] The NLP model 114 can be trained by a model trainer 112 to provide responses 116 on a specific domain. The model trainer may include any combination of hardware and software for training the NLP model 114 using a specific training dataset 130. The model trainer 112 can guide the learning process of the NLP model 114 by optimizing parameters and weights based on the domain-specific dataset.
[0028] The training dataset 130 can include input samples such as user queries 108 or sentences from a text corpus, seller-customer interactions, or other data, along with corresponding target responses or labels, forming a supervised learning setup. During training, the model trainer 112 repeatedly feeds batches of input data to the NLP model 114, which can then predict responses 116. The model trainer 112 can compare these predictions to ground truth responses from the training dataset 130 and provide the model's prediction error. Through backpropagation, the model trainer 112 can update the parameters of the NLP model to minimize errors and improve the NLP model's ability to produce accurate responses 116. This process continues over multiple epochs until the NLP model 114 achieves a satisfactory level of performance on the domain-specific dataset 130, resulting in a well-trained NLP ML model.
[0029] The tokenization function 120 may include any combination of hardware and software for splitting the query 108 into elements 110 and assigning tokens 122 to the elements 110. Tokens 122 may include one or more elements of the query 108, or a portion of the elements 110 of the query 108. Each token or sequence of tokens 122 can be represented as a vector, such as one or more values or embeddings.
[0030] Encoder 124 may include any combination of hardware and software to translate query 108 and its elements into a meaningful representation (e.g., context data structure 150) that can be input to QCM 140 to generate response 116. Encoder 124 may include components of an ML model that are responsible for translating input data (e.g., elements 110 of query 108) into a meaningful, compact representation (e.g., context data structure 150). Encoder 124 may process text input and use tokenization functionality 120 to tokenize the input into smaller units (e.g., words or subwords), and map each token 122 to a corresponding one or more values, embeddings, or feature vectors. Encoder 124 may use context data structure 150 to translate the user's word selections from query 108 into an input that includes improved contextual and semantic information within the input data, enabling the NLP model 114 to understand the relationships between different tokens 122.
[0031] Similar to encoder 124, decoder 126 may include any combination of hardware and software for translating response 116 into a desired or expected representation to be provided to client device 106. Decoder 126 may include the ability to translate response 116 into an output sequence to be provided to client device 106. For example, decoder 126 may take in the context data structure 150 generated by QCM 140 and / or encoder 124 and use it to generate a consistent and contextually appropriate response 116 to be provided to client device 106. Decoder 126 can be used to provide language translation, text generation, and summarization of the response to be sent to client device 106. Decoder 126 may leverage the knowledge learned from encoder 124 to generate an accurate and consistent set of words for response 116.
[0032] The query context model (QCM) 140 may include any combination of hardware and software to provide machine learning-based validation, improvement, or enhancement of the context of the query 108 before inputting it into the NLP model 114 that provides the response 116. The QCM 140 may include a nested tree structure of nodes 146 that can be used to represent hierarchical relationships between elements 110, tokens 122, or embeddings of tokens 122 (e.g., those identified in node features 148) of the query 108. The nested tree structure of the QCM 140 may include an array of GNN 142 and transformer 144, thereby facilitating the integration of both sequential and graph-based dependencies of nodes 146. The QCM 140 may include the ability or capability to utilize validation parameters 152 or context parameters 154 to validate decisions or outputs from an ML model (e.g., QCM 140, transformer, GNN 142, or NLP model 114). Validating such an ML model may include using validation parameters 152 or context parameters 154 to keep the output or decision of the ML model within a predetermined context. QCM140 can combine transformers 144 and GNN142 to create context-rich representations (e.g., node features 148) between different nodes 146 that correspond to various elements 110 of the query 108 and similar elements 110 (e.g., words, phrases) that are not included in the query 108 but have related or similar meanings (e.g., determined based on the similarity feature 118).
[0033] A graph neural network (GNN) 142 can include any deep learning architecture designed to process and model data with complex graph structures. GNN 142 can operate on graph-structured data where elements 110 of a query 108 can be represented as nodes 146. GNN 142 can include the ability to learn or develop relationships in node features 148, providing a representation of contextual information and dependencies between nodes 146 in the graph. In each layer of the GNN, a node 146 can aggregate information from neighboring nodes 146 in GNN 142 and update its own representation based on this aggregated information from neighboring nodes 146. Through this iterative process of updating nodes 146 and node features 148, the GNN can propagate information throughout the graph and capture global dependencies and contextual relationships identified in node features 148 (e.g., in each layer of node 146).
[0034] Nodes 146 within the query context model (QCM) 140 may contain units, components, or numeric constructs representing elements 110 of a query 108 in a nested tree structure. Nodes 146 can form building blocks of a graph and function as distinct points representing unique tokens 122 of elements 110 of the input query 108. For example, the query 108 "Which mobile phone is best for gaming?" may contain nodes 146 representing individual words or phrases (e.g., elements 110) such as "mobile phone" and "gaming". Each node 146 can express or indicate the identity of a given element 110 and function to establish relationships with other nodes 146 in the graph, which can be used by the ML model to implement hierarchical and sequential dependencies of the query 108.
[0035] Node features 148 can include any features, attributes, or characteristics associated with each node 146. Node features 148 can provide contextual information for processing node 146 by the GNN and transformer 144 within QCM 140. Node features 148 can include, or represent, vectors or tensors that encode or numerically represent various aspects of node 146. Node features 148 can include, or represent, word embeddings, positional encodings, semantic meanings, and contextual relevances. For example, in the query 108 "Which mobile phone is best for gaming?", node 146 representing "mobile phone" may include node features 148 such as semantic embeddings obtained from a pre-trained language model, position in the query, and relevant contextual cues related to other nodes such as "gaming". By associating node 146 with node feature 148, the QCM 140 or response function 160 can create a context-rich representation that enhances the understanding and processing of the complex query 108, resulting in a more accurate and relevant response.
[0036] The transformer 144 may include architectures for natural language processing tasks, characterized by its attention mechanism and parallel processing capabilities. For example, the transformer 144 can process input data in parallel (as opposed to processing data sequentially, for example), making the transformer 144 more efficient in terms of processing and better suited to long-range dependencies. The transformer 144 may include a self-attention mechanism that allows the transformer 144 to capture contextual relationships between words in the query 108 by assigning different weights to each element 110 based on its importance to other words in the same sequence (e.g., the same layer). Through self-attention, the transformer 144 can effectively learn complex language patterns and contexts, making it useful for tasks such as machine translation, sentiment analysis, and text generation.
[0037] After processing the elements 110 of query 108, the tokens 122 of element 110 (e.g., or their embeddings) can be processed through a layer of transformer 144 that can generate contextual relationships between element 110 of query 108 and other elements 110 (e.g., words or phrases) that are not included in query 108 but can be related to it through meaning or context. A graph structure can be constructed in which nodes 146 represent the tokens 122 of element 110. Relationships between tokens 122 can be represented as node features 148, allowing for the incorporation of graph-based information. An information aggregation process such as a GNN can aggregate data from neighboring nodes 146 from its structure, enabling the QCM model 140 to capture contextual information and global relationships between nodes 146. The outputs from the layers of transformer 144 and GNN 142 can be combined to create a hierarchical contextual representation, resulting in a multi-layered nested tree structure.
[0038] QCM140 can use a similarity function 118 (e.g., Euclidean distance or cosine similarity function) to generate and apply weights to tokens 122 and determine relationships (e.g., similarity) between nodes 146. For example, depending on the similarity function 118, QCM140 can determine that some nodes 146 (e.g., corresponding to some tokens 122) are more similar to each other (e.g., more relevant) than other nodes 146. Such relationships between nodes 146 can be stored as node features 148 (e.g., in a repository 132 such as a hard disk). The relationships between nodes 146 may include indications of relationships (e.g., similarity or contextual relationships) between each node 146 corresponding to token 122 in query 108 and other tokens 122 (e.g., words or phrases) that are not found in query 108 but are available in the NLP model 114, in order to describe related retrieved features or topics (e.g., using phrases or descriptions of similar features or concepts from the training dataset 130).
[0039] QCM140 can generate a data structure 150 for identifying, determining, or relating to nodes 146. The context data structure 150 may include, for example, the context of query 108, a numerical representation of node 146, or node features 148. The context data structure 150 may include an embedding or vector representation of node 146 corresponding to token 122 of element 110 of query 108. The context data structure 150 may include any one or more of the following: any node features 148, node 146 (for example, the node of element 110), or validation parameters 152 or context parameters 154 for query 108.
[0040] The context data structure 150 may include a comprehensive framework or structure to facilitate the management and maintenance of contextual consistency of queries processed by the QCM 140. The context data structure 150 may include parameters such as validation parameters 152 or context parameters 154 that can facilitate the accurate interpretation and response generation of query 108. The context data structure 150 may include hierarchical relationships, validation routines, and contextual information used for handling the query accurately. For example, in an e-commerce scenario, the context data structure 150 may include elements such as product categories, user preferences, and relevant attributes, organized in a way that preserves the logical flow and meaning of the original query 108.
[0041] The validation parameter 152 may include any numerical representation for validating the decisions of an ML model (e.g., QCM140 or NLP114) corresponding to any node 146 or node feature 148. The validation parameter 152 may include a vector (e.g., an embedding) that indicates the context for a given node 146 or node feature 148, which can help QCM140 maintain contextual consistency for the outputs of each node 146. The validation parameter 152 can be used to maintain the accuracy and reliability of machine learning (ML) decisions. The validation parameter 152 may define criteria and thresholds for measuring the output of the system, such as checkpoints to ensure that the generated response conforms to a predefined context or actual correctness. The validation parameter 152 may include or represent factors such as price range, product availability, and user ratings, which can help maintain that these recommendations are relevant, viable, and accurate.
[0042] The context parameter 154 can contain any numerical representation of the context of query 108. The context parameter 154 can contain a set of nodes 146 of query 108 or a vector of sequences of nodes 146 (e.g., embeddings) that can represent the context of query 108 as a whole. The context parameter 154 may be used by QCM 140 to facilitate maintaining the contextual consistency of the output of node 146 within the meaning or context of query 108. The context parameter 154 can provide additional information and constraints that help preserve the original intent and context of query 108 throughout the processing stages. It ensures that the output of each node remains relevant and consistent within the overall context of query 108. The context parameter 154 may include, or may be derived from, an embedding (e.g., a vector representation) of the entire query 108 or a part of the query 108 (e.g., a sequence of elements 110), and may correspond to the query context, query history, session duration, and specific details about past interactions, thereby enabling QCM 140 to provide a contextually appropriate and personalized response.
[0043] The response function 160 may include any combination of hardware and software for generating a response 116 to a query 108. The response function 160 may include computer code, instructions, or data for utilizing the QCM 140 and NLP model 114 to generate the response 116. The response function 160 may utilize the QCM 140 to generate a context data structure 150 with arbitrary validation parameters 152 having numerical representations of individual nodes 146 or node features 148 and context parameters 154 representing the context of the query 108. The response function 160 may utilize the GNN 142 and transformer 144 for various nodes 146 and node features 148, maintaining the process output in accordance with the validation parameters 152 and context parameters 154, to generate the response 116.
[0044] The response function 160 may be implemented as part of a data processing system 102 comprising, or using, one or more processors 210 combined with memory 215. The memory 215 can store instructions and computer code that implement various functionalities of the data processing system 102 and its components, such as the response function 160.
[0045] When the data processing system 102 receives a query 108 containing multiple elements 110, the tokenization function 120 can generate multiple tokens 122. Each of the multiple tokens 122 may correspond to any element 110 (e.g., a syllable, word, phrase, or sentence) among the multiple elements 110 of the query 108. In response to the query 108, the response function 160 can generate or create one or more context data structures 150 via one or more QCMs 140 having multiple GNNs 142 and multiple transformers 144. One or more context data structures 150 may be configured to identify a relationship between a first node 146 of multiple nodes 146 of the context data structure 150 corresponding to a first token 122 among the multiple tokens 122 of the query 108, and a second node 146 of multiple nodes 146 corresponding to a second token 122 among the multiple tokens 122 of the same query 108. The relationship (or relation) between these two nodes 146 can be represented using one or more node features 148 (e.g., vector representation or embedding) that represent the similarity between the two nodes 146 (e.g., via the similarity feature 118).
[0046] The response function 160 can use the QCM 140 to verify the relationship between the first node and the second node (for example, via one or more QCMs 140) based on the validation parameter 152 of the context data structure 150. For example, the QCM 140 can check or compare the numerical representation of the representation (e.g., an embedding) with the numerical representation of the validation parameter 152 (e.g., an embedding) to check whether the representation and the validation parameter 152 are within a predetermined threshold range. The QCM 140 can verify whether the similarity between the first and second nodes 146 (e.g., the two embeddings) is within a predetermined threshold range with respect to their respective validation parameter 152 (for example, via the similarity function 118). For example, each node 146 may have its own validation parameter 152 that corresponds to the context of the element 110 to which that node corresponds, thereby allowing the QCM 140 to maintain that context for determining each node within the context range of that node 146 (for example, via the validation parameter 152 of a given node 146).
[0047] The response function 160 can provide a response 116 to a query 108 via an NLP model 114 (e.g., any model from one or more ML models) and based on a context data structure 150. For example, the response function 160 can use a context data structure 150 having its validation parameters 152 (e.g., for each of the nodes 146) and context parameters 154 (e.g., for query 108) to validate the output from the GNN 142 and the transformer 144, form a prompt in the NLP model 114, and generate a response 116. The QCM 140 can use a context data structure 150 (e.g., having validation parameters 152 and context parameters 154) to instruct an ML model (e.g., the GNN 142, the transformer 144, or the NLP model 114) to modify and regenerate such a decision or response if such a decision or response does not conform to, fall within the range of, or satisfy either of the validation parameters 152 or the context parameters 154. The ML model (e.g., NLP114) used to provide the response 116 to query 108 may be, or include, a model trained (e.g., via training dataset 130) using multiple descriptions of multiple products (e.g., to handle e-commerce query responses).
[0048] Once the response function 160 generates a response 116, it can transmit the response 116 to the client device 106. The response 116 may be transmitted to the client device 106 in response to the query 108 via the network 104 (e.g., any combination of a wireless local area network, a wired or optical network, a cellular network, or the Internet). The response function 160 can generate the response 116 and transmit the response to a transceiver circuit of a computing device (e.g., 200) providing a data processing system 102. The transceiver circuit may include a signal processing circuit and an antenna or communication interface for transmitting the response 116 to the client device 106.
[0049] For example, the response function 160 can verify the relationship between a first node and a second node using the QCM 140 or NLP model 114 (including, for example, transformers 144 and GNN 142). The relationship between the first node 146 and the second node 146 can be verified using or based on the context parameter 154. The context parameter 154 may correspond to information derived from multiple elements 110 of the query 108 (e.g., a sequence of elements 110 represented by a sequence of tokens 122). The context parameter 154 may include one or more embeddings (e.g., a vector representation of elements 110 of the query 108 or a sequence of tokens 122).
[0050] For example, to verify the relationship between a first node 146 and a second node 146, the transformer 144 can evaluate the sequential context between tokens 122 derived from query 108. The transformer 144 can use an attention mechanism to evaluate the importance and relevance of each token 122 in relation to other tokens 122 within a set of tokens 122 (e.g., corresponding to a set of elements 110 of query 108), and can verify or confirm that the generated relationship is contextually accurate (e.g., within a threshold of semantic similarity between their contexts). For example, in an e-commerce query 108 such as "What is the best smartphone for games under $500?", the transformer 144 can verify the relevance of "smartphone" in relation to "games" and "under $500" to verify that these tokens 122 have a correct understanding of the context before proceeding to generate response 116.
[0051] For example, GNN142 can validate relationships between first and second nodes 146 based on structural dependencies within the data. For instance, each node 146 representing an element 110 of query 108 may be associated with an edge that represents or indicates a relationship between nodes. GNN142 can validate this relationship (e.g., or any other relationship between nodes 146) by aggregating information from neighboring nodes 146 (e.g., with respect to a given node being processed), and can validate or confirm (e.g., guarantee) the contextual accuracy of this association. For example, in a product recommendation scenario, if the first node represents "14 years old" and the second node represents "game console," GNN142 can validate this relationship between these two nodes 146 by considering the context provided by additional nodes such as "birthday present" and "interest in games," and ensure that the recommendation is relevant to the user's context.
[0052] Validation also includes evaluating relationships using validation parameters 152. Validation parameters 152 can be derived from domain-specific knowledge or statistical thresholds established during the model's training phase (e.g., based on a training dataset 130 containing material on a particular product type or its use). For example, if validation parameter 152 is associated with a certain level of confidence for a relationship to be considered valid, QCM 140 can use one or more probabilistic measures to validate or confirm the relationship between "smartphone" and "under $500" (e.g., from query 108) to check whether it meets a desired confidence threshold before it is received. For example, context parameters 154 may include parameters to validate that the relationship adheres to constraints specific to the overall parameters of the request (e.g., being under $500) or to specific contexts such as for the purpose of "games," and user profiles or historical data can be used to maintain the completeness and accuracy of the response.
[0053] The response function 160 may determine (e.g., via one or more ML models such as QCM 140 or NLP model 114) that the relationship between the first node 146 and the second node 146 does not match the context parameter 154 corresponding to the information derived from multiple elements 110 of query 108 within a predetermined context parameter threshold. The context parameter threshold may include, for example, a predetermined threshold or range of values that indicate or correspond to a match with the context of query 108. The response function 160 may, using QCM 140 (e.g., GNN 142 or transformer 144) or NLP model 114, generate a modified context data structure 150 in response to such a determination, regenerate the relationship, the first node or the second node, and maintain the determination or output of the ML model within the context parameter threshold.
[0054] The response function 160 may use an ML model (e.g., QCM 140 or NLP model 114) to respond to a verification decision using a verification parameter 152 and determine that the relationship between the first node 146 and the second node 146 does not match the verification parameter 152 within a predetermined verification parameter threshold corresponding to at least one of the first token 122 or the first node 146, or the second token 122 or the second node 146. The verification parameter threshold may include, for example, a predetermined threshold or range of values that indicate or correspond to a match with the context of node 146, its token 122, or its corresponding element 110. The verification parameter threshold may include, for example, a predetermined threshold or range of values that indicate or correspond to a match with the context of node 146, its token 122, or its corresponding element 110 in relation to other nodes adjacent to node 146, their tokens 122, or their corresponding elements 110, and this adjacent node 146 precedes or follows the node being determined or evaluated. The response function 160 can instruct one or more ML models to generate a modified context data structure 150 and to regenerate or generate modified first and second nodes 146 or modified relationships between them in response to such decisions using the validation parameters 152.
[0055] The response function 160 can provide a first node feature 148 of the first layer of the QCM 140 that corresponds to the relationship between the first node and the second node. The first layer may include a first subset of multiple transformers 144 and a first GNN 142 to provide a first subset of multiple nodes 146 corresponding to multiple tokens 122. For example, the layer of the QCM 140 may include a GNN 142 that is communicably combined with multiple transformers 144 that process the node feature 148 and the adjacent nodes 146. The first node feature 148 may represent attributes or characteristics of the first node 146, such as its relationship to other nodes 146, semantic meaning, and context. The node feature 148 may include information such as word embeddings, positional encoding, attention score, or other relevant features that capture or indicate the role of the node in the context of the query 108. Node features 148 can be improved by the transformer 144 improving the context and relevance of the information shared among nodes 146, facilitating the generation of accurate and contextually appropriate responses 116.
[0056] The response function 160 can provide a second node feature 148 of the second layer via a second layer of QCM 140 which may have a second subset of multiple transformers 144 and a second GNN 142 to provide a second subset of multiple nodes 146. The second node feature 148 may include or perform the same or similar functions as the first node feature 148 and may correspond to a relationship between a third node 146 corresponding to a third token 122 (e.g., in a sequence of tokens 122 of element 110 of query 108) and a fourth node 146 corresponding to a fourth token 122. The third node 146 may be related to the first node 146, for example, by being adjacent to it (e.g., preceding or following the first node 146 in a sequence of nodes 146 of query 108). For example, at least one of the third node 146 or the fourth node 146 may correspond to an element 110 that is different from each of the multiple elements 110 of the query 108.
[0057] The response function 160 can use one or more ML models (e.g., QCM140 and its GNN142 or transformer 144) to assign weights to each of the multiple nodes 146 corresponding to the significance of one or more elements 110 of the query 108. The weights may include numerical representations of the level of relevance of a given node 146 (and its corresponding elements 110, etc.), such as the maximum-weighted element 110 that is most important or relevant to the context of the query 108, and the minimum-weighted element 110 that is least important or relevant. The response function 160 can use QCM140 to generate a context data structure 150 using the respective weights of each of the multiple nodes 146 via one or more ML models (e.g., QCM140 or NLP model 114).
[0058] Decoder 126 can decode response 116 using context data structure 150. Data processing system 102 can send the decoded response 116 to client device 106 via network 104. For example, decoder 126 can use context parameters 154 in data structure 150 to verify or confirm that response 116 aligns with a specific user's preferences regarding gaming laptops when responding to a query such as "What is the best laptop for gaming?". Decoder 126 can verify the relevance of response 116 (e.g., using context parameters 154) and verify its accuracy by considering verification parameters 152 for individual parts of response 116 (e.g., elements 110 of response 116).
[0059] The response function 160 or tokenization function 120 can provide a context data structure 150 that can be configured as a tree structure or to include a tree structure via one or more ML models (e.g., QCM 140 or NLP model 114). The tree structure may have a first layer of multiple nodes 146 corresponding to multiple tokens 122, each with a weight for each of the multiple tokens 122, and a second layer of multiple nodes 146 corresponding to tokens 122 from a second multiple of tokens 122 that are different from the first multiple of tokens 122. Each token 122 of the second multiple of tokens 122 can be associated with at least one other token 122 of the first multiple of tokens 122 based on a similarity comparison score (e.g., by a similarity function 118). For example, a token in the second multiple of tokens 122 may be a processed or inferred token 122 corresponding to the first multiple of tokens 122.
[0060] Figure 2 shows a block diagram of an exemplary computing system 200, also called computer system 200, which can be used to implement elements of the systems and methods described and illustrated herein. Computing system 200 can be used to include or implement any calculation or function described herein, for example, using the commands, instructions, or data described herein. Computing system 200 can be contained in and run on any device (e.g., a server, client device 106, or any other device communicating via network 104 of various entities or companies running a data processing system). Computing system 200 can be used to operate, run, or provide the model trainer 112, NLP model 114, QCM 140, tokenization function 120, and repository 132 (e.g., storage device 225), and can implement any function of these components described herein.
[0061] The computing system 200 may include at least one bus, data bus 205, or other communication component for communicating information. The computing system 200 may include at least one processor 210 or processing circuit combined with the data bus 205 for executing instructions or processing data or information. The computing system 200 may include one or more processors 210 or processing circuits combined with the data bus 205 for exchanging or processing data or information together with other computing systems 200. The computing system 200 may have one or more main memories 215, such as random access memory (RAM), dynamic RAM (DRAM), or other dynamic storage devices, which may be combined with the data bus 205 to store information and instructions executed by the processor(s) 210. The main memories 215 can be used to store information (e.g., data, computer code, commands, or instructions) while the processor(s) 210 are executing instructions.
[0062] The computing system 200 may include one or more read-only memories (ROMs) 220 or other static storage devices 225 combined with the data bus 205 to store static information and instructions for the processor(s) 210. The storage devices 225 may include any storage devices such as solid elements, magnetic disks or optical disks that can be combined with the data bus 205 to permanently store information and instructions.
[0063] The computing system 200 may be combined via a data bus 205 with one or more output devices 235, such as speakers or displays (e.g., liquid crystal displays or active-matrix displays), for displaying or providing information to the user. Input devices 230, such as keyboards, touchscreens, or voice interfaces, may be combined with the data bus 205 to communicate information and commands to the processor(s) 210. Input devices 230 may include, for example, a touchscreen display (e.g., output device 235). Input devices 230 may include cursor controllers, such as a mouse, trackball, or cursor directional keys, for communicating directional information and command selections to the processor(s) 210 to control cursor movement on the display.
[0064] The computer system 200 may also include one or more interfaces 240 combined via a data bus 205. Interfaces 240 may include any physical or virtual components that enable communication between the computer system 200 and any external network (e.g., the internet of network 104). Interface 245 may include a network interface that provides data transfer between the processor(s) 210, memory 215, and any external network (e.g., network 104) for communication with other devices on network 104 (e.g., client devices 106, third-party entities, or servers or clouds providing data processing systems 102).
[0065] The processes, systems, and methods described herein may be implemented by a computing system 200 in response to a processor 210 executing a set of instructions contained in main memory 215. Such instructions can be read into main memory 215 from another computer-readable medium, such as a storage device 225. The execution of the set of instructions contained in main memory 215 causes the computing system 200 to execute the exemplary processes described herein. One or more processors 210 in a multiprocessing configuration may also be employed to execute the instructions contained in main memory 215. Hardwired circuits may be used in place of or in combination with software instructions, along with the systems and methods described herein. The systems and methods described herein are not limited to any particular combination of hardware circuits and software.
[0066] An illustrative computing system is shown in Figure 2, but the subject matter, including the operations described herein, can be implemented in other types of digital electronic circuits, or in computer software, firmware, or hardware, or in combination with one or more of the structures disclosed herein and their structural equivalents.
[0067] Figure 3 shows an example block diagram of the structure 300 of a query context model 140 that utilizes a graphical transformer 144 in a graph neural network 142. The structure 300 of the QCM model 140 may include an architecture of layered (e.g., multi-layered) GNN 142 components nested in parallel and across the transformer 144 (e.g., the transformer block of the language model). By utilizing the exemplary structure 300 of the QCM 140, more contextually accurate prompts can be achieved for a pre-trained domain-specific NLP model 114. The encoder 124 can be used to provide an output (e.g., a context data structure 150) that can drive the decoder 126. Each layer's decision (e.g., from the transformer 144) can be validated using the context data structure 150 and its validation parameters 152 or context parameters 154.
[0068] Rather than taking a random section of text from query 108 as a prompt for the NLP model 114 (for example, without further analyzing the meaning of this text), the exemplary structure 300 of QCM 140 allows DPS 102 to analyze the text of query 108 and understand the semantic roles and relationships between the query elements 110 (e.g., words and phrases). For example, QCM 140 can generate or determine validation parameters 152 or context parameters 154 for each node 146 or the relationships between nodes (e.g., node features 148). Using the exemplary structure 300, QCM 140 can identify enhanced or improved prompts for the NLP model 114 and have more precise control over the response 116 from the NLP model 114. For example, QCM 140 can utilize the context data structure 150 to maintain the prompt nodes 146 to the NLP model 114 according to the validation parameters 152 and according to the context parameters 154.
[0069] The example structure 300 utilizes a graphical transformer having GNN components nested in layers parallel to and across the transformer 144 of the language model. The example structure 300 can enable the fusion or combination of text encoding and graph aggregation into an iterative workflow. This can improve the accuracy of understanding each node 146 from a global perspective (for example, to keep it within the context of a query). This solution provides a incremental learning strategy that allows the model to be successively trained on manipulated data and original data to enhance its ability to integrate information on the graph.
[0070] The example structure 300 of QCM140 uses GNNs nested in parallel and across each layer of the transformer 144 of a model, such as a pre-trained language model. As a result, the underlying meaning (semantic) of each text node 146 can be accurately captured and effectively integrated for a high-quality text graph representation. This architecture can introduce a two-stage incremental training strategy to improve the representation quality of the graphical transformer (e.g., structure 300). This solution can simplify the model through unidirectional graph aggregation, which can eliminate unnecessary computational costs and thus potentially improve efficiency and scalability.
[0071] In the exemplary structure 300, the components of GNN 142 can be nested in parallel and across the transformers 144, which are organized into layers or rows. As a result, text encoding and graph aggregation can be fused or combined into iterative workflows. Each iteration of the workflow can include, or utilize, nodes 146 that can link with each other and exchange information with other nodes 146 within the layered components of GNN 142 (e.g., within a single layer of GNN 142 and transformer 144). As a result, each node 146 in structure 300 can be augmented by other nodes 146 surrounding it (e.g., adjacent to it).
[0072] Each component of the transformer 144 can operate on the augmented node features 148, where a representation can be generated in which the amount of information on the nodes 146 and their relationships (e.g., contextual similarity determined by the similarity feature 118) increases with each subsequent iteration. As a result, the QCM 140 of the exemplary structure 300 can continuously improve the contextual representation of the nodes 146 corresponding to the elements of the incoming query, thereby generating output in the form of a context data structure 150 that can include or reference the node features 148 and can be used as input to the NLP model 114. Consequently, the graphical transformer of the exemplary structure 300 can achieve improved utilization of cross-node information on the graph and improve the quality of data representation while reducing computational or execution costs.
[0073] QCM140 can be trained using various techniques. For example, training QCM140 (e.g., a graphical transformer) may include a central node 146 that is "sufficiently informative" to provide the desired response. In such a case, the training task can be accomplished without leveraging information from neighboring nodes 146. To ensure a well-trained GNN 142, QCM140 can be trained incrementally. In the first round of training, manipulated data can be used such that node 146 may be randomly contaminated with invalid data. This may make it difficult to make predictions by relying solely on the central node 146 (e.g., without utilizing neighboring nodes 146). Next, training the QCM140 model may allow the QCM model 140 to leverage the entire input node 146 (e.g., neighbors of node 146 that include node 146 in one or more layers).
[0074] In the second round of training, uncontaminated data can be used, allowing QCM140 to be fitted to the target distribution. QCM140 can be configured to include a one-way graph to avoid instances where all linked nodes 146 are interdependent in the representation process, thereby avoiding the presentation of a new node 146 triggering the encoding of all adjacent nodes 146 from scratch. In the one-way graph approach, only the central node 146 can reference its adjacent nodes 146, while the adjacent nodes 146 remain independently encoded. This allows for caching and reuse of the results of existing adjacent encodings, which significantly reduces computational costs.
[0075] Figure 4 shows an example process flow of Method 400 for using an ML model to improve the context of a query before inputting it to a domain-specific, trained ML model that provides a response. Method 400 can be implemented using the systems and components described in System 100, for example, and the computing system 200. Method 400 may include Acts 405-425. In 405, the data processing system can receive a query from a client device. In 410, the data processing system can generate tokens for the elements of the query. In 415, the data processing system can generate a data structure. In 420, the data processing system can verify the relationship between a first node and a second node. In 425, the data processing system can provide a response to the query using the data structure. In 430, the data processing system can send the response to the query to the client device.
[0076] In 405, the data processing system can receive queries from client devices. For example, the data processing system may include or be implemented using one or more processors combined with memory. One or more processors may receive queries from remote client devices. A query may contain multiple elements. Elements may include paragraphs, sentences, phrases, words, or parts or subwords of words (e.g., "un" in the word "unrecognized," "non" in the word "nonissue"). A query may contain text (e.g., one or more sentences) that inquires about a specific product, requests information corresponding to the purchase of a product or service, or responds to a question or inquiry relating to any field or topic, such as e-commerce, medicine, technology, law, or other fields.
[0077] Queries can request information about products for sale, including product performance, availability, shipping conditions, warranty information, service plans, and questions about the product's technical or physical characteristics. Queries may also include descriptions of the product or its features, or requests to purchase the product. Queries may also provide information about the product's price range, delivery time or specifications, or its intended use or purpose (e.g., a gift for a child), or its technical specifications.
[0078] Queries can cover any area or topic other than e-commerce, such as medical questions relating to medical or health-related diagnoses. Queries can cover legal questions, such as questions relating to legal or procedural issues. Queries can cover topics relating to technical or scientific fields, such as questions relating to scientific decisions. Queries can cover questions relating to one or more events, history, political developments, geography, markets, transportation, regulations, or other areas or topics.
[0079] ACT410 allows a data processing system to generate tokens for elements of a query. For example, this method may include the data processing system generating multiple tokens. Each of these multiple tokens may correspond to any element of the query (e.g., a token for each word or phrase of the query). Each token may contain a numerical representation of one or more corresponding elements of the query. Each token may be represented as a number (e.g., an integer or floating-point value) or as a vector of one or more vector values (e.g., an embedding). Each token may correspond to any element of the query, such as a word or phrase of the query.
[0080] Tokenization or response functions can utilize one or more ML models (e.g., query context models including either graph neural networks or transformers, or any natural language processing models) to generate one or more embeddings (e.g., vector representations) for one or more elements of a query or one or more tokens of an element. Embeddings may include vector representations of the meaning or context of each token. Tokenization or response functions can utilize one or more ML models to generate embodiments representing the context of a query, or vector representations of sequences of tokens corresponding to sequences of elements of a query (e.g., context parameters of a context data structure). Tokenization or response functions can utilize one or more ML models to generate vector representations (e.g., embeddings) of individual tokens or corresponding elements, indicating the contextual representation or meaning of each element (e.g., with any weights assigned to individual elements).
[0081] In ACT415, a data processing system can generate data structures. This method may include a data processing system that can generate, construct, or create data structures, such as context data structures, via a first machine learning (ML) model (e.g., a query context model) having multiple graph neural networks (GNNs) and multiple transformers. The data structure (e.g., a context data structure) can identify relationships between a first node of multiple nodes in the data structure corresponding to a first token of multiple tokens (and a first element of a query, for example) and a second node of multiple nodes corresponding to a second token of multiple tokens (and a second element of a query, for example). This relationship can be represented, for example, through a first node feature having, or containing, a numerical representation of the first and second nodes.
[0082] The relationship between a first node and a second node may be a contextual relationship. A contextual relationship can be defined, quantified, indicated, or determined based on the distance in a vector space (e.g., the embedding space of a knowledge graph) between the first numerical representation of the first node (e.g., the first embedding) and the second numerical representation of the second node (e.g., the second embedding). This relationship can be determined or defined based on one or more contextual parameters of a query or one or more validation parameters of a node. The contextual data structure may include multiple tokens organized within layers so that the graphical transformer of the first ML model updates each node based on the values of neighboring nodes (e.g., nodes adjacent to the node being updated).
[0083] A data processing system can provide first node features through a first layer of a first ML model (e.g., a layer of transformers for a GNN in a query context model). The first layer may include a first GNN and a first subset of transformers that provide a first set of nodes corresponding to multiple tokens. The first node features may include, or may include, a numerical representation indicating the relationship between a first node and a second node, such as the distance in a vector space between two or more nodes, or the distance between the embedding of the query context and the node.
[0084] The data processing system can provide a second node feature via a second layer of a first ML model having a second subset of multiple transformers and a second GNN to provide a second subset of multiple nodes. The second node feature may belong to the second layer and may represent a relationship between a third node corresponding to a third token and a fourth node corresponding to a fourth token. A third node in the second layer may be related to a first node in the first layer. For example, a third node may correspond to a query element adjacent to a query element of a first node in a sequence of query elements.
[0085] For example, at least one of the third or fourth nodes may correspond to a different element from each of the multiple elements of the query. The data processing system can assign a weight to each of the multiple nodes corresponding to the importance of one or more elements of the query. The data processing system can then generate a data structure using the respective weights for each of the multiple nodes via the first ML model.
[0086] The data processing system can generate a data structure configured as a tree structure via a first ML model. The tree structure may include a first layer of nodes corresponding to multiple tokens, each with its own token-specific weight, and a second layer of nodes corresponding to tokens from a second set of tokens distinct from the first set of tokens. Each token from the second set of tokens may be associated with at least one other token from the first set of tokens based on a similarity comparison score.
[0087] In 420, the data processing system can verify the relationship between a first node and a second node. This method may include the data processing system's response function verifying the relationship between the first node and the second node based on validation parameters of the data structure. The validation is performed through one or more ML models (e.g., query context models) that can validate, confirm, or maintain prompts input to the NLP model within their respective contexts or context ranges. For example, the response function may use one or more GNNs or transformers of the query context model to validate, confirm, or check whether the relationship between the first node and the second node (e.g., corresponding to node features) is within the validation parameters of the context data structure. The validation parameters may include validation parameter thresholds corresponding to numerical representations of the relationship context (e.g., represented using embeddings and their relationships in a vector space).
[0088] A data processing system can verify the relationship between a first node and a second node based on context parameters, via one or more ML models (e.g., a query context model). Context parameters can relate to or correspond to information derived from multiple elements of a query. For example, context parameters may include numerical representations (e.g., vectors or embeddings) of sequences of query elements. For instance, a response function can use the query context model to determine whether the relationship between a first node and a second node (e.g., node features) falls within the range of the context parameters.
[0089] For example, a data processing system may use one or more ML models (e.g., a query context model) to determine that the relationship between a first node and a second node does not match a context parameter. For example, the query context model may determine that the numerical relationship between the first and second nodes (e.g., node feature embeddings) does not correspond to, or differs from, numerical representations derived from multiple elements of the query (e.g., context parameter embeddings). This determination can be made according to a predetermined context parameter threshold. For example, the data processing system may determine that the relationship between the first and second nodes does not match the context parameter information derived from multiple elements of the query within a predetermined range of the query's context parameter threshold (e.g., similarity determination). In response to such a determination, the data processing system may instruct one or more ML models to generate a modified context data structure that may have different relationships that satisfy the context parameter threshold.
[0090] This method may include the data processing system determining, in response to validation using validation parameters, that the relationship between a first node and a second node does not match the validation parameters within a predetermined validation parameter threshold. The validation parameter threshold may correspond to at least one of the first token (e.g., an embodiment of the first token) or the second token (e.g., an embodiment of the second token). In response to the determination that the relationship does not match the validation parameters, the data processing system may instruct one or more ML models to generate a modified data structure.
[0091] In ACT425, a data processing system can provide a response to a query using a data structure. This method may include the data processing system providing a response to a query based on the data structure and a second ML model trained using multiple descriptions of multiple products. The second ML model may include an LLM or NLP model trained using text or materials in a specific field (e.g., e-commerce, science, technology, medicine, law, or other fields).
[0092] If the data processing system confirms, verifies, or guarantees that the nodes and the relationships between nodes in act420 are within the range of their respective validation parameters (e.g., node context) or context parameters (e.g., query context), the data processing system can provide at least a portion of such context data structures as input to an NLP model. The NLP model can then use at least a portion of the context data structures to generate a response to the query.
[0093] The second ML model that generates the response may include an NLP model. The NLP model can take prompts generated using data structures (such as context data structures) as input, rather than queries. For example, numerical representations of nodes and node features (e.g., relationships between nodes) may be input as one or more prompts to the NLP model used to generate the response.
[0094] A prompt for input to a second (e.g., NLP) ML model may include a modified query, which is based on an received user query modified using a context data structure generated by a query context model. For example, the query context model may use validation and context parameters for all nodes and node features to validate or confirm (e.g., verify) that the nodes and node features satisfy the validation and context parameters, and may prompt the query context model to reproduce nodes and node features if they do not satisfy the validation and context parameters. Thus, the prompt provided to the NLP model includes nodes and node features that satisfy the validation and context parameters of the context data structure. For example, a second ML model can use the data structure as input to generate a response to a query. The second ML model (e.g., an NLP model) can generate a response based on a prompt input to the second ML model. The prompt may be generated by a query context model (e.g., a transformer-based GNN) using a context data structure with validation and context parameters, and the prompt can be kept within a threshold range defined or implemented using the validation and context parameters.
[0095] In ACT430, the data processing system can send responses to queries to client devices. This method may include the data processing system sending responses to client devices in response to queries. The data processing system can receive responses from a second ML model over a network and send them to client devices. The data processing system can decode the responses using data structures and then send the decoded responses to client devices.
[0096] The embodiments described herein are provided solely for illustrative purposes and are not intended to limit the Disclosure. While aspects of the Disclosure have been described with reference to exemplary embodiments, the language used herein is intended to be descriptive and illustrative, not limiting. Modifications may be made within the scope and spirit of the Disclosure, as described herein and as modified, without departing from the scope and spirit of the Disclosure in any aspect. While aspects of the Disclosure have been described herein with reference to specific means, materials, and embodiments, the Disclosure is not intended to be limited to any specific aspects disclosed herein, but rather to encompass all functionally equivalent structures, methods, and uses, such as those within the scope of the appended claims.
[0097] The systems described above may provide any one or each of these components, which may be provided on a standalone system or in multiple instances within a distributed system. In addition, the systems and methods described above may be provided as one or more computer-readable programs or as executable instructions executed on or within one or more manufactured products. Manufactured products may be cloud storage, hard disks, CD-ROMs, flash memory cards, PROMs, RAMs, ROMs, or magnetic tapes. Generally, computer-readable programs can be implemented in any programming language such as LISP, PERL, C, C++, C#, PROLOG, or any bytecode language such as JAVA®. Software programs or executable instructions may be stored as object code on or within one or more manufactured products.
[0098] The subjects and operations described herein can be implemented in digital electronic circuits, including structures disclosed herein and their structural equivalents, or in computer software, firmware, hardware, or one or more combinations thereof. The subjects described herein can be implemented as one or more computer programs encoded in one or more computer storage media, e.g., one or more circuits of computer program instructions, for execution by a data processing device or for controlling the operation of a data processing device. Alternatively, or in addition, program instructions can be encoded into artificially generated propagating signals, e.g., mechanically generated electrical, optical, or electromagnetic signals generated to code information for transmission to a suitable receiving device for execution by a data processing device. Computer storage media can be, or include, computer-readable storage devices, computer-readable storage boards, random-access or serial-access memory arrays or devices, or one or more combinations thereof. Although computer storage media are not propagating signals themselves, computer storage media can be the source or destination of computer program instructions encoded into artificially generated propagating signals. Computer storage media may also be, or comprise, one or more separate components or media (e.g., multiple CDs, disks, or other storage devices, including cloud storage). The operations described herein may be performed by a data processing device on data stored in one or more computer-readable storage devices or on data received from other sources.
[0099] Terms such as “computing device,” “component,” or “data processing device” encompass a variety of devices, machines, and equipment for processing data, including, for example, programmable processors, computers, systems on a chip, or multiple such devices, or combinations thereof. A device may include specialized logic circuits, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits). In addition to hardware, a device may also include code that constitutes the execution environment for the computer program, such as processor firmware, protocol stacks, database management systems, operating systems, cross-platform execution environments, virtual machines, or one or more combinations thereof. This device and execution environment can realize a variety of different computing model foundations, including web services, distributed computing, and grid computing infrastructure.
[0100] Computer programs (also called programs, software, software applications, apps, scripts, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, such as a standalone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. Computer programs can correspond to files in a file system. Computer programs can be stored in part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in a series of collaborative files (e.g., a file containing one or more modules, subprograms, or parts of code). Computer programs can be deployed to run on a single computer, or on multiple computers located in one location or distributed across multiple locations, and interconnected by a communication network.
[0101] The processes and logic flows described herein may be executed by one or more programmable processors executing one or more computer programs, which can be executed by acting on input data and producing outputs. The processes and logic flows may also be executed by special-purpose logic circuits, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the devices may also be implemented therein. Suitable devices for storing computer program instructions and data include non-volatile memory, media, and memory devices, such as semiconductor memory devices, e.g., EPROMs, EEPROMs, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROMs and DVD-ROMs. Processors and memory may be supplemented by or incorporated into special-purpose logic circuits.
[0102] The subject matter described herein can be implemented in a computing system comprising a backend component, e.g., as a data server; a middleware component, e.g., as an application server; or a frontend component, e.g., a client computer having a graphical user interface or web browser that allows a user to interact with an implementation of the subject matter described herein; or a combination of one or more such backend, middleware, or frontend components. The components (constituent elements) of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), internetworks (such as the Internet), and peer-to-peer networks (such as ad-hoc peer-to-peer networks).
[0103] Although the drawings depict the actions in a specific order, these actions do not need to be performed in the specific order or sequentially shown, nor do all of the illustrated actions need to be performed. The actions described herein can be performed in a different order.
[0104] While several exemplary embodiments have been described, it is clear that these are illustrative and not limiting, and are presented as examples only. In particular, many of the embodiments described herein involve specific combinations of acts of methods or elements of systems, but these acts and these elements can be combined in other ways to achieve the same objective. Acts, elements, and features discussed in relation to one embodiment are not intended to be excluded from similar roles in other embodiments.
[0105] The terms and expressions used herein are for illustrative purposes only and should not be considered limiting. The use herein of “including,” “comprising,” “having,” “containing,” “involving,” “characterized by,” “characterized in that,” and variations thereof is intended to encompass the items listed thereafter, their equivalents, and additional items, as well as alternative embodiments consisting only of the items listed thereafter. In one embodiment, the systems and methods described herein consist of one, any combination of two or more, or all of the elements, executions, or components described herein.
[0106] References to embodiments, elements, or executions of systems and methods referred to in the singular form herein may include embodiments comprising multiple such elements, and references to embodiments, elements, or executions in the plural form herein may include embodiments comprising only a single element. References in the singular or plural form are not intended to limit the systems or methods, their components, executions, or elements of the Disclosure to one or more configurations. References that any execution or element is based on any information, execution, or element may include embodiments in which the execution or element is at least partially based on any information, execution, or element.
[0107] Any embodiment disclosed herein can be combined with any other embodiment or configuration, and references to “embodiment,” “several embodiments,” “one embodiment,” etc., are not necessarily mutually exclusive and are intended to indicate that certain features, structures, or characteristics described in relation to an embodiment may be included in at least one embodiment or configuration. Such terms used herein do not necessarily refer to the same embodiment. Any embodiment can be combined with any other implementation, comprehensively or exclusively, in any manner consistent with the aspects and embodiments disclosed herein.
[0108] Since references to "or" can be interpreted as inclusive, any term described using "or" can refer to any one, two or more, or all of the terms listed. References to at least one of the connectable term lists can be interpreted as an inclusive OR referring to any one, two or more, or all of the terms listed. For example, the reference "at least one of "A" and "B"" can include "A" only, "B" only, or both "A" and "B". Such references, used with "comprising" or other open terms, can include further items.
[0109] When reference numerals follow technical features in drawings, detailed descriptions, or claims, these reference numerals are included to enhance the clarity of the drawings, detailed descriptions, and claims. Therefore, the presence or absence of reference numerals does not limit the scope of the elements of the claims in any way.
[0110] Without departing from the scope of this disclosure, modifications to the disclosed elements and their operation, including substitutions, changes, and omissions, may be made to the design, operating conditions, and configuration (arrangement) of the disclosed elements and their operation.
[0111] References to “approximately,” “substantially,” or other degrees include a variation of ±10% from a given measurement, unit, or range, unless otherwise specified. Combined elements can be combined with each other directly or via intervening elements, electrically, mechanically, or physically. Accordingly, the scope of the systems and methods described herein is indicated by the appended claims rather than the foregoing description, and any modifications that fall within the meaning and equivalence of the claims are incorporated herein.
Claims
1. It is a system: Receiving queries that contain multiple elements; Generating multiple tokens, each of which corresponds to any element among the multiple elements of the query; To generate a data structure for identifying the relationship between a first node of a data structure corresponding to a first token of a plurality of tokens and a second node of a plurality of nodes corresponding to a second token of a plurality of tokens, via one or more machine learning (ML) models having multiple graph neural networks (GNNs) and multiple transformers; Validating the relationship between a first node and a second node based on data structure validation parameters via one or more ML models; The purpose is to provide responses to queries through any of one or more ML models and based on the data structure, with the models being trained using multiple descriptions of multiple products; and Sending a response to a client device in response to a query. The system includes a data processing system which includes one or more processors combined with memory for performing the following.
2. Validating the relationship between a first node and a second node based on context parameters corresponding to information derived from multiple elements of a query, via one or more ML models. The system according to claim 1, comprising a data processor for performing the following.
3. Using one or more ML models, determine that the relationship between a first node and a second node does not match the context parameters corresponding to information derived from multiple elements of the query, within a predetermined context parameter threshold; and Instructing one or more ML models to generate a modified data structure in response to a decision. The system according to claim 1, comprising a data processor for performing the following.
4. In response to the verification, it is determined that the relationship between the first node and the second node does not match the verification parameter within a predetermined verification parameter threshold corresponding to at least one of the first token or the second token; and Instructing one or more ML models to generate a modified data structure in response to a decision. The system according to claim 1, comprising a data processor for performing the following.
5. The present invention provides a first node feature of the first layer corresponding to the relationship between a first node and a second node, through a first layer of a first ML model among one or more ML models, wherein the first layer has a first subset of multiple transformers and a first GNN for providing a first subset of multiple nodes corresponding to multiple tokens. The system according to claim 1, comprising a data processor for performing the following.
6. The objective is to provide a second node feature of the second layer corresponding to the relationship between a third node corresponding to a third token and a fourth node corresponding to a fourth token, via a second layer of a first ML model having a second subset of multiple transformers and a second GNN to provide a second subset of multiple nodes, where the third node is related to the first node. The system according to claim 5, comprising a data processor for performing the following.
7. The system according to claim 6, wherein at least one of the third or fourth node corresponds to an element different from each of the multiple elements of the query.
8. Assigning weights to each of multiple nodes corresponding to the importance of one or more elements of the query; and Generating a data structure using the respective weights of each node through one or more ML models. The system according to claim 1, comprising a data processor for performing the following.
9. Decoding the response using the data structure; and Send the decoded response to the client device. The system according to claim 1, comprising a data processor for performing the following.
10. The method involves generating a data structure configured to include a tree structure having a first layer of nodes corresponding to a plurality of tokens, each with its own weight, and a second layer of nodes corresponding to tokens from a second plurality of tokens different from the first plurality of tokens, wherein each token of the second plurality of tokens is associated with at least one other token of the first plurality of tokens based on a similarity comparison score. The system according to claim 1, comprising a data processor for performing the following.
11. Method: Receiving queries containing multiple elements by a data processing system including one or more processors combined with memory; The data processing system generates multiple tokens, each of which corresponds to any element among the multiple elements of the query; A data processing system generates a data structure to identify the relationship between a first node of a data structure corresponding to a first token of a plurality of tokens and a second node of a plurality of nodes corresponding to a second token of a plurality of tokens, via one or more machine learning (ML) models having multiple graph neural networks (GNNs) and multiple transformers; The data processing system verifies the relationship between a first node and a second node based on validation parameters of the data structure, via one or more ML models; The purpose is to provide a response to a query using any of one or more ML models and based on the data structure, the model being trained using multiple descriptions of multiple products; and The data processing system sends a response to the client device in response to a query. The method, including the method described above.
12. The data processing system, via one or more ML models, verifies the relationship between a first node and a second node based on context parameters corresponding to information derived from multiple elements of a query. The method according to claim 11, including the method described in claim 11.
13. The data processing system determines, using one or more ML models, that the relationship between the first node and the second node does not match the context parameters corresponding to information derived from multiple elements of the query within a predetermined context parameter threshold; and The data processing system instructs one or more ML models to generate modified data structures in response to decisions. The method according to claim 11, including the method described in claim 11.
14. In response to the verification, the data processing system determines that the relationship between the first node and the second node does not match the verification parameter within a predetermined verification parameter threshold corresponding to at least one of the first token or the second token; and The data processing system instructs one or more ML models to generate modified data structures in response to decisions. The method according to claim 11, including the method described in claim 11.
15. A data processing system provides a first node feature of the first layer that indicates the relationship between a first node and a second node, through a first layer of a first ML model of one or more ML models, wherein the first layer has a first subset of multiple transformers and a first GNN that provides a first plurality of nodes corresponding to a plurality of tokens. The method according to claim 11, including the method described in claim 11.
16. The data processing system provides a second node feature of the second layer showing the relationship between a third node corresponding to a third token and a fourth node corresponding to a fourth token, via a second layer of a first ML model having a second subset of multiple transformers and a second GNN to provide a second subset of multiple nodes, wherein the third node is related to the first node. The method according to claim 15, including the method described in claim 15.
17. The method according to claim 16, wherein at least one of the third node or the fourth node corresponds to an element different from each of the multiple elements of the query.
18. The data processing system assigns weights to each of multiple nodes corresponding to the importance of one or more elements of a query; and The process of generating a data structure using the respective weights of each node in a data processing system via one or more ML models. The method according to claim 11, including the method described in claim 11.
19. Decoding the response by a data processing system using a data structure; and The data processing system sends the decoded response to the client device. The method according to claim 11, including the method described in claim 11.
20. A non-transient computer-readable medium containing instructions, wherein, when an instruction is executed by one or more processors, it is transmitted to one or more processors: Receiving queries that contain multiple elements; Each of the multiple tokens generates multiple tokens corresponding to any element among the multiple elements of the query; To generate a data structure for identifying the relationship between a first node of a data structure corresponding to a first token of a plurality of tokens and a second node of a plurality of nodes corresponding to a second token of a plurality of tokens, via one or more machine learning (ML) models having multiple graph neural networks (GNNs) and multiple transformers; Validating the relationship between a first node and a second node based on data structure validation parameters via one or more ML models; The purpose is to provide responses to queries through any of one or more ML models and based on the data structure, where the ML models are trained using multiple descriptions of multiple products; and Sending a response to a client device in response to a query. A non-transient computer-readable medium containing the aforementioned instructions for causing the action to be performed.