Methods and systems for resolving and providing context for client-permissioned content

EP4771510A1Pending Publication Date: 2026-07-08SHOPIFY INC

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
SHOPIFY INC
Filing Date
2023-12-14
Publication Date
2026-07-08

AI Technical Summary

Technical Problem

Large Language Models (LLMs) face challenges in accessing and processing user-specific data due to security and permission constraints, limiting their ability to provide context for continued conversations.

Method used

A method where the LLM Client receives a query for a data resource from the user interface, which then processes and summarizes the results, providing a curated summary back to the LLM Client to establish context for subsequent queries.

Benefits of technology

Enables LLMs to maintain context and continue conversations effectively despite permission limitations, ensuring seamless interaction with user-specific data resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CA2023051663_19062025_PF_FP_ABST
    Figure CA2023051663_19062025_PF_FP_ABST
Patent Text Reader

Abstract

A computer method at a first device, the method including receiving, at the first device, a query for a data resource from a large language model (LLM) Client; sending the query to the data resource; and obtaining results from the data resource, where the first device has access to the data resource and the LLM does not have access to the data resource.
Need to check novelty before this filing date? Find Prior Art

Description

METHODS AND SYSTEMS FOR RESOLVING AND PROVIDING CONTEXT FOR CLIENT-PERMISSIONED CONTENTFIELD OF THE DISCLOSURE

[0001] The present disclosure is related to large language models (LLMs), and in particular relates to large language models and external resources.BACKGROUND

[0002] Large Language Models are deep learning algorithms that can recognize inputs and predict and generate text and other content based on the training such model has received from large datasets. LLMs include, for example, generative pretrained transformer models such as GPT-3.SUMMARY

[0003] It is possible to instruct LLMs to invoke Tools to fetch additional data and process that data when responding to a query from a user. This processing typically takes place within the LLM Client (the piece of software directly making the calls to the LLM). However, certain resources may only be fetched from a server using permissions granted to a User Interface.

[0004] It may be desirable for an LLM Client to have access to data or information that is secured for a particular user. As used herein, an LLM Client is the server orchestrating interactions with the LLM. LLMs themselves never have access to tools / resources. Rather, the server uses the LLM (for example in-process, through an API, etc.) and such server may or may not have access privileges. Specifically, the LLM Client may lack privileged access to the user's data and is solely responsible for orchestrating the user input and LLM response and the LLM's intent at invoking tools or rendering presentational elements to the user. An LLM does not have access to external resources, but rather uses "Tools".

[0005] It is very common for tools that are executed inside the LLM server to have access to data. However, there are cases where the user interaction or presentation layer has more privileges than the LLM Client does (for security I service topology reasons) and the presentation layer can access data that the LLM Client cannot.

[0006] Thus, in the embodiments of the present disclosure, a curated summary of the presented data may in some embodiments be fed back to the LLM, as part of the message history, so that the LLM has context on what was presented to the user.

[0007] For example, an LLM may be able to generate a query for data about a merchant’s shop using a database querying language such as a Structured Query Language (SQL). This may be provided back to the LLM Client. However, because the LLM Client does not have permissions to access a resource, it is not able to fetch and process the information from the resource as part of the conversation context.

[0008] In this regard, the LLM may generate a query that must be submitted to another server by a client device with permissions to access the resource. As provided by the embodiments of the present disclosure, alongside retrieving the data, the user interface may provide a summary to the LLM in order to give the LLM context for continued conversations regarding the data.

[0009] Therefore, in one aspect, a computer-implemented method may be provided. The method may include a computer method at a first device, where the method includes receiving, at the first device, a query for a data resource from a large language model (LLM) Client and sending the query to the data resource. The method may further include obtaining results from the data resource. In the method the first device may have access to the data resource and the LLM Client may not have access to the data resource.

[0010] In some embodiments, the method may include providing a summary of the results to the LLM Client.

[0011] In some embodiments, the method may include processing the results to create the summary.

[0012] In some embodiments, processing the results may comprise redacting data from the results.

[0013] In some embodiments, processing the results may comprise transforming the results into a new format.

[0014] In some embodiments, providing the summary may further comprise providing an entire chat history to the LLM Client.

[0015] In some embodiments, providing the summary of the results to the LLM Client may comprise appending the summary to a subsequent question to the LLM Client.

[0016] In some embodiments, the first device may store a credential to access the data resource.

[0017] In some embodiments, wherein the query for the data resource comprises instructions to be interpreted by the data resource to create the results.

[0018] In some embodiments, the query may be part of a presentation container, the presentation container comprising: text to be displayed on the user interface; a placeholder for the results of the query; and the query.

[0019] In some embodiments, the presenting the results may comprise displaying the text and the placeholder and, responsive to receiving the results, replacing the placeholder with the results.

[0020] In a further aspect, the present disclosure may provide a computing device having a processor and a communications subsystem. The computing device may be configured to receive a query for a data resource from a large language model (LLM) Client and send the query to the data resource. The computing device may further be configured to obtain results from the data resource. The computing device may have access to the data resource while the LLM Client does not have access to the data resource.

[0021] In some embodiments, the computing device may further be configured to provide a summary of the results to the LLM Client.

[0022] In some embodiments the computing device may be further configured to process the results to create the summary.

[0023] In some embodiments, the computing device may be configured to process the results by redacting data from the results.

[0024] In some embodiments, the computing device may be configured to process the results by transforming the results into a new format.

[0025] In some embodiments, the computing device may be further configured to provide an entire chat history to the LLM Client.

[0026] In some embodiments, the computing device may be configured to provide the summary of the results to the LLM Client by appending the summary to a subsequent question to the LLM Client.

[0027] In some embodiments, the computing device may store a credential to access the data resource.

[0028] In some embodiments, the query for the data resource comprises instructions to be interpreted by the data resource to create the result.

[0029] In some embodiments, the query may be part of a presentation container, the presentation container comprising: text to be displayed on the user interface; a placeholder for the results of the query; and the query.

[0030] In a further aspect, a non-transitory computer readable medium for storing instruction code may be provided. The instruction code, when processed by a processor of a computing device, may cause the computing device to receive a query for a data resource from a large language model (LLM) Client and send thequery to the data resource. The instruction code, when processed by a processor of a computing device, may further cause the computing device to obtain results from the data resource. The computing device may have access to the data resource while the LLM Client does not have access to the data resource.BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The present disclosure will be better understood with reference to the drawings, in which:

[0032] FIG. 1A is a block diagram of a simplified convolutional neural network, which may be used in examples of the present disclosure.

[0033] FIG. 1B is a block diagram of a simplified transformer neural network, which may be used in examples of the present disclosure.

[0034] FIG. 2 is a block diagram of an example computing system, which may be used to implement examples of the present disclosure.

[0035] FIG. 3 is a block diagram showing an example e-commerce system capable of implementing the embodiments of the present disclosure.

[0036] FIG. 4 is a block diagram showing an example interface for a merchant using the e-commerce platform of FIG. 3.

[0037] FIG. 5 is a block diagram showing an example user interface having an incomplete response rendered.

[0038] FIG. 6 is a block diagram showing the user interface of FIG. 5 with the response properly rendered.

[0039] FIG. 7 is a dataflow diagram showing the use of a tool to get data that is inaccessible to an LLM.

[0040] FIG. 8 is a dataflow diagram showing the return of a response with placeholders for asynchronous data.

[0041] FIG. 9 is a dataflow diagram showing the rendering of data from a response in multiple stages using placeholders for asynchronous data.

[0042] FIG. 10 is a block diagram showing an example user interface having a placeholder for a response rendered.

[0043] FIG. 11 is a block diagram showing the user interface of FIG. 11 with the placeholder replaced by asynchronous data.

[0044] FIG 12 is a dataflow diagram showing the use of server credentials to obtain proprietary data and the providing of a summary to the LLM to establish context for subsequent queries.

[0045] FIG 13 is a dataflow diagram showing the use of client credentials to obtain proprietary data and the providing of a summary to the LLM to establish context for subsequent queries.DETAILED DESCRIPTION

[0046] The present disclosure will now be described in detail by describing various illustrative, non-limiting embodiments thereof with reference to the accompanying drawings and exhibits. The disclosure may, however, be embodied in many different forms and should not be construed as being limited to the illustrative embodiments set forth herein. Rather, the embodiments are provided so that this disclosure will be thorough and will fully convey the concept of the disclosure to those skilled in the art.

[0047] In accordance with various embodiments of the present disclosure, methods and systems are provided to allow for an LLM to receive context about data that the LLM Client may not have access to.

[0048] Further, in some embodiments, the output of the LLM may be structured to allow for asynchronous content to be added to LLM responses in a coherent manner.

[0049] In particular, an LLM Client may not have permissions to access a data resource. For example, when the data resource belongs to a user and is proprietary, such data may not be used for LLM training and may be unknown and inaccessible to the LLM Client. However, the data may form part of a structured environment, and the LLM may be prompted or trained on such structured environment, and thus be capable of generating a query to get the information.

[0050] Thus, in accordance with some embodiments of the present disclosure, in response to a prompt from a user device regarding proprietary information, the LLM may be able to respond with a query that the user device could use to get the data.

[0051] For example, a user or client may be a merchant that is part of a merchant platform. On the merchant platform, the user device interacting with an LLM may ask the LLM to generate a report card with sales data for the past quarter. The LLM may know the context of how such data is stored at a storefront but may not have access to the data. Rather, a user device would have a credential such as a token or privileges to access such data. In this regard, in some embodiments the LLM could return a query that the client could use to access the data resource.

[0052] The user device could append its credentials to the query (or otherwise verify itself) and ask the data resource for the appropriate data. This may involve sending the query with the credentials to a second server, separate from the LLM in some cases.

[0053] The user device could then receive the data, which may be rendered at the user interface front end, such as by being displayed on a user interface. For example, in some cases the data could be added to the LLM chat stream. However, adding the data from a second device or server to an LLM chat stream may raise an issue in rendering the asynchronous data in the chat stream. In one embodiment, the LLM may return a presentation container in response to a prompt, where thecontainer includes information to be displayed immediately, along with placeholders to insert the asynchronous data retrieved from the data resource once they are received by the user device. This presents a more streamlined interaction between a user and the stream.

[0054] In the case of a presentation container, in some cases a user device would know how to handle the container and render certain information immediately and other information as it is received or after another event occurs.

[0055] In some embodiments, a further issue may be that the inserting of information into a stream does not give the LLM context about the information being presented. Specifically, if the user asks a follow-up question about the results from a previous question, the LLM does not know the context for such follow-up question since it never had access to the data.

[0056] In general, the LLM may be stateless in some cases, or may remove the context of a chat in other cases. The LLM client may be used to supplement this by providing a history of the chat to the LLM for follow-up questions. However, if the LLM Client does not have access to the results provided directly between the user device and a server that is not part of the LLM, then the LLM Client will not have a complete history of the chat.

[0057] In this regard, in some embodiments the user device may, when providing the prompt, also provide a summary of the previous response, including the results of the asynchronous query. The summary may, in some cases, be the complete information received. However, in other cases it may be a subset of the information, a synopsis of the information, or only some of the information. In some cases, information may be redacted by the client before sending it to the LLM. Thus, the summary may be curated in some cases.

[0058] In some cases, the LLM (and / or the LLM Client) may not keep a chat session, and thus the entire chat history may be replayed to the LLM as part of the prompt to allow the LLM to get into a correct state.

[0059] This subsequent prompt, along with the context summary / chat history, would then allow the LLM to respond in a manner that is aware of the received content.

[0060] Based on the above, in the embodiments of the present disclosure, a service hosting the LLM / LLM Client may be isolated from proprietary information. This may be to prevent the LLM having access to or being trained on information that may not be privy to all users who may interact with the LLM. However, the LLM could, in some cases, provide query information for a user device to use to obtain the proprietary data, and, once the proprietary data is received, it may be summarized and provided to the LLM Client as part of a subsequent query in order to provide context. Further, this content coordination approach provides a separation for the service hosting the LLM and the user interface I server with the privileges to access a user's data.

[0061] Machine Learning and Computing Device

[0062] To assist in understanding the present disclosure, some concepts relevant to neural networks and machine learning (ML) are first discussed.

[0063] Generally, a neural network comprises a number of computation units (sometimes referred to as “neurons”). Each neuron receives an input value and applies a function to the input to generate an output value. The function typically includes a parameter (also referred to as a “weight”) whose value is learned through the process of training. A plurality of neurons may be organized into a neural network layer (or simply “layer”) and there may be multiple such layers in a neural network. The output of one layer may be provided as input to a subsequent layer. Thus, input to a neural network may be processed through a succession of layers until an output of the neural network is generated by a final layer. This is a simplistic discussion of neural networks and there may be more complex neural network designs that include feedback connections, skip connections, and / or other such possible connections between neurons and / or layers, which need not be discussed in detail here.

[0064] A deep neural network (DNN) is a type of neural network having multiple layers and / or a large number of neurons. The term DNN may encompass any neural network having multiple layers, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and multilayer perceptrons (MLPs), among others.

[0065] DNNs are often used as ML-based models for modeling complex behaviors (e.g., human language, image recognition, object classification, etc.) in order to improve accuracy of outputs (e.g., more accurate predictions) such as, for example, as compared with models with fewer layers. In the present disclosure, the term “ML- based model” or more simply “ML model” may be understood to refer to a DNN. Training a ML model refers to a process of learning the values of the parameters (or weights) of the neurons in the layers such that the ML model is able to model the target behavior to a desired degree of accuracy. Training typically requires the use of a training dataset, which is a set of data that is relevant to the target behavior of the ML model. For example, to train a ML model that is intended to model human language (also referred to as a language model), the training dataset may be a collection of text documents, referred to as a text corpus (or simply referred to as a corpus). The corpus may represent a language domain (e.g., a single language), a subject domain (e.g., scientific papers), and / or may encompass another domain or domains, be they larger or smaller than a single language or subject domain. For example, a relatively large, multilingual and non-subject-specific corpus may be created by extracting text from online webpages and / or publicly available social media posts. In another example, to train a ML model that is intended to classify images, the training dataset may be a collection of images. Training data may be annotated with ground truth labels (e.g. each data entry in the training dataset may be paired with a label), or may be unlabeled.

[0066] Training a ML model generally involves inputting into an ML model (e.g. an untrained ML model) training data to be processed by the ML model, processing the training data using the ML model, collecting the output generated by the ML model (e.g. based on the inputted training data), and comparing the output to a desired set of target values. If the training data is labeled, the desired target values may be, e.g.,the ground truth labels of the training data. If the training data is unlabeled, the desired target value may be a reconstructed (or otherwise processed) version of the corresponding ML model input (e.g., in the case of an autoencoder), or may be a measure of some target observable effect on the environment (e.g., in the case of a reinforcement learning agent). The parameters of the ML model are updated based on a difference between the generated output value and the desired target value. For example, if the value outputted by the ML model is excessively high, the parameters may be adjusted so as to lower the output value in future training iterations. An objective function is a way to quantitatively represent how close the output value is to the target value. An objective function represents a quantity (or one or more quantities) to be optimized (e.g., minimize a loss or maximize a reward) in order to bring the output value as close to the target value as possible. The goal of training the ML model typically is to minimize a loss function or maximize a reward function.

[0067] The training data may be a subset of a larger data set. For example, a data set may be split into three mutually exclusive subsets: a training set, a validation (or cross-validation) set, and a testing set. The three subsets of data may be used sequentially during ML model training. For example, the training set may be first used to train one or more ML models, each ML model, e.g., having a particular architecture, having a particular training procedure, being describable by a set of model hyperparameters, and / or otherwise being varied from the other of the one or more ML models. The validation (or cross-validation) set may then be used as input data into the trained ML models to, e.g., measure the performance of the trained ML models and / or compare performance between them. Where hyperparameters are used, a new set of hyperparameters may be determined based on the measured performance of one or more of the trained ML models, and the first step of training (i.e. , with the training set) may begin again on a different ML model described by the new set of determined hyperparameters. In this way, these steps may be repeated to produce a more performant trained ML model. Once such a trained ML model is obtained (e.g., after the hyperparameters have been adjusted to achieve a desired level of performance), a third step of collecting the output generated by the trained ML model applied to the third subset (the testing set) may begin. The output generated from the testing set may be compared with the corresponding desired target values to give a final assessment of the trained ML model’s accuracy. Othersegmentations of the larger data set and / or schemes for using the segments for training one or more ML models are possible.

[0068] Backpropagation is an algorithm for training a ML model. Backpropagation is used to adjust (also referred to as update) the value of the parameters in the ML model, with the goal of optimizing the objective function. For example, a defined loss function is calculated by forward propagation of an input to obtain an output of the ML model and comparison of the output value with the target value. Backpropagation calculates a gradient of the loss function with respect to the parameters of the ML model, and a gradient algorithm (e.g., gradient descent) is used to update (i.e., “learn”) the parameters to reduce the loss function. Backpropagation is performed iteratively, so that the loss function is converged or minimized. Other techniques for learning the parameters of the ML model may be used. The process of updating (or learning) the parameters over many iterations is referred to as training. Training may be carried out iteratively until a convergence condition is met (e.g., a predefined maximum number of iterations has been performed, or the value outputted by the ML model is sufficiently converged with the desired target value), after which the ML model is considered to be sufficiently trained. The values of the learned parameters may then be fixed and the ML model may be deployed to generate output in real- world applications (also referred to as “inference”).

[0069] In some examples, a trained ML model may be fine-tuned, meaning that the values of the learned parameters may be adjusted slightly in order for the ML model to better model a specific task. Fine-tuning of a ML model typically involves further training the ML model on a number of data samples (which may be smaller in number / cardinality than those used to train the model initially) that closely target the specific task. For example, a ML model for generating natural language that has been trained generically on publically-available text corpuses may be, e.g., finetuned by further training using the complete works of Shakespeare as training data samples (e.g., where the intended use of the ML model is generating a scene of a play or other textual content in the style of Shakespeare).

[0070] FIG. 1A is a simplified diagram of an example CNN 10, which is an example of a DNN that is commonly used for image processing tasks such as image classification, image analysis, object segmentation, etc. An input to the CNN 10 may be a 2D RGB image 12.

[0071] The CNN 10 includes a plurality of layers that process the image 12 in order to generate an output, such as a predicted classification or predicted label for the image 12. For simplicity, only a few layers of the CNN 10 are illustrated including at least one convolutional layer 14. The convolutional layer 14 performs convolution processing, which may involve computing a dot product between the input to the convolutional layer 14 and a convolution kernel. A convolutional kernel is typically a 2D matrix of learned parameters that is applied to the input in order to extract image features. Different convolutional kernels may be applied to extract different image information, such as shape information, color information, etc.

[0072] The output of the convolution layer 14 is a set of feature maps 16 (sometimes referred to as activation maps). Each feature map 16 generally has smaller width and height than the image 12. The set of feature maps 16 encode image features that may be processed by subsequent layers of the CNN 10, depending on the design and intended task for the CNN 10. In this example, a fully connected layer 18 processes the set of feature maps 16 in order to perform a classification of the image, based on the features encoded in the set of feature maps 16. The fully connected layer 18 contains learned parameters that, when applied to the set of feature maps 16, outputs a set of probabilities representing the likelihood that the image 12 belongs to each of a defined set of possible classes. The class having the highest probability may then be outputted as the predicted classification for the image 12.

[0073] In general, a CNN may have different numbers and different types of layers, such as multiple convolution layers, max-pooling layers and / or a fully connected layer, among others. The parameters of the CNN may be learned through training, using data having ground truth labels specific to the desired task (e.g., class labels if the CNN is being trained for a classification task, pixel masks if the CNN is beingtrained for a segmentation task, text annotations if the CNN is being trained for a captioning task, etc.), as discussed above.

[0074] Some concepts in ML-based language models are now discussed. It may be noted that, while the term “language model” has been commonly used to refer to a ML-based language model, there could exist non-ML language models. In the present disclosure, the term “language model” may be used as shorthand for ML- based language model (i.e. , a language model that is implemented using a neural network or other ML architecture), unless stated otherwise. For example, unless stated otherwise, “language model” encompasses LLMs.

[0075] A language model may use a neural network (typically a DNN) to perform natural language processing (NLP) tasks such as language translation, image captioning, grammatical error correction, and language generation, among others. A language model may be trained to model how words relate to each other in a textual sequence, based on probabilities. A language model may contain hundreds of thousands of learned parameters or in the case of a large language model (LLM) may contain millions or billions of learned parameters or more.

[0076] In recent years, there has been interest in a type of neural network architecture, referred to as a transformer, for use as language models. For example, the Bidirectional Encoder Representations from Transformers (BERT) model, the Transformer-XL model and the Generative Pre-trained Transformer (GPT) models are types of transformers. A transformer is a type of neural network architecture that uses self-attention mechanisms in order to generate predicted output based on input data that has some sequential meaning (i.e., the order of the input data is meaningful, which is the case for most text input). Although transformer-based language models are described herein, it should be understood that the present disclosure may be applicable to any ML-based language model, including language models based on other neural network architectures such as recurrent neural network (RNN)-based language models.

[0077] FIG. 1B is a simplified diagram of an example transformer 50, and a simplified discussion of its operation is now provided. The transformer 50 includes an encoder 52 (which may comprise one or more encoder layers / blocks connected in series) and a decoder 54 (which may comprise one or more decoder layers / blocks connected in series). Generally, the encoder 52 and the decoder 54 each include a plurality of neural network layers, at least one of which may be a self-attention layer. The parameters of the neural network layers may be referred to as the parameters of the language model.

[0078] The transformer 50 may be trained on a text corpus that is labelled (e.g., annotated to indicate verbs, nouns, etc.) or unlabelled. LLMs may be trained on a large unlabelled corpus. Some LLMs may be trained on a large multi-language, multi-domain corpus, to enable the model to be versatile at a variety of languagebased tasks such as generative tasks (e.g., generating human-like natural language responses to natural language input).

[0079] An example of how the transformer 50 may process textual input data is now described. Input to a language model (whether transformer-based or otherwise) typically is in the form of natural language as may be parsed into tokens. It should be appreciated that the term “token” in the context of language models and NLP has a different meaning from the use of the same term in other contexts such as data security. Tokenization, in the context of language models and NLP, refers to the process of parsing textual input (e.g., a character, a word, a phrase, a sentence, a paragraph, etc.) into a sequence of shorter segments that are converted to numerical representations referred to as tokens (or “compute tokens”). Typically, a token may be an integer that corresponds to the index of a text segment (e.g., a word) in a vocabulary dataset. Often, the vocabulary dataset is arranged by frequency of use. Commonly occurring text, such as punctuation, may have a lower vocabulary index in the dataset and thus be represented by a token having a smaller integer value than less commonly occurring text. Tokens frequently correspond to words, with or without whitespace appended. In some examples, a token may correspond to a portion of a word. For example, the word “lower” may be represented by a token for [low] and a second token for [er]. In another example, the text sequence “Comehere, look!” may be parsed into the segments [Come], [here], [,], [look] and [!], each of which may be represented by a respective numerical token. In addition to tokens that are parsed from the textual sequence (e.g., tokens that correspond to words and punctuation), there may also be special tokens to encode non-textual information. For example, a [CLASS] token may be a special token that corresponds to a classification of the textual sequence (e.g., may classify the textual sequence as a poem, a list, a paragraph, etc.), a [EOT] token may be another special token that indicates the end of the textual sequence, other tokens may provide formatting information, etc.

[0080] In FIG. 1 B, a short sequence of tokens 56 corresponding to the text sequence “Come here, look!” is illustrated as input to the transformer 50. Tokenization of the text sequence into the tokens 56 may be performed by some pre-processing tokenization module such as, for example, a byte pair encoding tokenizer (the “pre” referring to the tokenization occurring prior to the processing of the tokenized input by the LLM), which is not shown in FIG. 1 B for simplicity. In general, the token sequence that is inputted to the transformer 50 may be of any length up to a maximum length defined based on the dimensions of the transformer 50 (e.g., such a limit may be 2048 tokens in some LLMs). Each token 56 in the token sequence is converted into an embedding vector 60 (also referred to simply as an embedding). An embedding 60 is a learned numerical representation (such as, for example, a vector) of a token that captures some semantic meaning of the text segment represented by the token 56. The embedding 60 represents the text segment corresponding to the token 56 in a way such that embeddings corresponding to semantically-related text are closer to each other in a vector space than embeddings corresponding to semantically-unrelated text. For example, assuming that the words “look”, “see”, and “cake” each correspond to, respectively, a “look” token, a “see” token, and a “cake” token when tokenized, the embedding 60 corresponding to the “look” token will be closer to another embedding corresponding to the “see” token in the vector space, as compared to the distance between the embedding 60 corresponding to the “look” token and another embedding corresponding to the “cake” token. The vector space may be defined by the dimensions and values of the embedding vectors. Various techniques may be used to convert a token 56 to an embedding 60. For example, another trained ML model may be used to convert thetoken 56 into an embedding 60. In particular, another trained ML model may be used to convert the token 56 into an embedding 60 in a way that encodes additional information into the embedding 60 (e.g., a trained ML model may encode positional information about the position of the token 56 in the text sequence into the embedding 60). In some examples, the numerical value of the token 56 may be used to look up the corresponding embedding in an embedding matrix 58 (which may be learned during training of the transformer 50).

[0081] The generated embeddings 60 are input into the encoder 52. The encoder 52 serves to encode the embeddings 60 into feature vectors 62 that represent the latent features of the embeddings 60. The encoder 52 may encode positional information (i.e. , information about the sequence of the input) in the feature vectors 62. The feature vectors 62 may have very high dimensionality (e.g., on the order of thousands or tens of thousands), with each element in a feature vector 62 corresponding to a respective feature. The numerical weight of each element in a feature vector 62 represents the importance of the corresponding feature. The space of all possible feature vectors 62 that can be generated by the encoder 52 may be referred to as the latent space or feature space.

[0082] Conceptually, the decoder 54 is designed to map the features represented by the feature vectors 62 into meaningful output, which may depend on the task that was assigned to the transformer 50. For example, if the transformer 50 is used for a translation task, the decoder 54 may map the feature vectors 62 into text output in a target language different from the language of the original tokens 56. Generally, in a generative language model, the decoder 54 serves to decode the feature vectors 62 into a sequence of tokens. The decoder 54 may generate output tokens 64 one by one. Each output token 64 may be fed back as input to the decoder 54 in order to generate the next output token 64. By feeding back the generated output and applying self-attention, the decoder 54 is able to generate a sequence of output tokens 64 that has sequential meaning (e.g., the resulting output text sequence is understandable as a sentence and obeys grammatical rules). The decoder 54 may generate output tokens 64 until a special [EOT] token (indicating the end of the text) is generated. The resulting sequence of output tokens 64 may then be converted toa text sequence in post-processing. For example, each output token 64 may be an integer number that corresponds to a vocabulary index. By looking up the text segment using the vocabulary index, the text segment corresponding to each output token 64 can be retrieved, the text segments can be concatenated together and the final output text sequence (in this example, “Viens ici, regarde!”) can be obtained.

[0083] Although a general transformer architecture for a language model and its theory of operation have been described above, this is not intended to be limiting. Existing language models include language models that are based only on the encoder of the transformer or only on the decoder of the transformer. An encoder- only language model encodes the input text sequence into feature vectors that can then be further processed by a task-specific layer (e.g., a classification layer). BERT is an example of a language model that may be considered to be an encoder-only language model. A decoder-only language model accepts embeddings as input and may use auto-regression to generate an output text sequence. Transformer-XL and GPT-type models may be language models that are considered to be decoder-only language models.

[0084] Because GPT-type language models tend to have a large number of parameters, these language models may be considered LLMs. An example GPT- type LLM is GPT-3. GPT-3 is a type of GPT language model that has been trained (in an unsupervised manner) on a large corpus derived from documents available to the public online. GPT-3 has a very large number of learned parameters (on the order of hundreds of billions), is able to accept a large number of tokens as input (e.g., up to 2048 input tokens), and is able to generate a large number of tokens as output (e.g., up to 2048 tokens). GPT-3 has been trained as a generative model, meaning that it can process input text sequences to predictively generate a meaningful output text sequence. ChatGPT is built on top of a GPT-type LLM, and has been fine-tuned with training datasets based on text-based chats (e.g., chatbot conversations). ChatGPT is designed for processing natural language, receiving chat-like inputs and generating chat-like outputs.

[0085] A computing system may access a remote language model (e.g., a cloudbased language model), such as ChatGPT or GPT-3, via a software interface (e.g., an application programming interface (API)). Additionally or alternatively, such a remote language model may be accessed via a network such as, for example, the Internet. In some implementations such as, for example, potentially in the case of a cloud-based language model, a remote language model may be hosted by a computer system as may include a plurality of cooperating (e.g., cooperating via a network) computer systems such as may be in, for example, a distributed arrangement. Notably, a remote language model may employ a plurality of processors (e.g., hardware processors such as, for example, processors of cooperating computer systems). Indeed, processing of inputs by an LLM may be computationally expensive / may involve a large number of operations (e.g., many instructions may be executed / large data structures may be accessed from memory) and providing output in a required timeframe (e.g., real-time or near real-time) may require the use of a plurality of processors / cooperating computing devices as discussed above.

[0086] Inputs to an LLM may be referred to as a prompt, which is a natural language input that includes instructions to the LLM to generate a desired output. A computing system may generate a prompt that is provided as input to the LLM via its API. As described above, the prompt may optionally be processed or pre-processed into a token sequence prior to being provided as input to the LLM via its API. A prompt can include one or more examples of the desired output, which provides the LLM with additional information to enable the LLM to better generate output according to the desired output. Additionally or alternatively, the examples included in a prompt may provide inputs (e.g., example inputs) corresponding to / as may be expected to result in the desired outputs provided. A one-shot prompt refers to a prompt that includes one example, and a few-shot prompt refers to a prompt that includes multiple examples. A prompt that includes no examples may be referred to as a zero-shot prompt.

[0087] FIG. 2 illustrates an example computing system 400, which may be used to implement examples of the present disclosure, such as a prompt generation engineto generate prompts to be provided as input to a language model such as a LLM. Additionally or alternatively, one or more instances of the example computing system 400 may be employed to execute the LLM. For example, a plurality of instances of the example computing system 400 may cooperate to provide output using an LLM in manners as discussed above.

[0088] The example computing system 400 includes at least one processing unit, such as a processor 402, and at least one physical memory 404. The processor 402 may be, for example, a central processing unit, a microprocessor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a dedicated logic circuitry, a dedicated artificial intelligence processor unit, a graphics processing unit (GPU), a tensor processing unit (TPU), a neural processing unit (NPU), a hardware accelerator, or combinations thereof. The memory 404 may include a volatile or non-volatile memory (e.g., a flash memory, a random access memory (RAM), and / or a read-only memory (ROM)). The memory 404 may store instructions for execution by the processor 402, to the computing system 400 to carry out examples of the methods, functionalities, systems and modules disclosed herein.

[0089] The computing system 400 may also include at least one network interface 406 for wired and / or wireless communications with an external system and / or network (e.g., an intranet, the Internet, a P2P network, a WAN and / or a LAN). A network interface may enable the computing system 400 to carry out communications (e.g., wireless communications) with systems external to the computing system 400, such as a language model residing on a remote system.

[0090] The computing system 400 may optionally include at least one input / output (I / O) interface 408, which may interface with optional input device(s) 410 and / or optional output device(s) 412. Input device(s) 410 may include, for example, buttons, a microphone, a touchscreen, a keyboard, etc. Output device(s) 412 may include, for example, a display, a speaker, etc. In this example, optional input device(s) 410 and optional output device(s) 412 are shown external to the computing system 400. Inother examples, one or more of the input device(s) 410 and / or output device(s) 412 may be an internal component of the computing system 400.

[0091] A computing system, such as the computing system 400 of FIG. 2, may access a remote system (e.g., a cloud-based system) to communicate with a remote language model or LLM hosted on the remote system such as, for example, using an application programming interface (API) call. The API call may include an API key to enable the computing system to be identified by the remote system. The API call may also include an identification of the language model or LLM to be accessed and / or parameters for adjusting outputs generated by the language model or LLM, such as, for example, one or more of a temperature parameter (which may control the amount of randomness or “creativity” of the generated output) (and / or, more generally some form of random seed as serves to introduce variability or variety into the output of the LLM), a minimum length of the output (e.g., a minimum of 10 tokens) and / or a maximum length of the output (e.g., a maximum of 1000 tokens), a frequency penalty parameter (e.g., a parameter which may lower the likelihood of subsequently outputting a word based on the number of times that word has already been output), a “best of” parameter (e.g., a parameter to control the number of times the model will use to generate output after being instructed to, e.g., produce several outputs based on slightly varied inputs). The prompt generated by the computing system is provided to the language model or LLM and the output (e.g., token sequence) generated by the language model or LLM is communicated back to the computing system. In other examples, the prompt may be provided directly to the language model or LLM without requiring an API call. For example, the prompt could be sent to a remote LLM via a network such as, for example, as or in message (e.g., in a payload of a message).

[0092] An example e-commerce platform

[0093] Although integration with a commerce platform is not required, in some embodiments, the methods disclosed herein may be performed on or in association with a commerce platform such as an e-commerce platform. Therefore, an example of a commerce platform will be described.

[0094] FIG. 3 illustrates an example e-commerce platform 100, according to one embodiment. The e-commerce platform 100 may be used to provide merchant products and services to customers. While the disclosure contemplates using the apparatus, system, and process to purchase products and services, for simplicity the description herein will refer to products. All references to products throughout this disclosure should also be understood to be references to products and / or services, including, for example, physical products, digital content (e.g., music, videos, games), software, tickets, subscriptions, services to be provided, and the like.

[0095] While the disclosure throughout contemplates that a ‘merchant’ and a ‘customer’ may be more than individuals, for simplicity the description herein may generally refer to merchants and customers as such. All references to merchants and customers throughout this disclosure should also be understood to be references to groups of individuals, companies, corporations, computing entities, and the like, and may represent for-profit or not-for-profit exchange of products. Further, while the disclosure throughout refers to ‘merchants’ and ‘customers’, and describes their roles as such, the e-commerce platform 100 should be understood to more generally support users in an e-commerce environment, and all references to merchants and customers throughout this disclosure should also be understood to be references to users, such as where a user is a merchant-user (e.g., a seller, retailer, wholesaler, or provider of products), a customer-user (e.g., a buyer, purchase agent, consumer, or user of products), a prospective user (e.g., a user browsing and not yet committed to a purchase, a user evaluating the e-commerce platform 100 for potential use in marketing and selling products, and the like), a service provider user (e.g., a shipping provider 112, a financial provider, and the like), a company or corporate user (e.g., a company representative for purchase, sales, or use of products; an enterprise user; a customer relations or customer management agent, and the like), an information technology user, a computing entity user (e.g., a computing bot for purchase, sales, or use of products), and the like. Furthermore, it may be recognized that while a given user may act in a given role (e.g., as a merchant) and their associated device may be referred to accordingly (e.g., as a merchant device) in one context, that same individual may act in a different role in another context (e.g., as a customer) and that same or another associated device may be referred to accordingly (e.g., as a customer device). Forexample, an individual may be a merchant for one type of product (e.g., shoes), and a customer / consumer of other types of products (e.g., groceries). In another example, an individual may be both a consumer and a merchant of the same type of product. In a particular example, a merchant that trades in a particular category of goods may act as a customer for that same category of goods when they order from a wholesaler (the wholesaler acting as merchant).

[0096] The e-commerce platform 100 provides merchants with online services / facilities to manage their business. The facilities described herein are shown implemented as part of the platform 100 but could also be configured separately from the platform 100, in whole or in part, as stand-alone services. Furthermore, such facilities may, in some embodiments, may, additionally or alternatively, be provided by one or more providers / entities.

[0097] In the example of FIG. 3, the facilities are deployed through a machine, service or engine that executes computer software, modules, program codes, and / or instructions on one or more processors which, as noted above, may be part of or external to the platform 100. Merchants may utilize the e-commerce platform 100 for enabling or managing commerce with customers, such as by implementing an e- commerce experience with customers through an online store 138, applications 142A-B, channels 110A-B, and / or through point of sale (POS) devices 152 in physical locations (e.g., a physical storefront or other location such as through a kiosk, terminal, reader, printer, 3D printer, and the like). A merchant may utilize the e-commerce platform 100 as a sole commerce presence with customers, or in conjunction with other merchant commerce facilities, such as through a physical store (e.g., ‘brick-and-mortar’ retail stores), a merchant off-platform website 104 (e.g., a commerce Internet website or other internet or web property or asset supported by or on behalf of the merchant separately from the e-commerce platform 100), an application 142B, and the like. However, even these ‘other’ merchant commerce facilities may be incorporated into or communicate with the e-commerce platform 100, such as where POS devices 152 in a physical store of a merchant are linked into the e-commerce platform 100, where a merchant off-platform website 104 is tied into the e-commerce platform 100, such as, for example, through ‘buy buttons’that link content from the merchant off platform website 104 to the online store 138, or the like.

[0098] The online store 138 may represent a multi-tenant facility comprising a plurality of virtual storefronts. In embodiments, merchants may configure and / or manage one or more storefronts in the online store 138, such as, for example, through a merchant device 102 (e.g., computer, laptop computer, mobile computing device, and the like), and offer products to customers through a number of different channels 110A-B (e.g., an online store 138; an application 142A-B; a physical storefront through a POS device 152; an electronic marketplace, such, for example, through an electronic buy button integrated into a website or social media channel such as on a social network, social media page, social media messaging system; and / or the like). A merchant may sell across channels 110A-B and then manage their sales through the e-commerce platform 100, where channels 110A may be provided as a facility or service internal or external to the e-commerce platform 100. A merchant may, additionally or alternatively, sell in their physical retail store, at pop ups, through wholesale, over the phone, and the like, and then manage their sales through the e-commerce platform 100. A merchant may employ all or any combination of these operational modalities. Notably, it may be that by employing a variety of and / or a particular combination of modalities, a merchant may improve the probability and / or volume of sales. Throughout this disclosure the terms online store 138 and storefront may be used synonymously to refer to a merchant’s online e- commerce service offering through the e-commerce platform 100, where an online store 138 may refer either to a collection of storefronts supported by the e-commerce platform 100 (e.g., for one or a plurality of merchants) or to an individual merchant’s storefront (e.g., a merchant’s online store).

[0099] In some embodiments, a customer may interact with the platform 100 through a customer device 150 (e.g., computer, laptop computer, mobile computing device, or the like), a POS device 152 (e.g., retail device, kiosk, automated (self-service) checkout system, or the like), and / or any other commerce interface device known in the art. The e-commerce platform 100 may enable merchants to reach customers through the online store 138, through applications 142A-B, through POS devices 152 in physical locations (e.g., a merchant’s storefront or elsewhere), tocommunicate with customers via electronic communication facility 129, and / or the like so as to provide a system for reaching customers and facilitating merchant services for the real or virtual pathways available for reaching and interacting with customers.

[0100] In some embodiments, and as described further herein, the e-commerce platform 100 may be implemented through a processing facility. Such a processing facility may include a processor and a memory. The processor may be a hardware processor. The memory may be and / or may include a non-transitory computer- readable medium. The memory may be and / or may include random access memory (RAM) and / or persisted storage (e.g., magnetic storage). The processing facility may store a set of instructions (e.g., in the memory) that, when executed, cause the e- commerce platform 100 to perform the e-commerce and support functions as described herein. The processing facility may be or may be a part of one or more of a server, client, network infrastructure, mobile computing platform, cloud computing platform, stationary computing platform, and / or some other computing platform, and may provide electronic connectivity and communications between and amongst the components of the e-commerce platform 100, merchant devices 102, payment gateways 106, applications 142A-B, channels 110A-B, shipping providers 112, customer devices 150, point of sale devices 152, etc.. In some implementations, the processing facility may be or may include one or more such computing devices acting in concert. For example, it may be that a plurality of co-operating computing devices serves as / to provide the processing facility. The e-commerce platform 100 may be implemented as or using one or more of a cloud computing service, software as a service (SaaS), infrastructure as a service (laaS), platform as a service (PaaS), desktop as a service (DaaS), managed software as a service (MsaaS), mobile backend as a service (MbaaS), information technology management as a service (ITMaaS), and / or the like. For example, it may be that the underlying software implementing the facilities described herein (e.g., the online store 138) is provided as a service, and is centrally hosted (e.g., and then accessed by users via a web browser or other application, and / or through customer devices 150, POS devices 152, and / or the like). In some embodiments, elements of the e-commerce platform 100 may be implemented to operate and / or integrate with various other platforms and operating systems.

[0101] In some embodiments, the facilities of the e-commerce platform 100 (e.g., the online store 138) may serve content to a customer device 150 (using data 134) such as, for example, through a network connected to the e-commerce platform 100. For example, the online store 138 may serve or send content in response to requests for data 134 from the customer device 150, where a browser (or other application) connects to the online store 138 through a network using a network communication protocol (e.g., an internet protocol). The content may be written in machine readable language and may include Hypertext Markup Language (HTML), template language, JavaScript, and the like, and / or any combination thereof.

[0102] In some embodiments, online store 138 may be or may include service instances that serve content to customer devices and allow customers to browse and purchase the various products available (e.g., add them to a cart, purchase through a buy-button, and the like). Merchants may also customize the look and feel of their website through a theme system, such as, for example, a theme system where merchants can select and change the look and feel of their online store 138 by changing their theme while having the same underlying product and business data shown within the online store’s product information. It may be that themes can be further customized through a theme editor, a design interface that enables users to customize their website’s design with flexibility. Additionally or alternatively, it may be that themes can, additionally or alternatively, be customized using theme-specific settings such as, for example, settings as may change aspects of a given theme, such as, for example, specific colors, fonts, and pre-built layout schemes. In some implementations, the online store may implement a content management system for website content. Merchants may employ such a content management system in authoring blog posts or static pages and publish them to their online store 138, such as through blogs, articles, landing pages, and the like, as well as configure navigation menus. Merchants may upload images (e.g., for products), video, content, data, and the like to the e-commerce platform 100, such as for storage by the system (e.g., as data 134). In some embodiments, the e-commerce platform 100 may provide functions for manipulating such images and content such as, for example, functions for resizing images, associating an image with a product, adding andassociating text with an image, adding an image for a new product variant, protecting images, and the like.

[0103] As described herein, the e-commerce platform 100 may provide merchants with sales and marketing services for products through a number of different channels 110A-B, including, for example, the online store 138, applications 142A-B, as well as through physical POS devices 152 as described herein. The e-commerce platform 100 may, additionally or alternatively, include business support services 116, an administrator 114, a warehouse management system, and the like associated with running an on-line business, such as, for example, one or more of providing a domain registration service 118 associated with their online store, payment services 120 for facilitating transactions with a customer, shipping services 122 for providing customer shipping options for purchased products, fulfillment services for managing inventory, risk and insurance services 124 associated with product protection and liability, merchant billing, and the like. Services 116 may be provided via the e-commerce platform 100 or in association with external facilities, such as through a payment gateway 106 for payment processing, shipping providers 112 for expediting the shipment of products, and the like.

[0104] In some embodiments, the e-commerce platform 100 may be configured with shipping services 122 (e.g., through an e-commerce platform shipping facility or through a third-party shipping carrier), to provide various shipping-related information to merchants and / or their customers such as, for example, shipping label or rate information, real-time delivery updates, tracking, and / or the like.

[0105] FIG. 4 depicts a non-limiting embodiment for a home page of an administrator 114. The administrator 114 may be referred to as an administrative console and / or an administrator console. The administrator 114 may show information about daily tasks, a store’s recent activity, and the next steps a merchant can take to build their business. In some embodiments, a merchant may log in to the administrator 114 via a merchant device 102 (e.g., a desktop computer or mobile device), and manage aspects of their online store 138, such as, for example, viewing the online store’s 138 recent visit or order activity, updating the online store’s 138 catalog, managing orders, and / or the like. In some embodiments, the merchant may be able to accessthe different sections of the administrator 114 by using a sidebar, such as the one shown on FIG. 4. Sections of the administrator 114 may include various interfaces for accessing and managing core aspects of a merchant’s business, including orders, products, customers, available reports and discounts. The administrator 114 may, additionally or alternatively, include interfaces for managing sales channels for a store including the online store 138, mobile application(s) made available to customers for accessing the store (Mobile App), POS devices, and / or a buy button. The administrator 114 may, additionally or alternatively, include interfaces for managing applications (apps) installed on the merchant’s account; and settings applied to a merchant’s online store 138 and account. A merchant may use a search bar to find products, pages, or other information in their store.

[0106] More detailed information about commerce and visitors to a merchant’s online store 138 may be viewed through reports or metrics. Reports may include, for example, acquisition reports, behavior reports, customer reports, finance reports, marketing reports, sales reports, product reports, and custom reports. The merchant may be able to view sales data for different channels 110A-B from different periods of time (e.g., days, weeks, months, and the like), such as by using drop-down menus. An overview dashboard may also be provided for a merchant who wants a more detailed view of the store’s sales and engagement data. An activity feed in the home metrics section may be provided to illustrate an overview of the activity on the merchant’s account. For example, by clicking on a ‘view all recent activity’ dashboard button, the merchant may be able to see a longer feed of recent activity on their account. A home page may show notifications about the merchant’s online store 138, such as based on account status, growth, recent customer activity, order updates, and the like. Notifications may be provided to assist a merchant with navigating through workflows configured for the online store 138, such as, for example, a payment workflow, an order fulfillment workflow, an order archiving workflow, a return workflow, and the like.

[0107] The e-commerce platform 100 may provide for a communications facility 129 and associated merchant interface for providing electronic communications and marketing, such as utilizing an electronic messaging facility for collecting and analyzing communication interactions between merchants, customers, merchantdevices 102, customer devices 150, POS devices 152, and the like, to aggregate and analyze the communications, such as for increasing sale conversions, and the like. For instance, a customer may have a question related to a product, which may produce a dialog between the customer and the merchant (or an automated processor-based agent / chatbot representing the merchant), where the communications facility 129 is configured to provide automated responses to customer requests and / or provide recommendations to the merchant on how to respond such as, for example, to improve the probability of a sale.

[0108] The e-commerce platform 100 may provide a financial facility 120 for secure financial transactions with customers, such as through a secure card server environment. The e-commerce platform 100 may store credit card information, such as in payment card industry data (PCI) environments (e.g., a card server), to reconcile financials, bill merchants, perform automated clearing house (ACH) transfers between the e-commerce platform 100 and a merchant’s bank account, and the like. The financial facility 120 may also provide merchants and buyers with financial support, such as through the lending of capital (e.g., lending funds, cash advances, and the like) and provision of insurance. In some embodiments, online store 138 may support a number of independently administered storefronts and process a large volume of transactional data on a daily basis for a variety of products and services. Transactional data may include any customer information indicative of a customer, a customer account or transactions carried out by a customer such as. For example, contact information, billing information, shipping information, returns / refund information, discount / offer information, payment information, or online store events or information such as page views, product search information (search keywords, click-through events), product reviews, abandoned carts, and / or other transactional information associated with business through the e-commerce platform 100. In some embodiments, the e-commerce platform 100 may store this data in a data facility 134. Referring again to FIG. 3, in some embodiments the e-commerce platform 100 may include a commerce management engine 136 such as may be configured to perform various workflows for task automation or content management related to products, inventory, customers, orders, suppliers, reports, financials, risk and fraud, and the like. In some embodiments, additional functionality may, additionally or alternatively, be provided through applications 142A-B to enablegreater flexibility and customization required for accommodating an ever-growing variety of online stores, POS devices, products, and / or services. Applications 142A may be components of the e-commerce platform 100 whereas applications 142B may be provided or hosted as a third-party service external to e-commerce platform 100. The commerce management engine 136 may accommodate store-specific workflows and in some embodiments, may incorporate the administrator 114 and / or the online store 138.

[0109] lmplementing functions as applications 142A-B may enable the commerce management engine 136 to remain responsive and reduce or avoid service degradation or more serious infrastructure failures, and the like.

[0110] Although isolating online store data can be important to maintaining data privacy between online stores 138 and merchants, there may be reasons for collecting and using cross-store data, such as, for example, with an order risk assessment system or a platform payment facility, both of which require information from multiple online stores 138 to perform well. In some embodiments, it may be preferable to move these components out of the commerce management engine 136 and into their own infrastructure within the e-commerce platform 100.

[0111] Platform payment facility 120 is an example of a component that utilizes data from the commerce management engine 136 but is implemented as a separate component or service. The platform payment facility 120 may allow customers interacting with online stores 138 to have their payment information stored safely by the commerce management engine 136 such that they only have to enter it once. When a customer visits a different online store 138, even if they have never been there before, the platform payment facility 120 may recall their information to enable a more rapid and / or potentially less-error prone (e.g., through avoidance of possible mis-keying of their information if they needed to instead re-enter it) checkout. This may provide a cross-platform network effect, where the e-commerce platform 100 becomes more useful to its merchants and buyers as more merchants and buyers join, such as because there are more customers who checkout more often because of the ease of use with respect to customer purchases. To maximize the effect of thisnetwork, payment information for a given customer may be retrievable and made available globally across multiple online stores 138.

[0112] For functions that are not included within the commerce management engine 136, applications 142A-B provide a way to add features to the e-commerce platform 100 or individual online stores 138. For example, applications 142A-B may be able to access and modify data on a merchant’s online store 138, perform tasks through the administrator 114, implement new flows for a merchant through a user interface (e.g., that is surfaced through extensions / API), and the like. Merchants may be enabled to discover and install applications 142A-B through application search, recommendations, and support 128. In some embodiments, the commerce management engine 136, applications 142A-B, and the administrator 114 may be developed to work together. For instance, application extension points may be built inside the commerce management engine 136, accessed by applications 142A and 142B through the interfaces 140B and 140A to deliver additional functionality, and surfaced to the merchant in the user interface of the administrator 114.

[0113] In some embodiments, applications 142A-B may deliver functionality to a merchant through the interface 140A-B, such as where an application 142A-B is able to surface transaction data to a merchant (e.g., App: “Engine, surface my app data in the Mobile App or administrator 114”), and / or where the commerce management engine 136 is able to ask the application to perform work on demand (Engine: “App, give me a local tax calculation for this checkout”).

[0114] Applications 142A-B may be connected to the commerce management engine 136 through an interface 140A-B (e.g., through REST (Representational State Transfer) and / or GraphQL APIs) to expose the functionality and / or data available through and within the commerce management engine 136 to the functionality of applications. For instance, the e-commerce platform 100 may provide API interfaces 140A-B to applications 142A-B which may connect to products and services external to the platform 100. The flexibility offered through use of applications and APIs (e.g., as offered for application development) enable the e- commerce platform 100 to better accommodate new and unique needs of merchants or to address specific use cases without requiring constant change to the commercemanagement engine 136. For instance, shipping services 122 may be integrated with the commerce management engine 136 through a shipping or carrier service API, thus enabling the e-commerce platform 100 to provide shipping service functionality without directly impacting code running in the commerce management engine 136.

[0115] Depending on the implementation, applications 142A-B may utilize APIs to pull data on demand (e.g., customer creation events, product change events, or order cancelation events, etc.) or have the data pushed when updates occur. A subscription model may be used to provide applications 142A-B with events as they occur or to provide updates with respect to a changed state of the commerce management engine 136. In some embodiments, when a change related to an update event subscription occurs, the commerce management engine 136 may post a request, such as to a predefined callback URL. The body of this request may contain a new state of the object and a description of the action or event. Update event subscriptions may be created manually, in the administrator facility 114, or automatically (e.g., via the API 140A-B). In some embodiments, update events may be queued and processed asynchronously from a state change that triggered them, which may produce an update event notification that is not distributed in real-time or near-real time.

[0116] In some embodiments, the e-commerce platform 100 may provide one or more of application search, recommendation and support 128. Application search, recommendation and support 128 may include developer products and tools to aid in the development of applications, an application dashboard (e.g., to provide developers with a development interface, to administrators for management of applications, to merchants for customization of applications, and the like), facilities for installing and providing permissions with respect to providing access to an application 142A-B (e.g., for public access, such as where criteria must be met before being installed, or for private use by a merchant), application searching to make it easy for a merchant to search for applications 142A-B that satisfy a need for their online store 138, application recommendations to provide merchants with suggestions on how they can improve the user experience through their online store 138, and the like. In some embodiments, applications 142A-B may be assigned anapplication identifier (ID), such as for linking to an application (e.g., through an API), searching for an application, making application recommendations, and the like.

[0117] Applications 142A-B may be grouped roughly into three categories: customerfacing applications, merchant-facing applications, integration applications, and the like. Customer-facing applications 142A-B may include an online store 138 or channels 110A-B that are places where merchants can list products and have them purchased (e.g., the online store, applications for flash sales (e.g., merchant products or from opportunistic sales opportunities from third-party sources), a mobile store application, a social media channel, an application for providing wholesale purchasing, and the like). Merchant-facing applications 142A-B may include applications that allow the merchant to administer their online store 138 (e.g., through applications related to the web or website or to mobile devices), run their business (e.g., through applications related to POS devices), to grow their business (e.g., through applications related to shipping (e.g., drop shipping), use of automated agents, use of process flow development and improvements), and the like.Integration applications may include applications that provide useful integrations that participate in the running of a business, such as shipping providers 112 and payment gateways 106.

[0118] As such, the e-commerce platform 100 can be configured to provide an online shopping experience through a flexible system architecture that enables merchants to connect with customers in a flexible and transparent manner. A typical customer experience may be better understood through an embodiment example purchase workflow, where the customer browses the merchant’s products on a channel 110A- B, adds what they intend to buy to their cart, proceeds to checkout, and pays for the content of their cart resulting in the creation of an order for the merchant. The merchant may then review and fulfill (or cancel) the order. The product is then delivered to the customer. If the customer is not satisfied, they might return the products to the merchant.

[0119] In an example embodiment, a customer may browse a merchant’s products through a number of different channels 110A-B such as, for example, the merchant’s online store 138, a physical storefront through a POS device 152; an electronicmarketplace, through an electronic buy button integrated into a website or a social media channel). In some cases, channels 110A-B may be modeled as applications 142A-B. A merchandising component in the commerce management engine 136 may be configured for creating, and managing product listings (using product data objects or models for example) to allow merchants to describe what they want to sell and where they sell it. The association between a product listing and a channel may be modeled as a product publication and accessed by channel applications, such as via a product listing API. A product may have many attributes and / or characteristics, like size and color, and many variants that expand the available options into specific combinations of all the attributes, like a variant that is size extra-small and green, or a variant that is size large and blue. Products may have at least one variant (e.g., a “default variant”) created for a product without any options. To facilitate browsing and management, products may be grouped into collections, provided product identifiers (e.g., stock keeping unit (SKU)) and the like. Collections of products may be built by either manually categorizing products into one (e.g., a custom collection), by building rulesets for automatic classification (e.g., a smart collection), and the like. Product listings may include 2D images, 3D images or models, which may be viewed through a virtual or augmented reality interface, and the like.

[0120] In some embodiments, a shopping cart object is used to store or keep track of the products that the customer intends to buy. The shopping cart object may be channel specific and can be composed of multiple cart line items, where each cart line item tracks the quantity for a particular product variant. Since adding a product to a cart does not imply any commitment from the customer or the merchant, and the expected lifespan of a cart may be in the order of minutes (not days), cart objects / data representing a cart may be persisted to an ephemeral data store.

[0121] The customer then proceeds to checkout. A checkout object or page generated by the commerce management engine 136 may be configured to receive customer information to complete the order such as the customer’s contact information, billing information and / or shipping details. If the customer inputs their contact information but does not proceed to payment, the e-commerce platform 100 may (e.g., via an abandoned checkout component) transmit a message to the customer device 150 to encourage the customer to complete the checkout. For thosereasons, checkout objects can have much longer lifespans than cart objects (hours or even days) and may therefore be persisted. Customers then pay for the content of their cart resulting in the creation of an order for the merchant. In some embodiments, the commerce management engine 136 may be configured to communicate with various payment gateways and services 106 (e.g., online payment systems, mobile payment systems, digital wallets, credit card gateways) via a payment processing component. The actual interactions with the payment gateways 106 may be provided through a card server environment. At the end of the checkout process, an order is created. An order is a contract of sale between the merchant and the customer where the merchant agrees to provide the goods and services listed on the order (e.g., order line items, shipping line items, and the like) and the customer agrees to provide payment (including taxes). Once an order is created, an order confirmation notification may be sent to the customer and an order placed notification sent to the merchant via a notification component. Inventory may be reserved when a payment processing job starts to avoid over-selling (e.g., merchants may control this behavior using an inventory policy or configuration for each variant). Inventory reservation may have a short time span (minutes) and may need to be fast and scalable to support flash sales or “drops”, which are events during which a discount, promotion or limited inventory of a product may be offered for sale for buyers in a particular location and / or for a particular (usually short) time. The reservation is released if the payment fails. When the payment succeeds, and an order is created, the reservation is converted into a permanent (long-term) inventory commitment allocated to a specific location. An inventory component of the commerce management engine 136 may record where variants are stocked, and may track quantities for variants that have inventory tracking enabled. It may decouple product variants (a customer-facing concept representing the template of a product listing) from inventory items (a merchant-facing concept that represents an item whose quantity and location is managed). An inventory level component may keep track of quantities that are available for sale, committed to an order or incoming from an inventory transfer component (e.g., from a vendor).

[0122] The merchant may then review and fulfill (or cancel) the order. A review component of the commerce management engine 136 may implement a business process merchant’s use to ensure orders are suitable for fulfillment before actuallyfulfilling them. Orders may be fraudulent, require verification (e.g., ID checking), have a payment method which requires the merchant to wait to make sure they will receive their funds, and the like. Risks and recommendations may be persisted in an order risk model. Order risks may be generated from a fraud detection tool, submitted by a third-party through an order risk API, and the like. Before proceeding to fulfillment, the merchant may need to capture the payment information (e.g., credit card information) or wait to receive it (e.g., via a bank transfer, check, and the like) before it marks the order as paid. The merchant may now prepare the products for delivery. In some embodiments, this business process may be implemented by a fulfillment component of the commerce management engine 136. The fulfillment component may group the line items of the order into a logical fulfillment unit of work based on an inventory location and fulfillment service. The merchant may review, adjust the unit of work, and trigger the relevant fulfillment services, such as through a manual fulfillment service (e.g., at merchant managed locations) used when the merchant picks and packs the products in a box, purchase a shipping label and input its tracking number, or just mark the item as fulfilled. Alternatively, an API fulfillment service may trigger a third-party application or service to create a fulfillment record for a third-party fulfillment service. Other possibilities exist for fulfilling an order. If the customer is not satisfied, they may be able to return the product(s) to the merchant. The business process merchants may go through to “un-sell” an item may be implemented by a return component. Returns may consist of a variety of different actions, such as a restock, where the product that was sold actually comes back into the business and is sellable again; a refund, where the money that was collected from the customer is partially or fully returned; an accounting adjustment noting how much money was refunded (e.g., including if there was any restocking fees or goods that weren’t returned and remain in the customer’s hands); and the like. A return may represent a change to the contract of sale (e.g., the order), and where the e- commerce platform 100 may make the merchant aware of compliance issues with respect to legal obligations (e.g., with respect to taxes). In some embodiments, the e-commerce platform 100 may enable merchants to keep track of changes to the contract of sales over time, such as implemented through a sales model component (e.g., an append-only date-based ledger that records sale-related events that happened to an item).

[0123] Rendering Asynchronous Data

[0124] When interacting with large language model chat bots, various user interface problems may exist. A first problem relates to the rendering of data that has not yet been properly formed. A second problem relates to a response delay.

[0125] For example, reference is now made to Figure 5. In the example of Figure 5, a user may use an interface 510 to ask a large language model for a history of potato chips. The LLM (for example using an LLM Client) may find an article related to the question, and provide a link to the article to the user. However, based on rendering rules, the link may appear as raw HyperText markup language, as shown at response 520, until it is fully resolved.

[0126] Once resolved, the output may switch to the interface 610 of Figure 6, which shows the properly rendered link in response 620.

[0127] Thus a first issue may be displaying information before it is fully rendered.

[0128] With regard to the issue of delay, a busy icon may show on interface 510 before any of response 520 is displayed. This may be frustrating to a user as the user has no idea how long the delay may be. Specifically, classical Tool invocation involves one or more additional LLM loops that cause the end user to wait for a response.

[0129] Both issues may be jarring for a user interacting with the system.

[0130] Therefore, in accordance with some embodiments of the present disclosure, a buffering parser and an event emitter are provided. Specifically, with regard to the embodiments of the present disclosure, with remote and / or asynchronous tools (presented as content containers) the ability is gained to start streaming a preamble to the end user from the get-go, while the content container receives content asynchronously.

[0131] Multiple streams and events may be multiplexed into one stream that renders piece-by-piece. This approach overcomes the issues illustrated in Figure 5, while streaming the LLM response immediately as additional content is resolved and merged into the stream asynchronously.

[0132] In particular, streaming poses a challenge to rendering markup languages. Character sequences for certain expressions remain ambiguous until a sequence marking the end of the expression is encountered. For example, an emphasis character such as “*” may remain ambiguous until a closing “*” character is encountered, and could also indicate an unordered list item. Similarly, until a closing parenthesis is encountered, a link HTML element cannot be rendered, as the full Uniform Resource Locator (URL) is unknown.

[0133] This may be solved by buffering characters that may be ambiguous. The buffer may be flushed when either the parser encounters an unexpected character, in which case the sequence may be rendered as raw text, or when the full markup language element is complete.

[0134] Doing this while streaming may use a stateful stream processor that can consume characters one-by-one. In some cases, the stream processor either passes through the characters as they come in, or it updates the buffer as it encounters markup language-like character sequences.

[0135] Further, beyond rendering, some data may be provided asynchronously. For example, LLMs have a good grasp of general human language and culture, but may not be a great source of up-to-date, accurate information. LLMs may therefore be instructed to use certain tools when they need information beyond their grasp.

[0136] A typical tool integration for an LLM is shown with regard to Figure 7.

[0137] In particular, in the embodiment of Figure 7, a user interface 710 communicates with a backend 712. The backend 712 may communicate with anLLM Client 714, which may interact with an LLM 715. The backend 712 may further communicate with various tools such as an information tool 716.

[0138] In the example of Figure 7, a user using III 710 may ask what one tap check out options the user may have, shown with message 720. Backend 712 receives message 720 and forwards the message as message 722 to LLM Client 714.

[0139] LLM Client 714 may formulate a query 724 to LLM 715, which may include the question, context if any exists, among other information.

[0140] LLM 715 finds that a tool may be used to obtain up-to-date information and therefore provides a response 726 back to LLM Client 714 in which a tool is identified and instructions to the tool are provided.

[0141] LLM Client 714 may provide a response 728 to backend 712, which may then parse response 728, and sends a request 730 to the information tool 716.

[0142] Information tool 716 provides a response 732 back to the backend 712.

[0143] Backend 712 may then process the response 730 and summarize the information in some cases. It may then send such curated summary to the LLM Client 714, shown with message 740. However, in other cases the entire response 732 may be provided to LLM Client 714. In other cases, the entire chat history along with the curated summary may be provided to LLM Client 714. Other options are possible.

[0144] LLM Client 714 may then use the information from message 740 to prompt the LLM 715, shown with prompt 742. LLM 715 may then provide a response 744 back to LLM Client 714.

[0145] LLM Client 714 may then provide a response 746, which may indicate the one tap checkout options that the user may have.

[0146] The backend 712 may then provide the response 750 back to the III 710 to be presented to the user.

[0147] During this entire process, the user is waiting for a response to message 720, and depending on server loads, communication infrastructure, among other factors, this wait may be protracted.

[0148] Therefore, in accordance with some embodiments of the present disclosure, a break to the tool invocation and output generation out of the main LLM response may be made. Such break may allow the initial LLM round trip to directly respond to the user, with placeholders to be asynchronously populated.

[0149] Specifically, reference is now made to Figure 8 in which a user interface 810 may communicate with a backend 812. Further, backend 812 may communicate with an LLM Client 814, which may communicate with LLM 816.

[0150] In the example of Figure 8, a user may, through the user interface 810, ask how the user may unpublish a product, shown with message 820. Backend 812 receives message 820 and forwards it to LLM Client 814, shown as message 822.

[0151] LLM Client 814 may then formulate a prompt 824 to the LLM 816 and receive a response 826 back from LLM 816.

[0152] LLM Client 814 provides a response 830 in which various text, along with a placeholder, are provided. For example, in Figure 8, the placeholder is shown between square brackets. However, the placeholder may be formatted in various ways, some examples of which are described below.

[0153] Once backend 812 receives response 830, it may then forward such response, along with the placeholders, to Ul 810, as shown with message 840.

[0154] Since the response is no longer a string that can be directly rendered by the Ul, the presentation may require orchestration with the Ul. In accordance with theembodiments of the present disclosure, asynchronously resolved tool content may be multiplexed into the main response stream.

[0155] Reference is now made to Figure 9, which shows an expansion to the embodiment of Figure 8. In particular, in Figure 9, III 910 communicates with a backend 912. Backend 912 may communicate with an LLM Client 914 (which communicates with LLM 915) and with various tools including an instructions tool 916.

[0156] A user, using Ul 910, may ask a question on how to unpublish a product, shown with message 920. Message 920 is sent to backend 912, which may forward message 922 to the LLM Client 914.

[0157] LLM Client 914 may formulate a prompt 924 to LLM 915, and may then receive a response 926 back.

[0158] LLM Client 914 may then provide a response with placeholders, shown as message 930, to backend 912.

[0159] Backend 912 may then provide instructions 932 to Ul 910 to start streaming the LLM response. This may include some of the plain text portions from message 930, as well as Ul elements indicating a placeholder in some cases.

[0160] For example, referring to Figure 10, an interface 1010 includes the original question, along with the response 1020, which includes a placeholder 1022 for the asynchronous information from the tool.

[0161] Referring again to Figure 9, backend 912 may then make a request to the instructions tool 916, shown as request 940. In some cases, the request 940 may be formulated by the LLM, which may have knowledge of the type of information and structure of tool 916, and may therefore be able to formulate an appropriate query. For example, tool 916 may store data in database tables, and the query may use a structured query language to access the database. The LLM 915 thus may betrained on the type of information and structure of the tool 916, but does not need to have the latest data in its training. Thus, elements of request 940 may be part of response 930.

[0162] Backend 912 may then receive a response 942 back from instructions tool 916.

[0163] Backend 912 may then provide the response in message 950 to III 910, which may then multiplex the instructions into the main response.

[0164] For example, reference is now made to Figure 11 , which shows interface 1110 having the same question as that provided in the embodiment of Figure 10. In the example of Figure 11 , response 1120 now includes the information 1122 that was provided asynchronously.

[0165] Thus, the III is responsible for splitting (demultiplexing) this multiplexed response into its components. As seen in Figure 9, the III may render the main LLM response directly to the user as it is streamed from the server. Then the III may render any asynchronously resolved tool content into the placeholder area.

[0166] The embodiment of Figure 9 may further be expanded to multiplex multiple response streams into one, where each stream may be treated as a series of named events.

[0167] From the above, the asynchronous multiplexing of Figure 9 ties to buffering described above with regard to the embodiments of Figures 5 and 6. Specifically, in an LLM prompt, the LLM may be instructed to use special markup language links whenever it wants to insert content that will get resolved asynchronously. Instead of “tools”, these are referred to as “placeholder containers” herein because the LLM is told to adjust its wording to the way the whole response will be presented to the user. In the “tool” world, the tools are not touch points that a user is ever made aware of.In some of the present embodiments, how content will be rendered on the Ul isorchestrated with how the LLM outputs presentation-centric output, using presentation language.

[0168] The special container links are links that use may use, for example, a “card:” protocol in their URLs. The link text is a terse version of the original user intent that is paraphrased by the LLM. For example, is a user is asking “how can I configure X?”, then the LLM output may look something like Table 1 :TABLE 1 : Example LLM Card Output

[0169] However, other examples of presentation container syntax are possible, and the example of Table 1 is merely provided for illustration.

[0170] The output may use a buffering parser that the main LLM output is piped to. Since these card links are a defined markup language, they may be buffered and parsed by the markup language parser. The parser may call a callback whenever it encounters a link.

[0171] A check may be made to see if an element is a container link, which may cause an asynchronous card resolution task to be started.

[0172] The main LLM response gets multiplexed along with any container content, and the Ul receives all this content as part of a single streamed response.

[0173] Using this approach, instead of having an additional stream parser sitting on top of the LLM response stream to extract some “tool invocation” syntax, an existing markup language parser may be used.

[0174] Content for certain presentation containers can be resolved entirely at the backend and their final content arrives in the III. The content for certain presentation containers gets resolved into an intermediate presentation that gets processed and rendered by the III (e.g. by making an additional request to a service).

[0175] In the end, everything is streamed as it is being produced, and the user has feedback that content is being generated.

[0176] Providing Context

[0177] Another issue with the above is that the LLM Client may not have access to the asynchronous data that is returned by the tool, and in this regard the LLM Client may not have context if the user asks follow up questions.

[0178] Therefore, in accordance with embodiments of the present disclosure, the backend server may provide the LLM Client with a summary of the data returned by the tool. Such summary may, in some cases, include the entire contents of the data returned. The summary may, in some cases, provide a synopsis of the data. In some cases, data in the summary may be redacted, such that the LLM only gets an indication about the type of data provided to the user, but not the exact data. Thus, the summary may be curated. Other options are possible.

[0179] Further, in some cases the LLM Client and / or LLM may be stateless, and in this case the curated summary may include the entire chat history, along with information retrieved from the tool that the LLM Client does not have access to.

[0180] Reference is now made to Figure 12. In the example of Figure 12, a client 1210 may include a user interface 1212, which may, for example, be a browser or an application that is user facing. Client 1210 may further include a server 1214 which may include a web server, application server, among other options.

[0181] Client 1210 may communicate with an LLM Client 1220, typically through server 1214. However, in some cases Ul 1212 may access LLM Client 1220 directly.

[0182] LLM Client 1220 may further access LLM 1222.

[0183] Further, a resource or a data store 1225 may contain data that is proprietary and only accessible by client 1210. The data stored at data store 1225 may not be accessible to LLM Client 1220, nor would LLM 1222 have been trained on the data stored within data store 1225. However, LLM 1222 may know the type of data stored in data store 1225, and may further know the structure of the data storage or the proper queries to access data within data store 1225.

[0184] In the example of Figure 12, a user may, through Ul 1212, ask a question 1230, which is passed to server 1214. Server 1214 may then provide a prompt 1232 to LLM Client 1220 with regard to the question. This prompt 1232 may then be processed into prompt 1234 at LLM Client 1220 and sent to LLM 1222. LLM may provide a response 1236 back to LLM Client 1220.

[0185] LLM Client 1220 may then provide a response 1240. In some embodiments, response 1240 may be a presentation container such as that discussed above with regard to Table 1 , where the container may include data that can be rendered immediately, a placeholder for an asynchronous query response, along with a query that the server 1214 could use to access the data. In some cases, the response 1240 may include the name, address or other identifier for an appropriate tool to access the data.

[0186] When response 1240 includes a container that has data that can be rendered immediately, then server 1214 may provide a response 1242 back to Ul 1212 to immediately render certain elements. In some cases, this may include the rendering of placeholders as well.

[0187] In the embodiment of Figure 12, data store 1225 is restricted to authorized users and therefore server 1214 may include an credential 1250. Credential 1250 allows access to the data store 1225, and includes various options including access tokens, among others. However, other examples for security would be known tothose skilled in the art, including usernames and passwords, or other verification techniques.

[0188] Server 1214 could therefore create a fetch query 1252, which may include elements from response 1240 along with a credential 1250. Data store 1225 may then receive the fetch query 1225, process it, and, assuming that authorization is established, provide a response 1254 with the appropriate data, back to server 1214.

[0189] In some embodiments, processing of the response, shown at block 1260, may occur on server 1214. The response may include raw data that may be processed to provide a summary to the user interface 1212. For example, if the raw data is in a table form, then the processing may create a graph that can be provided to the user interface 1212. In other cases, the data can be processed to summarize the data into a more manageable data size, among other options. However, in some cases processing at block 1260 is optional, and the entire response 1254 may be provided to the user interface.

[0190] Sever 1214 may them provide the summary to III 1212, as seen with message 1270. Message 1270 can include instructions to insert the data into a placeholder that was previously provided to the III, for example in response 1242.

[0191] At this point, the user interface may have a complete answer to the question in message 1230, including the proprietary data stored at data store 1225. However, if the user asks a follow-up question 1280, the LLM Client may not be able to answer the question properly, since it never received the proprietary data from response 1254, and thus may not have the correct context to respond to question 1280.

[0192] Therefore, in accordance with some embodiments of the present disclosure, the server 1214 may, when providing a follow-up question 1280 to LLM 1220, insert a curated summary of the context into the prompt. This summary may be the summary that was provided in response 1270 in some cases. In some cases, the summary may include the type of data but may obscure the exact data. In some cases, LLM Client 1220 may not keep a session with client 1210, and in this case thesummary may replay the entire chat history, along with the curated information from resource / datastore 1225, to allow the LLM to be put into an appropriate state.

[0193] Based on the above, server 1214 may send a question with an appended chat history (or only curated summary) to LLM Client 1220, shown with message 1290

[0194] However, in alternative embodiments, rather than append the chat history, the summary may be pushed to the LLM Client separately from the question. Thus, the appending of the summary to the question is merely provided for illustrative purposes.

[0195] LLM Client, on receiving message 1290, may therefore create the appropriate prompt to LLM 1222 to allow LLM 1222 to place itself in the correct context and to continue the chat, for example by sending a response that could then be processed at client 1210 similar to response 1240.

[0196] While the embodiment of Figure 12 shows the verification credential is at server 1214, in other cases it could be on the Ul. Reference is now made to Figure 13

[0197] In the example of Figure 13, a user device 1310 may include a user interface 1312, which may, for example, be a browser or an application that is user facing.

[0198] User Device 1310 may communicate with an LLM Client 1320, for example through Ul 1312. LLM Client 1320 may further communicate with LLM 1322.

[0199] Further, a resource or a data store 1325 may contain data that is proprietary and only accessible by user device 1310. The data stored at data store 1325 may not be accessible to LLM Client 1320, nor would LLM 1322 have been trained on the data stored within data store 1325. However, LLM 1322 may know the type of data stored in data store 1325, and may further know the structure of the data storage or the proper queries to access data within data store 1325.

[0200] In the example of Figure 13, a user may, through III 1312, ask a question 1330, which is passed to LLM Client 1320.

[0201] LLM Client 1320 may create a prompt 1332 to LLM 1322 and may then receive a response 1334 back.

[0202] LLM Client 1320 may provide a response 1340 to question 1330. In some embodiments, response 1340 may be a presentation container such as that discussed above with regard to Table 1 , where the presentation container may include data that can be rendered immediately, a placeholder for an asynchronous query response, along with a query that the Ul 1312 could use to access the data. In some cases, the response 1340 may include the name, address or other identifier for an appropriate tool to access the data.

[0203] When response 1340 includes a presentation container that has data that can be rendered immediately, then Ul 1312 may immediately render certain elements. In some cases, this may include the rendering of placeholders as well.

[0204] In the embodiment of Figure 13, data store 1325 is restricted to authorized users and therefore Ul 1312 may include an credential 1350. Credential 1350 allows access to the data store 1325. However, other examples for security would be known to those skilled in the art, including access tokens, usernames and passwords, or other verification techniques.

[0205] Ul 1312 could therefore create a fetch query 1352, which may include elements from response 1340 along with credential 1350. Data store 1235 may then receive the fetch query 1325, process it, and, assuming that authorization is established, provide a response 1354 with the appropriate data, back to server 1314.

[0206] The response may include raw data that may be processed at the user interface 1312. For example, if the raw data is in a table form, then the processing may create a graph that can be provided to the user interface 1312. In other cases,the data can be processed to summarize the data into a more manageable data size, among other options. However, in some cases processing at block 1360 is optional, and the entire response 1354 may be rendered by the user interface.

[0207] III 1312 may then insert the summary into, for example, a placeholder, shown at block 1370.

[0208] At this point, the user interface may have a complete answer to the question in message 1330, including the proprietary data stored at data store 1325. However, if the user asks a follow-up question, the LLM Client may not be able to answer the question properly, since it never received the proprietary data from response 1354, and thus may not have the correct context to respond to the question.

[0209] Therefore, in accordance with some embodiments of the present disclosure, the III 1312 may, when providing a follow up question to LLM Client 1320, insert a curated summary of the context into the prompt. This curated summary may be the summary that was created at block 1360. In some cases, the summary may include the type of data but may obscure the exact data. In some cases, LLM Client 1320 may not keep a session with client 1310, and in this case the curated summary may replay the entire chat history to get the LLM into an appropriate state, along with information from the resource or data store 1325.

[0210] Based on the above, client 1312 may send a question with an appended chat history or other curated summary to LLM Client 1320, shown with message 1380.

[0211] However, in alternative embodiments, rather than append the chat history, the summary may be pushed to the LLM Client separately from the question. Thus, the appending of the summary to the question is merely provided for illustrative purposes.

[0212] LLM Client, on receiving message 1380, may therefore place LLM 1322 in the correct context to continue the chat, for example by including the curated summaryand history to LLM 1322. This allows LLM to send a response that could then be processed at client 1310 similar to response 1340.

[0213] While the embodiments of Figures 12 and 13 show the summary is provided concurrently with a follow-up question, as will be appreciated by those in the art, the context could in other cases be provided before a subsequent question (for example immediately after the summary is created), or in a message that follows the subsequent question.

[0214] Based on the above, an LLM may provide instructions to access a resource it does not have access to, the data returned may be correctly rendered asynchronously, and the LLM may further obtain a summary of the data (along with any needed history) to allow for follow-up questions.

[0215] The elements described and depicted herein, including in flow charts and block diagrams throughout the figures, imply logical boundaries between the elements. However, according to software or hardware engineering practices, the depicted elements and the functions thereof may be implemented on machines through computer executable media having a processor capable of executing program instructions stored thereon as a monolithic software structure, as standalone software modules, or as modules that employ external routines, code, services, and so forth, or any combination of these, and all such implementations may be within the scope of the present disclosure. Examples of such machines may include, but may not be limited to, personal digital assistants, laptops, personal computers, mobile phones, other handheld computing devices, medical equipment, wired or wireless communication devices, transducers, chips, calculators, satellites, tablet PCs, electronic books, gadgets, electronic devices, devices having artificial intelligence, computing devices, networking equipment, servers, routers and the like. Furthermore, the elements depicted in the flow chart and block diagrams or any other logical component may be implemented on a machine capable of executing program instructions. Thus, while the foregoing drawings and descriptions set forth functional aspects of the disclosed systems, no particular arrangement of software for implementing these functional aspects should be inferred from these descriptionsunless explicitly stated or otherwise clear from the context. Similarly, it will be appreciated that the various steps identified and described above may be varied, and that the order of steps may be adapted to particular applications of the techniques disclosed herein. All such variations and modifications are intended to fall within the scope of this disclosure. As such, the depiction and / or description of an order for various steps should not be understood to require a particular order of execution for those steps, unless required by a particular application, or explicitly stated or otherwise clear from the context.

[0216] The methods and / or processes described above, and steps thereof, may be realized in hardware, software or any combination of hardware and software suitable for a particular application. The hardware may include a general-purpose computer and / or dedicated computing device or specific computing device or particular aspect or component of a specific computing device. The processes may be realized in one or more microprocessors, microcontrollers, embedded microcontrollers, programmable digital signal processors or other programmable device, along with internal and / or external memory. The processes may also, or instead, be embodied in an application specific integrated circuit, a programmable gate array, programmable array logic, or any other device or combination of devices that may be configured to process electronic signals. It will further be appreciated that one or more of the processes may be realized as a computer executable code capable of being executed on a machine readable medium.

[0217] The computer executable code may be created using a structured programming language such as C, an object oriented programming language such as C++, or any other high-level or low-level programming language (including assembly languages, hardware description languages, and database programming languages and technologies) that may be stored, compiled or interpreted to run on one of the above devices, as well as heterogeneous combinations of processors, processor architectures, or combinations of different hardware and software, or any other machine capable of executing program instructions.

[0218] Thus, in one aspect, each method described above, and combinations thereof may be embodied in computer executable code that, when executing on one or more computing devices, performs the steps thereof. In another aspect, the methods may be embodied in systems that perform the steps thereof and may be distributed across devices in a number of ways, or all of the functionality may be integrated into a dedicated, standalone device or other hardware. In another aspect, the means for performing the steps associated with the processes described above may include any of the hardware and / or software described above. All such permutations and combinations are intended to fall within the scope of the present disclosure.

Claims

CLAIMS1 . A computer method at a first device, the method comprising: receiving, at the first device, a query for a data resource from a large language model (LLM) Client; sending the query to the data resource; and obtaining results from the data resource, wherein the first device has access to the data resource and the LLM Client does not have access to the data resource.

2. The method of claim 1 , further comprising providing a summary of the results to the LLM Client.

3. The method of claim 2, further comprising processing the results to create the summary.

4. The method of claim 3, wherein the processing the results comprises redacting data from the results.

5. The method of claim 3 or claim 4, wherein the processing the results comprising transforming the results into a new format.

6. The method of any one of claims 2 to 5, wherein the providing the summary further comprises providing an entire chat history to the LLM Client.

7. The method of any one of claims 2 to 6, wherein the providing the summary of the results to the LLM Client comprises appending the summary to a subsequent question to the LLM Client.

8. The method of any one of claims 1 to 7, wherein the first device stores a credential to access the data resource.

9. The method of any one of claims 1 to 8, wherein the query for data resource comprises instructions to be interpreted by the data resource to create the results.

10. The method of any one of claims 1 to 9, wherein the query is part of a presentation container, the presentation container comprising: text to be displayed on the user interface; a placeholder for the results of the query; and the query.11 . The method of claim 10, wherein the presenting the results comprises: displaying the text and the placeholder; and responsive to receiving the results, replacing the placeholder with the results.

12. A computing device comprising: a processor; and a communications subsystem, wherein the computing device is configured to: receive a query for a data resource from a large language model (LLM) Client; send the query to the data resource; and obtain results from the data resource; wherein the computing device has access to the data resource and the LLM Client does not have access to the data resource.

13. The computing device of claim 12, wherein the computing device is further configured to provide a summary of the results to the LLM Client.

14. The computing device of claim 13, wherein the computing device is further configured to process the results to create the summary.

15. The computing device of claim 14, wherein computing device is configured to process the results by redacting data from the results.

16. The computing device of claim 14 or claim 15, wherein the computing device is configured to process the results by transforming the results into a new format.

17. The computing device of any one of claims 13 to 16, wherein the computing device is further configured to provide an entire chat history to the LLM Client.

18. The computing device of any one of claims 13 to 17, wherein the computing device is configured to provide the summary of the results to the LLM Client by appending the summary to a subsequent question to the LLM Client.

19. The computing device of any one of claims 12 to 18, wherein the computing device stores a credential to access the data resource.

20. A non-transitory computer readable medium for storing instruction code that, when processed by a processor of a computing device, cause the computing device to perform the method of any one of claims 1 to 11 .