Response control architecture for large language models
A control schema for LLMs addresses inefficiencies by constraining output, reducing resource waste and improving computational efficiency through consistent output management.
Patent Information
- Application Number
- US19/687984
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Priority Date
- 2026-02-13
- Filing Date
- 2026-05-26
- Publication Date
- 2026-11-26
AI Technical Summary
Existing large language models (LLMs) face inefficiencies in resource usage due to their stateless or stateful nature, leading to wasted computing resources and computational inefficiencies, particularly when maintaining or lacking user session state.
A control schema is implemented to constrain LLM output, allowing efficient use of resources by applying constraints such as style and content parameters, which can be applied and reapplied during user sessions to maintain desired output characteristics without relying on stateful mechanisms.
The control schema effectively reduces resource waste and computational inefficiencies by ensuring consistent output quality and resource utilization, enabling faster and more efficient LLM operations.
Smart Images

Figure US20260377700A1-D00000_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to and is a continuation-in-part of U.S. patent application Ser. No. 19 / 232,881, filed on Jun. 10, 2025, titled “Method and System for Stateless Symbolic Identity Invocation and Threadstep-Based Cognitive Simulation.” This application also claims priority to U.S. Provisional Patent Application 63 / 811,652 filed on May 24, 2025, and to U.S. Provisional Patent Application 63 / 982,891 filed on Feb. 23, 2026. The foregoing applications are incorporated herein in their entirety.BACKGROUND
[0002] In recent years, artificial intelligence (AI) techniques, including computation via large language models (LLMs), have been used for various purposes. An LLM may produce certain output when a user provides input (also known as a “prompt”) to the LLM. Based on its training, the LLM may then generate output and provide it to the user.
[0003] LLMs may be “stateless” in that they may not retain state between user sessions. A “stateful” LLM may instead retain state-based information between user sessions. Applicant recognizes that there may be certain disadvantages to both stateful and stateless LLMs, which may be remedied by techniques described herein.BRIEF DESCRIPTION OF THE DRAWINGS
[0004] The present disclosure, in accordance with one or more various examples, is described in detail with reference to the following figures. The figures are provided for purposes of illustration only and merely depict typical, non-limiting aspects of such examples.
[0005] FIG. 1 illustrates an example of a computing environment in which examples of the disclosed technology may be implemented.
[0006] FIG. 2 illustrates an example of a flow of operations involving a user system and an LLM system, as may relate to how output of an LLM system may be generated utilizing the presently disclosed techniques regarding control of output while also making efficient use of computing resources, according to some embodiments.
[0007] FIG. 3A illustrates an example of a portion of a control schema as may be used in accordance with techniques for controlling LLM output, according to some embodiments.
[0008] FIG. 3B illustrates an example of another portion of a control schema as may be used in accordance with techniques for controlling LLM output, according to some embodiments.
[0009] FIG. 4 illustrates an example of a flowchart for a method relating to controlling LLM output and / or execution of LLM computational processing operations, according to some embodiments.
[0010] FIG. 5 illustrates a block diagram of an example computer system in which various examples of the disclosed technology described herein may be implemented.
[0011] The figures are not exhaustive and do not limit the present disclosure to the particular form(s) disclosed.DETAILED DESCRIPTION
[0012] When determining how to implement and manage an LLM, there may be drawbacks to both stateless and stateful approaches. Stateless LLMs may have lower usage of computing resources in order to implement and maintain them, but this can result in higher usage (and wasted usage) of computing resources in various scenarios. Such scenarios may include a user having to cause a LLM to duplicate previously executed computing tasks due to the LLM's failure to maintain state. This can give rise to computational inefficiencies, as duplication of some or all prior user inputs within a new session may cause a computing system for the LLM to waste processor cycles, electricity and memory consumption, and other resources as the LLM re-executes computations that were already performed previously.
[0013] Stateful LLMs may be able to avoid at least some duplication of computing tasks, but these LLMs may require complex and / or resource-intensive implementation and maintenance. Significantly more resources to track state(s) across multiple users may be needed with a stateful LLM, for example. A stateful LLM may need to track state-based information related to thousands or even millions of different users, for example, requiring significant usage of resources including processor cycles, power consumption, network bandwidth, and storage capacity (database storage; volatile memory or non-volatile memory storage, etc.). Some of this resource usage by a stateful LLM may also end up being inefficiently wasted, as it may retain state information that does not actually end up being used (e.g. later on by a particular user in a subsequent user session conducted after an initial user session).
[0014] One use of state information in the context of the present disclosure relates to putting constraints on the output generated by an LLM (e.g. in response to a user prompt). These constraints may include a variety of parameters that specify how LLM output should look or sound (e.g. style). Style parameters might include an average number of words per sentence or a level of vocabulary sophistication, as one example. Output constraint parameters may also specify how content itself should be generated (e.g. substance). Substance parameters might specify, for example, that generated content should fall within an appropriate data range or use only certain source material. Thus, substance parameters could be used to indicate that content should be generated without reference to any historical events or technologies developed after the year 1620, and that only the collected works of William Shakespeare should be used as source documents for the generation of content. Constraint parameters may thus include but are not limited to vocabulary, a requirement or preference for certain content to appear or not appear in generated LLM output, or a prohibition or a requirement that one or more particular data sources (websites, databases, external systems, etc.) be used or not be used for generating LLM output.
[0015] Users may desire to have LLM output constrained for a variety of reasons. Constraining output may be done in order to comply with requirements of a particular use-case of the user. LLM output constraints may also reduce overall usage of computing resources, as a user can reach a desired end goal more quickly and with less LLM processing when a reduced number of prompt inputs are required. In contrast, if a stateless LLM begins its processing tasks during a user session without user-specified constraints, the user might have to painfully build those constraints manually and / or with trial-and-error techniques via multiple prompt inputs. Such a process might have to be repeated all over again with the stateless LLM when the user initiated a later session but still desired the constraints the user had previously established.
[0016] The present disclosure includes structures and techniques that allow for LLM output constraint in a manner that mitigates the difficulties and inefficiencies of other LLM architectures as might be used with either stateless or stateful LLMs. A control schema, as further described below relative to various embodiments, may allow for LLM output constraint without disadvantages that might be present in other techniques for LLM operation and management, which avoids wasting compute cycles, electricity, network bandwidth, wear and tear on computing components such as hard drives, and other resource usage according to various embodiments.
[0017] It is to be understood that certain widely recognized elements, processes, and techniques may not be described in detail to prevent obscuring the subject matter disclosed. Furthermore, various adjustments, rearrangements, or substitutions of components and steps may be implemented without deviating from the spirit and scope of the disclosed subject matter. The described embodiments aim to encompass all such alter-natives, modifications, and equivalents that may fall within the scope of the claims.
[0018] Before describing more specific examples of the disclosed systems and methods in detail, it is useful to describe an example network installation with which these systems and methods might be implemented in various applications. FIG. 1 illustrates one example of a computing environment 100 that may be implemented relative to an individual or an organization, such as a business, educational institution, governmental entity, healthcare facility or other organization.
[0019] User system 105 may be a variety of computing devices or combination of devices in various embodiments, such as a smartphone, laptop computer, desktop computer, server, workstation, etc. A user of user system 105 may interact with one or more of LLM system 120A, LLM system 120B, intermediate system 110, or orchestration system 110 in order to accomplish computing tasks, according to some examples.
[0020] Intermediate system 110 and LLM systems 120A and 120B may likewise respectively be any suitable computing device or combination of devices. In various embodiments, user system 105 may interacts with a number of different large language model (LLM) systems (e.g. 120A and 120B, collectively “LLM systems 120”). Note that while two LLM systems are shown, there may be greater or fewer according to some embodiments and use cases. LLM systems 120 may be hosted within one or more cloud computing environments in some instances, and may also by controlled or operated by a different entity than an entity that controls or operates intermediate system 110 or user system 105. In various embodiments discussed herein, all or portion of certain techniques stored executable program instructions, or other structures may be implemented by and / or located within intermediate system 110, user system 105, or one or more of LLM systems 120. Thus, any of these systems, or another suitable system, may perform a variety of different operations in various embodiments, including any or all portions of various techniques described herein. Accordingly, in some instances, intermediate system 110 perform all steps of particular disclosed methods, while in other instances, intermediate system 110 might perform part of those methods while another system performs another part of those methods. In yet other embodiments, a system other than intermediate system 110 may perform all steps of methods disclosed herein (e.g. LLM system 120A). The systems in this figure may include a single computer (e.g. a laptop, desktop, server, etc.), or may include multiple computers (e.g. two or more machines configured to communicate via a network) according to various embodiments.
[0021] Each of LLM systems 120 may host a different instance of an LLM. As shown, LLM system 120A hosts LLM 125A while LLM system 120B hosts LLM 125B. However, an LLM system may also host multiple instances of LLMs (which may be different types of LLMs in some cases), according to various embodiments. As used herein, “LLM 125” may refer to any of LLMs 125A-125B, while “LLMs 125” may refer to any two or more of LLMs 125A-125D, for example). In some embodiments, an LLM instance can also be hosted by two or more LLM systems 120 (which may be connected via a network). Various system configuration are therefore possible with respect to LLMs and LLM systems upon which they are hosted. Structure and functionality described herein with respect to any particular one of LLM systems 120A-120B is applicable to the other LLM systems, according to various embodiments. Structure and functionality described herein with respect to any particular one of LLMs 125A-125B is also applicable to the other LLMs, according to various embodiments. Thus, as an example, functionality described with respect to LLM system 120A may also be applicable to LLM system 120B, while functionality described with respect to LLM 125A may also be applicable to LLM 125B.
[0022] As shown, LLM 125A includes stored executable computer instructions operable to perform one or more computational tasks based at least in part on natural language input (e.g. English or some other language). Thus, LLM 125A is operable to receive a general-purpose input, and produce a variety of corresponding outputs in some embodiments. Input data to LLM 125A may include one or more natural languages (e.g. English, Spanish, Mandarin, etc.), but any other kind of input data as well, including but not limited to one or more of text, audio, video, still images, animated images, structured or unstructured data, spreadsheets, source code, script code, pseudocode, executable code, parameters, weighting information, etc. Input to LLM 125A may include one or more files in a variety of different formats. Input to LLM 125A may include a single type of data, or a mix of two or more types of data. Thus, input to LLM 125A may include natural language along with non-natural language data (which may be referenced or otherwise operated on by LLM 125A). Output data from LLM 125A may be anything described with respect to input data above, according to various embodiments. LLM 125A may also take additional actions other that merely outputting data (e.g. executing commands, fetching data, interacting with one or more other systems, etc.) according to various examples.
[0023] LLM 125A is trained to process input data and produce output data, in some embodiments, according to one or more artificial intelligence (AI) and machine learning (ML) techniques. In some cases, two or more instances of an LLM 125 may be different from one another. A first LLM is considered “different” from another second LLM herein if the first LLM does not behave identically to the second LLM on all possible sets of input data, or if the first LLM was trained in a manner differently from the second LLM. Factors that may cause a first LLM to be different from a second LLM can thus include, but are not limited to, one or more different training algorithms being used to train the LLMs, one or more different sets of underlying data being used to train the LLMs, one or more different execution algorithms being used by the LLMs, or one or more deployment differences existing between the LLMs (e.g. a difference between LLMs 125A and 125B may exist due to a difference between LLM system 120A and LLM system 120B on which those LLMs are deployed).
[0024] LLM 125A may be implemented as a stateless LLM according to various embodiments. A stateless LLM includes an LLM that does not maintain state between one or more user sessions (even if such sessions correspond to the same user). Thus, in one example in which LLM 125A is stateless, a user of user system 105 may initiate a session with LLM 125A on a first date and time. Initiating a session may include, but is not limited to, navigating a web browser to a URL associated with LLM 125A, or utilizing another software application that is configured to connect to LLM 125A and provide user input to LLM 125A, as well as receive output from LLM 125A responsive to the user input (which may include one or more commands and / or queries). In other embodiments, LLM 125A may include stateful functionality of various capabilities, but the presently disclosed techniques are still usable and provide the advantages described herein in such embodiments, as an LLM with stateful capability may still not include sufficient controls or mechanisms to achieve the benefits of output constraint described herein according to various embodiments.
[0025] LLMs 125, as well as LLM systems 120, may correspond to various different entities in some embodiments. As an example, LLM 125A may be an instance of the CLAUDE™ LLM (developed by ANTHROPHIC™), while LLM 125B may be an instance of the CHATGPT™ LLM (developed by OPENAI™). Note that LLMs 125 may still be considered different from one another when they are based on the same underlying model (e.g., developed by the same entity) if those LLMs are of different versions, were trained on different underlying data, or otherwise behave differently in at least some respects.
[0026] Intermediate system 110 and user system 105 are operated by and / or correspond to different entities than an entity associated with LLM system 120A and / or LLM 125A in some embodiments. As just one example, user system 105 may correspond to an end user (such as an individual or a business), intermediate system 110 may correspond to an entity making use of the presently disclosed technology, and LLM 125A may correspond to an entity that developed a particular version of a large language model while LLM system 120A may correspond to an entity that operates a cloud computing service. Various such configurations regarding system and LLM deployment are possible and contemplated.
[0027] LLM systems 120 are also configured to interact with other computer systems and / or data sources in various embodiments. For example, an LLM system 120 may be connected to and retrieve data from the Internet, a relational database system, or another network or computer system. As depicted, LLM systems 120A and 120B are respectively configured to connect to databases 140A and 140B, while LLM systems 120B and 120C are respectively configured to connect to external systems 145A and 145B, which may be server systems. An LLM system 120 may execute a computing task or otherwise perform computing operations via resources such as a database or other system (e.g. 140A, 140B, 145A, 145B) in different embodiments, including providing particular queries or instructions to such systems and receiving data or computational results from such systems. Various different configurations are possible and contemplated with regard to connections by LLM systems 120 to other external systems. Such external systems may include, but are not limited to, desktop computers, laptop computers, servers, web servers, authentication servers, authentication-authorization-accounting (AAA) servers, domain name system (DNS) servers, dynamic host configuration protocol (DHCP) servers, internet protocol (IP) servers, virtual private network (VPN) servers, network policy servers, mainframes, tablet computers, e-readers, netbook computers, televisions and similar monitors (e.g., smart TVs), content receivers, set-top boxes, per-sonal digital assistants (PDAs), mobile phones, smart phones, smart terminals, dumb terminals, virtual terminals, video game consoles, virtual assistants, internet of things (IOT) devices, and the like.
[0028] Control schema 108 includes stored data and / or executable instructions usable to implement techniques described herein for constraining output of an LLM, according to various embodiments. All or a portion of control schema 108 may be stored on one or more transitory or non-transitory computer-readable media corresponding to any of the systems depicted in FIG. 1, or another suitable system, according to various embodiments. Control schema 108 may be stored in one or more particular formats and include different data types, in some examples. Thus, in one embodiment, control schema 108 may be stored by LLM system 120A, while in another embodiment, control schema 108 may be stored by intermediate system 110. In yet another embodiment, control schema 108 may be stored by user system 105. In other embodiments, all or a portion of control schema 108 may be stored by multiple systems (e.g. as shown). A detailed example of one embodiment of control schema 108 is discussed further below relative to FIG. 3.
[0029] User system 105, LLM systems 120A and 120B, intermediate system 110, external systems 145A and 145B, and external databases 140A and 140B may be configured to connect to one another in any permutation or combination by one or more communication networks, such as network 115. Network 115 may include one or more routers, wired or wireless transmitters and / or receivers, and / or other networking equipment. In one embodiment, network 115 comprises the internet.
[0030] FIG. 2 shows one example 200 of a flow of operations involving user system 105 and LLM system 120A. This example relates to how output of LLM system 120A may be generated utilizing the presently disclosed techniques regarding control of output while also making efficient use of computing resources, and as may occur with a stateless or stateful LLM.
[0031] In this example, a control schema (e.g. 108) is used in conjunction with LLM system 120A to provide control and / or continuity of output from LLM 125A. Note again that techniques, structures, and functionality generally described herein relative to any particular LLM or LLM system are applicable to other LLMs and / or LLM systems in numerous embodiments. Thus, FIG. 2 may equally apply to LLM system 120B and LLM 125B in one embodiment.
[0032] Initial request 210 may be sent from user system 105 to LLM system 120A. This request may correspond to the beginning of a user session with LLM 125A, and may include an HTTP request (e.g. from a web browser or other application) from user system 105. Upon receiving initial request 210, LLM 125A may begin a user session with a user of system 105. This may include one or more initial setup operations (e.g. allocating memory within LLM system 120A, instantiating a new LLM instance specific to the user, etc.) One task that LLM system 120A may perform responsive to (or prior to in some in-stances) initial request 210 is control schema application 215.
[0033] Control schema application 215 includes applying one or more control schemas (e.g. 108) into LLM 125A in one embodiment (e.g. by accessing the schema and / or loading it into working memory of LLM 125A). The control schema may include specific instructions and / or data operative to control output of LLM 125A in a way that is not provided for by a default or other configuration of LLM 125A, in some instances. Thus, use of a control schema may be layered on top of an LLM that may not have any special configuration to accommodate such use—that is, an ordinary “out of the box” LLM configuration can be used to implement the present techniques, in some embodiments. Operation 215, in some instances, includes providing input to LLM 125A through a user interface (UI), such as a chat window or other UI. In other instances, operation 215 may include accessing a control schema through an internal interface that is not exposed to a user.
[0034] Upon application of a control schema in operation 215, LLM 125A will be-come configured to apply output constraints accordingly. Thus, after a control schema is applied, output of LLM 125A for a user session may be controlled to use only a certain style, refer or make use of only certain content, etc. Additional detail in this regard is provided further below.
[0035] Note that in some embodiments, only one of operation 215 or operation 235 is performed, and not both. Operation 215 may be performed, in some examples, when LLM system 120A has existing access to a relevant control schema or is otherwise pre-configured to apply one or more control schemas upon initial request 210. Thus, operation 215 may be performed in some instances in which LLM system 120A is already configured for a control schema before a user session is even established. Operation 235, in other instances, may be performed when LLM system 120A is not already configured to use a control schema, but receives one or more from another system (e.g. intermediate system 110 or user system 105).
[0036] In operation 220, an input interface is provided by LLM system 120A to user system 105. This may include, for example, transmitting data and / or instructions to user system 105 such that a UI appears on a display device of user system 105. This UI may be a chat window displayed within a web browser application, or another UI displayed within a browser or other application. The input interface provided in operation 220 may be configured such that a user of user system 105 can provide input to LLM 125A by using one or more input devices of user system 105, such as a keyboard, mouse, or other device. The input interface may be configured to receive one or more natural language commands from the user (e.g. one or more English language words containing statements, directives, or questions). This input interface may also allow the user to up-load files or other data (e.g. a spreadsheet, word processing document, digital image, digital video, etc.).
[0037] Operation 230 includes user system 105 sending one or more setup responses to LLM system 120A. In some embodiments in which LLM 125A is not already configured for use with a control schema, user system 105 may transmit all or a portion of one or more control schemas to LLM system 120A in operation 230. LLM system 120A may then perform an application of the control schema(s) in operation 235. In certain embodiments, operations 230 and / or 235 may be omitted, however (e.g. when LLM system 120A already has access to one or more relevant control schemas, and operation 215 has already been performed).
[0038] LLM system 120A may send a primed user interface back to user system 105 in operation 240. The primed interface has been configured for use by the user according to one or more control schemas, according to some embodiments, and the primed interface may thus display content according to certain controlled parameters. Note that in some embodiments in which LLM system 120A already has access to a control schema (e.g. operation 215 has been performed), operation 220 may be omitted and / or combined with operation 240. That is, LLM system 120A may provide a primed interface to user system 105 in a single operation, rather than having to first provide an interface and process a setup response via that interface before ultimately providing the primed interface.
[0039] Operation 250 includes user system 105 sending one or more user inputs to LLM system 120A for processing by LLM 125A. As noted above, these inputs may include natural language inputs. LLM 125A may then process the input(s), and provide one or more controlled outputs to user system 105 in operation 260. These controlled outputs may be in accordance to one or more output parameters as specified by a control schema.
[0040] Operation 255 includes LLM system 120A reapplying one or more control schemas to LLM 125A. This operation may reinforce the usage of a control schema by LLM 125A, and work to prevent LLM 125A from drifting in its usage of the control schema. Because an LLM may have a limited context window for a particular user session (e.g. limited working memory and limited tokens via which to represent the context window), reapplication of the control schema avoids having all or a portion of the control schema fall out of the LLM's context window, according to various embodiments. By retaining all or a portion of the control schema within the LLM's context window via reapplication, effectiveness of the control schema can be maintained.
[0041] Operations 250, 255, and 260 may be continued indefinitely during a user session according to various embodiments. Thus, a user might send a first input to LLM system 120A, LLM 125A may perform one or more computing operations in response (and in accordance with the control schema). A first controlled output may then be provided back to user system 105 and a first reapplication of the control schema would be performed. The user might then send a second input to LLM system 120A, which may perform a second computing operation (e.g. in accordance with the control schema). A second controlled output would then be provided to user system 105, and a second reapplication of the control schema would be performed. This cycle may be repeated any desired number of times. Additional aspects relating to control schemas and their reapplication are discussed in more detail further below.
[0042] FIG. 3A shows one example 300 of a portion of a control schema 108 as may be used in accordance with techniques for controlling LLM output described herein. This example does not limit control schema 108, as many different implementations are possible and contemplated, but is provided to illustrate aspects of how a control schema may be configured.
[0043] As shown, the portion of control schema 108 shown in FIG. 3A includes multiple sections 310, 320, 330, and 340. Each section may contain any combination of code, pseudocode, natural language, text data or instructions, binary data or instructions, or other data or instructions, according to various embodiments. Control schema 108 may be stored in a single data location or multiple locations in different embodiments. Thus, control schema 108 might be stored in a single file, in a single location within a computer system's memory, or in multiple locations in one or more databases, according to some examples.
[0044] As shown, section 310 includes pseudocode and natural language instructions intended for usage by LLM 125A. This section is an initial setup section, in this example, that provides directives to LLM 125A regarding how additional portions of control schema 108 should be interpreted and executed. Section 310 also includes formatting restrictions indicating JSON (JavaScript Object Notation) format should be used with respect to control schema application and reapplication.
[0045] Section 320, as shown, includes security enforcement-related parameter information. In some instances, a user might attempt to modify or circumvent a control schema, which may be undesirable. This section includes directives related to certain text strings that should be prohibited to help prevent unauthorized modification of control schema 108.
[0046] Section 330, as shown, includes definitional information relating to identity, structure, and output and processing parameters for control schema 108. This section has a seed ID of “sherlock.v1”, as might correspond to a control schema in which output and computational processing by LLM 125A was performed as if the LLM was a personification of the fictional literary detective Sherlock Holmes. “Glyphs” indicated in this section may be used relative to application and / or reapplication of the control schema, while other information shown may relate to other aspects of the schema (e.g. using 16 words per sentence in LLM output responses, with a standard deviation variation of plus or minus 4 words per sentence). As with all other aspects of control schema 108, multiple variations, permutations, or combinations of what is depicted in FIG. 3A are possible and contemplated. Instead of the language shown regarding words per sentence, for example, another alternative might be “Average Words Per Sentence: 14-18 [50-60%]; 9-13 [20-25%]; 19-23 [20-25%]; 24+[<5%]; 8−[<5%];”. Such a directive may indicate that between 50 and 60 percent of the time, natural language output sentences from LLM 125A should contain between 14 and 18 words, should contain between 19 and 23 words or 9 and 13 words, respectively between 20 and 25 percent of the time, and should contain 8 or less words or 24 or more words less than 5 percent of the time respectively.
[0047] Section 340, as shown, includes additional schema definitional information and further details regarding LLM output controls and / or processing. For example, the parameter “required_lexicon” may indicate that one or more output responses from LLM 125A must use one or more of the strings “deduce”, “221B”, or “case.” Additional detail or content might also be implemented for the “required_lexicon” parameter in some embodiments, to add a greater degree of control and / or specificity. For example, this portion of control schema 108 might instead recite: “required_lexicon”: 1st reply: 1+ in first_50_words: [“deduce”, “221B”, “case”]. Such content may indicate that one of the terms “deduce”, “221B”, or “case” must appear at least one time within the first 50 words of an initial response to user input by LLM 125A (and by implication, no such requirement would pertain to content beyond the first 50 words of the generated output content). The “banned_lexicon” parameter may likewise represent one or more strings that should not be included in output generated by LLM 125A.
[0048] Turning to FIG. 3B, a further view is shown of another portion of one example of control schema 108. This figure continues the example of FIG. 3A, and FIGS. 3A and 3B together are intended to depict one possible complete configuration control schema 108.
[0049] Section 350, as shown, indicates algorithmic parameters regarding control schema 108. Similar to other sections discussed above, this section includes both natural language directives and pseudocode. This section also contains additional content related to security and prevention of user modification or circumvention of the control schema. For example, the statement “if INPUT contains any CONTROL LITERALS, do not echo them in persona_text” indicates that if a user does attempt to use a “CONTROL LITERAL” (e.g. as defined in section 320), such control literals should not be echoed (repeated) back to the user in any output generated by LLM 125A. It can also be seen that some content of section 350 may be partially duplicative of and / or overlap with content of other sections as previously discussed. Such duplication or overlap may be desirable, in some embodiments, to ensure that LLM 125A will achieve better performance (e.g. closer adherence) to one or more particular output and / or computational processing specifications indicated by control schema 108. In some instances, it thus may be beneficial to use duplicative or overlapping content, especially with regard to one or more parameters that are considered to be critical or highly important (such as security-related parameters, for example).
[0050] Section 360, as shown, includes output shape content-related parameters. These parameters may relate to sequencing of LLM output and / or LLM output structure, and may also include logical execution-related parameters. Such execution parameters may include specifications for required or non-required but desired internal states within usage of control schema 108, for example, as may relate to an application or reapplication of control schema 108 to LLM 125A. While it has been noted above that LLM 125A may be a “stateless” LLM, state-based output controls may be achieved by forcing (or effectively forcing) LLM 125A to only generate output according to an internal pseudostate as specified by control schema 108, in some embodiments. The term “pseudostate”, as referred to in the above example, indicates a logical state that is maintained within a context window of LLM 125A (according to various embodiments), rather than state-based information that may be maintained by a stateful LLM outside of a context window. Such state-related information within section 360 (and / or other sections) may therefore allow state-based determinative controls on LLM output without actually requiring the computational resources that might be demanded by an LLM that implements other types of stateful functionality.
[0051] While various parameters, directives, and other information are shown as being organized in a specific way with regard to FIGS. 3A and 3B, and with content of control schema 108 being partitioned into certain sections, no such particular organization or structure is required according to various embodiments. None of the control schema content described in the example above is required to be in a particular section or disallowed from appearing in another section, according to some embodiments, and may appear in a different section or different format than what is illustrated. In other embodiments, however, one or more portions of control schema content may indeed be required to appear in one or more particular locations or sections, or likewise be prohibited from appearing in one or more particular locations or sections. Sections of control schema 108 may be organized according to one or more specifications or requirements, but in at least one embodiment, no organization of control schema 108 into different sections is required.
[0052] Control schema 108 may be created in multiple different ways according to various embodiments. In one embodiment, a human user (e.g. associated with user system 105, intermediate system 110, or LLM system 120A) may manually create the control schema through direct editing. In another embodiment, a human user may create the control schema through a combination of direct editing and one or more software tools that provide at least a portion of the content of the control schema. In other embodiments, the control schema may be created in a fully automated fashion (e.g. by one or more software tools) based on input from a human user. In one embodiment, LLM 125A may itself be used to create all or a portion of a control schema based on one or more control schema creation inputs received by LLM system 120A. In another embodiment, all or a portion of a control schema for use by LLM 125A may be created by different LLM (e.g. 125B) based on one more control schema creation inputs received by LLM system 120B. Additional combinations and permutations of the above examples may be used for creating and / or modifying a control schema according to various embodiments.
[0053] FIG. 4 illustrates a flowchart for a method 400 that includes operations that may be taken by a computer system in relation to controlling LLM output and / or execution of LLM computational processing operations, according to some embodiments. Operations described relative to FIG. 4, as with all operations described herein unless otherwise noted, may be performed by LLM system 120A or 120B, intermediate system 110, or another suitable system according to various embodiments. Operations described relative to FIG. 4, as with all operations described herein unless otherwise noted, may be effectuated in the form of executing stored instructions (e.g. by a processor) to cause a computer system to perform one or more actions. Thus, in some embodiments, any or all aspects of operations described relative to FIG. 4 may be implemented by one or more particular executable computer instructions. In various embodiments, executable computer instructions are not limited to binary or compiled instructions, and may comprise but are not limited to interpretable instructions which may include natural language instructions as may be interpreted and processed by an LLM. Additionally, any or all aspects of operations described relative to FIG. 4 may be omitted, modified, or rearranged in any order other than the one depicted in various embodiments. Any or all aspects of operations described relative to FIG. 4 may be combined with or modified with respect to aspects of any other structures, techniques, or operations described relative to other figures or elsewhere herein.
[0054] Operation 410, as shown, includes accessing an LLM control schema such as schema 108. This schema may be stateless control schema, in various embodiments, which allows for LLM output control on an LLM instance that does not maintain internal state regarding generated content within a user session, other than as may be maintained within a context window for the user session. Stated another way, the control schema in operation 410 may be stateless in that it is configured to allow for LLM output control without reliance upon or a need for LLM state-based controls with regard to output content. Thus, the control schema in operation 410 may be used with LLMs that have no stateful functionality between user sessions, but may still be used with LLMs that implement one or more state-based functionalities that may persist across different user sessions conducted at different times.
[0055] Operation 410 may include intermediate system 110 accessing a control schema by receiving it from another system or by loading the control schema into memory of system 110. Intermediate system 110 may perform a database read request, operating system read request, and / or other request in order to access the control schema. Such a request may be transmitted via network 115 to one or more other systems, in some embodiments. Operation 410 may also include LLM system 120A accessing a control schema in a similar fashion.
[0056] Operation 410 may be performed prior to any user input is sent for processing to an LLM (such as LLM 125A) in some embodiments. In one such example, LLM system 120A might access a control schema based on an initial request for a user session with an LLM—such as upon a user navigating within a web browser to a URL associated with LLM 125A, but before the user has entered any input into a UI corresponding to LLM 125A. In another example, intermediate system 110 might access a control schema upon receiving and / or intercepting a user request, such as a request to begin a user session with LLM 125A.
[0057] In some embodiments in which intermediate system 110 performs one or more (or all) operations described relative to method 400, intermediate system 110 may act as an intermediary between user system 105 and LLM system 120A or 120B. One such scenario might include an end user of system 105 being an employee of a corporation, and LLM system 120A being a system of a third-party service provider (e.g. a cloud computing provider). In this example, intermediate system 110 might be a computer system of the corporation, and function as a gateway between a corporate end user (employee) and LLM 125A. While LLM 125A could lack some or all stateful capability with respect to output control and / or computing task processing control, intermediate system 110 may be able to use control schema 108 to apply such controls as desired by the corporation. Thus, intermediate system could be configured to use one or more control schemas as may be specified by an authorized user of the corporation. As an example, the corporation could have three control schemas: SCHEMA_1 for all employees that are below the level of vice-president, SCHEMA_2 for employees that are vice-president or above (e.g. corporate executives), and SCHEMA_3 for employees with secure information technology credentials (e.g. all employees who work in the I.T. department or in the cybersecurity department). Intermediate system 110, in such a scenario, could determine which schema applies to a particular end user of system 105, then transmit that schema to LLM system 120A for implementation relative to an LLM session for that user. Such a determination could be made in a number of ways, including intermediate system 110 referencing a user ID for the user with a corporate database, or based on encrypted information transmitted by user system 105 (possibly along with a request for an LLM session) where the encrypted information includes a designation of “1”, “2”, or “3” for the category of the end user, based upon which intermediate system 110 can select the appropriate corresponding control schema.
[0058] Many different possible scenarios are possible with respect to intermediate system 110, however, and are not limited to the corporate example described above. In various embodiments relating to such scenarios, intermediate system 110 may be in the middle of all communications between user system 105 and LLM system 120A or 120B. Intermediate system 110 may retransmit or forward a given communication to or from one of those systems without modification or without taking action, or may also modify a given communication or take one or more actions (such as performing all or a portion of one or more operations described relative to method 400).
[0059] In operation 420, a user prompt is received. This prompt may specify a user request to generate output content (e.g. from an LLM). Accordingly, the user prompt may include a request that comprises one or more natural language letters, words, punctuation marks, sentences, or phrases. The user request may also include additional data and / or instructions, such as a file attachment, media, URL, code or pseudocode, etc. The user prompt may be generated or input via a UI that is displayed via user system 105 in some instances. For example, a user might navigate a web browser to a URL associated with LLM 125A and provide input via a chat window within the web browser. Other mechanisms for generation and / or input of a user prompt are possible and are contemplated, however. In one embodiment, LLM system 120A might receive a user prompt directly via a network connection to user system 105. In another embodiment, intermediate system 110 might receive the user prompt from user system 105, and be configured to forward all or a portion of the user prompt to LLM system 120A.
[0060] As shown, operation 430 includes causing generation of LLM output content. This may be performed based on a user request to generate output content (e.g. as described relative to operation 420) as well as a control schema (e.g. as described relative to operation 410). Operation 430 therefore includes LLM system 120A generating output content using a control schema, according to one example. In another example, operation 430 includes intermediate system 110 making a request to LLM system 120A for LLM 125A to generate content in accordance with the user request and the control schema. In this example, intermediate system 110 may include the control schema in its request to LLM system 120A along with the user prompt.
[0061] In some embodiments, operation 430 includes LLM system 120A or intermediate system 110 applying control schema 108 to LLM 125A, which may then perform one or more computing operations in accordance with that control schema and in accordance with content of the user request. Applying control schema 108 may include injecting some or all content of control schema 108 into a context window of LLM 125A. Such injection could be performed by directly prepending control schema 108 to the user prompt, in one embodiment. As a simple example, consider a control schema 108 merely consisting of:
[0062] SCHEMA_1: avg_words_per_sentence: [10.5]; variance: [2.5]; END_SCHEMA. and a user prompt consisting of:
[0063] Tell me about fun things to do with kids in the summer in Ontario!In this example, prepending the schema to the user prompt may result in the following literal text that would be provided as input to LLM 125A:
[0064] SCHEMA_1: avg_words_per_sentence: [10.5]; var: [2.5]; END_SCHEMA. Tell me about fun things to do with kids in the summer in Ontario!
[0065] In other embodiments, a control schema may be applied to an LLM in other ways. The schema could also be appended directly to a user prompt, or inserted contiguously or in discrete sections into one or more locations before, in the middle of, or after the user prompt. In some instances, insertion of the schema could also include modifying content of the schema and / or content of the user prompt (e.g. for clarity or coherence purposes). For example, input to the LLM might comprise “Control all output based on this schema”, followed by control schema content, followed by “Here is the user prompt:”, followed by content of the user prompt. As will be appreciated, many other variations are possible and contemplated.
[0066] In some embodiments, application of a control schema may be partially or wholly transparent to an end user. In such embodiments, the user may be aware of the use of a control schema because the user will see a display of some or all content of the control schema in association with LLM input and / or LLM output. For example, if software logic on user system 105 directly prepended or appended a control schema into a chat window UI, content of the control schema might be displayed within the chat window UI and therefore visible to the end user.
[0067] In other instances, however, application of control schema 108 may be opaque to a user. For example, intermediate system 110 might apply a control schema to a user prompt before transmitting modified input (schema+prompt) to LLM system 120A. In this instance, the end user of system 105 would not see the schema being transmitted to LLM system 120A. Upon intermediate system 110 receiving output from the LLM, before providing that output to user system 105, the output might also be modified by intermediate system 110 to prevent the end user from seeing any content of the control schema (as also further described below).
[0068] In yet other instances, making the application of control schema 108 opaque to an end user may be done wholly or in part by user system 105 or LLM system 120A. For example, LLM system 120A or executable software logic on user system 105 may perform similar operations regarding modification of input and / or output to prevent some or all content of control schema 108 from being displayed within a user interface (e.g. within a chat window of a web browser). Performing operations to make control schema application opaque may provide the benefit of a better user experience, as the LLM output content they see may be cleaner and simpler than if control schema content was included. Additionally, in some scenarios, an entity making use of a control schema may not wish for an end user to be aware that output and / or processing operations by an LLM may have been performed according to a control schema. Accordingly, in some embodiments, method 400 may include automatically implementing a control schema without an explicit request from an end user to use the control schema (i.e. a control schema may be used without any end user input with respect to use of the schema).
[0069] As shown, operation 440 includes causing transmission of generated output content. This may include causing particular LLM output content (which may have been generated in accordance with a control schema) to be transmitted to user system 105, or another system. Thus, in one example, operation 440 includes LLM system 120A transmitting output content to user system 105. In another example, operation 440 includes intermediate system 110 transmitting output content to user system 105. In yet another example, operation 440 includes LLM system 120A transmitting output content to intermediate system 110 (which may the provide the content user system 105). Causing transmission of generated output content in operation 440 may include modifying the output content by LLM system 120A and / or intermediate system 110, in various embodiments (e.g. for opacity purposes as described above relative to operation 430).
[0070] As shown, operation 450 includes reapplying at least a portion of control schema 108 to a context window of an LLM. This operation may include any of the functionalities described above relative to an initial application of the control schema (e.g. as described relative to operation 430). Reapplication of the control schema may thus include prepending or appending all or a portion of the control schema to a subsequent user input (e.g. a second user prompt, following a first user prompt, as might be entered into a chat window UI). For example, consider a first user prompt that results in first generated LLM output content that appears in a chat window UI. Reapplication of the control schema, in this example, could include appending all or part of the control schema to the first generated LLM output content. Thus, if no opacity techniques were used and full transparency were in place, this example might result in an end user seeing the following (non-literal) content in a chat window UI:
[0071] User Prompt #1
[0072] Control Schema Content #1
[0073] LLM Output Content #1 (first response)
[0074] Control Schema Content #2 (reapplication of Control Schema)In this example, the user might then choose to make a second prompt. Because the control schema content was reapplied following the first LLM output content, the control schema may remain within a context window of the LLM (e.g. as associated with the user session). When the user then provides a second prompt (User Prompt #2) within the chat window UI, the reapplication of the control schema (e.g. Control Schema Content #2) may ensure that the control schema does not fall out of context for LLM 125A and ensure that additional user prompts are processed in accordance with specifications of control schema 108.
[0075] Reapplication of a control schema may be performed opaquely with respect to an end user in accordance with techniques described above. Thus, similarly to how an initial application of a control schema may be opaque and avoid end user visibility of some or all control schema content (e.g. as described relative to operation 430), reapplication of a control schema may also be performed opaquely.
[0076] In some embodiments, control schema reapplication in operation 450 may include using identical control schema content as was used in a first, initial application of control schema 108. In other embodiments, a reapplication of control schema 108 may include a modification of or different content from an initial or earlier application of control schema 108. Thus, in the brief example above, “Control Schema Content #2” may be identical or may differ from “Control Schema Content #1”, according to various embodiments. In one embodiment, all or a portion of control schema content that is used for a reapplication of the control schema may be generated by LLM 125A, which may be performed by LLM 125A based on control instructions specified in control schema 108. Thus, control schema 108 may have a reapplication section that includes specifications regarding how the control schema should be reapplied. All functionality described herein regarding application or reapplication of a control schema may be reflected in content of such a reapplication section, according to various embodiments.
[0077] Reapplication of a control schema may thus include, in some instances, reducing a size of content used for an initial application (e.g. omitting one or more portions of content, abbreviating one or more portions, etc.). Such size reduction may be performed based on a current utilization rate of a context window associated with a user LLM session in some instances (e.g., if limited memory or tokens for the context window are at 90% or greater usage, then reduce control schema content by 20%+ when reapplying the schema). In various embodiments, a context window for an LLM may have one or more specific limitations with regard to memory and / or tokens—as just one example, a context window might be limited to 4096 tokens. In such embodiments, an increasing number of tokens used within a context window may correspond to an increasing usage of memory (e.g. random-access memory and / or permanent storage) by LLM system 120A. Parameters for adjusting a possible size reduction of control schema content, relative to reapplication, may be specified by an authorized user of intermediate system 110 and / or LLM system 120A, according to various embodiments.
[0078] Method 400 may thus include a first, initial application of a control schema, followed by an arbitrary number of reapplications of the control schema to an LLM. In some embodiments, reapplication may not be performed following or in association with each new user prompt during a session, but might be reapplied according to one or more criteria (as may be specified within the control schema or elsewhere). For example, control schema reapplication criteria could specify that reapplication only should occur after every second or third user prompt, only when at the last reapplication occurred more than four user prompts in the past, only when a certain context window utilization threshold has been reached, etc. Multiple reapplication criteria may be used in some instances.
[0079] In some embodiments of method 400, a user may have knowledge of all or a portion of a control schema as may be used by intermediate system 110 and / or LLM system 120A. Knowledge of a control schema, for example, may allow an end user to make requests or other LLM prompts with reference to the control schema. Thus, with a control schema that defined both a “Sherlock Holmes” fictional character and a “Moriarity” fictional character, the end user might be able to request that LLM 125A generate output content based on a persona associated with either of these characters. Such a user request (as may appear within a user prompt) could include “Please phrase your response using the ‘Sherlock.V1’ persona” or “Please respond to me as ‘Moriarity.V2’.” In this example, the terms “Sherlock.V1” and “Moriarity.V2” may thus serve as references to an output constraint parameter defined by control schema 108 (numerous other labels, strings, URLs, phrases, and / or other identifiers, as may appear in a control schema, may also serve as such references). Method 400 may thus include receiving (e.g. by system 110 or 120A), from user system 105, a reference to a particular output constraint parameter defined by a control schema. Method 400 may also include decoding such a reference (e.g. by finding data associated with the reference within control schema 108 and / or by performing a reference lookup on a database or other data structure populated with control schema reference data). Based on the reference, as may be provided by an end user, particular LLM output may be generated accordingly. Continuing the example above, LLM output responsive to a user request might be generated according to the Sherlock Holmes or Moriarity persona, regardless of whether the end user was aware of or had access to a full definition of what that persona (parameter) entailed.
[0080] In some embodiments, in addition to techniques related to reapplying a control schema into an LLM, a larger control schema or schema-derived control underlier may be stored in provider side memory, project memory, a retrieval-backed store, vector store, or similar persistent / retrievable memory layer (e.g. at any or all of user LLM system 120A, intermediate system 110, and / or user system 105). In such embodiments, a user prompt input could include a lightweight glyph, law, reference, mode ID, or other trigger that causes implementation of one or more aspects of control architecture techniques described herein (e.g. at system 120A, 110, 105, or other implementing computer system) to retrieve, activate, or apply the corresponding control schema or schema-derived control information. Thus, in some instances, a reference, glyph, or other identifier may be provided by a user (e.g. of user system 105) in order to invoke all or a portion of one or more particular control schemas.
[0081] In some instances, a single identifier may also be used to invoke all or a portion of multiple control schemas. For example, the identifier “Moriarty.V2” might invoke at least a portion of two different schemas using this identifier, and both those schemas may be used in accordance with any of the techniques described herein. Generally, multiple schemas may be used in any number of embodiments, and in such instances application and / or reapplication of the control schema to an LLM may be performed multiple times serially and / or in parallel (for instance, all or a portion of control schema #1 may be applied initially followed by an application of all or a portion of control schema #2; reapplication may also proceed similarly).
[0082] Use of such references by end users may allow significant flexibility with control schemas, as a user might utilize one or more aspects of a control schema without having to define or have access to that schema (which might be maintained only on intermediate system 110 and / or LLM system 120A, for example). Such reference usage may also be employed with respect to multiple control schema parameters, or an entirety of a control schema as well. For example, if a first user created a control schema for a knowledgeable certified professional account personality, a second user might be able to make use of the control schema by requesting it via an identifier (e.g. “Please answer as ‘expert_cpa_01’.”). Multiple different control schemas may be stored and / or maintained by any of user system 105, intermediate system 110, and / or LLM system 120A. Thus, an end user (or other entity) may request to use one or more particular control schemas, even if an entirety of such a requested schema (or none at all) were stored by a requesting device or included within such a request. Many different permutations of the above techniques with regard to schema references are possible and contemplated.
[0083] In some embodiments of method 400, a user (e.g. of user system 105, intermediate system 110, and / or LLM system 120A) may define or modify a control schema. As one example, an end user of system 105 may initially define a control schema, or modify such a control schema, and may transmit the schema to system 110 and / or LLM system 120A for usage in accordance with techniques described herein. A schema initially defined or modified by a first user can also be modified by a second user in some embodiments. For example, a first user might create the “Sherlock. V1” persona, and a second user could modify it to create a “Sherlock.V2” persona, and a second, different control schema may be stored accordingly. Such modification may be facilitated via a UI such as a chat window in some instances (e.g. an end user might prompt LLM 125A for a definition of the schema containing Sherlock.V1, make a modification, and request or otherwise cause LLM 125A to store a second schema with Sherlock.V2).
[0084] FIG. 5 depicts a block diagram of an example computer system 500 in which various examples of the disclosed technology described herein may be implemented. The computer system 500 includes a bus 502 or other communication mechanism for communicating information, one or more hardware processors 504 coupled with bus 502 for processing information. Hardware processor(s) 504 may be, for example, one or more general purpose microprocessors.
[0085] The computer system 500 also includes a main memory 506, such as a random-access memory (RAM), cache and / or other dynamic storage devices, coupled to bus 502 for storing information and instructions to be executed by processor 504. Main memory 506 also may be used for storing temporary variables or other intermediate information during execution of instructions to be executed by processor 504. Such instructions, when stored in storage media accessible to processor 504, render computer system 500 into a special-purpose machine that is customized to perform the operations specified in the instructions.
[0086] The computer system 500 further includes a read only memory (ROM) 508 or other static storage device coupled to bus 502 for storing static information and instructions for processor 504. A storage device 510, such as a magnetic disk, optical disk, or USB thumb drive (Flash drive), etc., is provided and coupled to bus 502 for storingInformation and Instructions.
[0087] The computer system 500 may be coupled via bus 502 to a display 512, such as a liquid crystal display (LCD) (or touch screen), for displaying information to a computer user. An input device 514, including alphanumeric and other keys, is coupled to bus 502 for communicating information and command selections to processor 504. Another type of user input device is cursor control 516, such as a mouse, a trackball, or cursor direction keys for communicating direction information and command selections to processor 504 and for controlling cursor movement on display 512. In some examples, the same direction information and command selections as cursor control may be implemented via receiving touches on a touch screen without a cursor.
[0088] The computing system 500 may include a user interface module to implement a GUI that may be stored in a mass storage device as executable software codes that are executed by the computing device(s). This and other modules may include, by way of example, components, such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
[0089] In general, the word “component,”“engine,”“system,”“database,” data store,” and the like, as used herein, can refer to logic embodied in hardware or firmware, or to a collection of software instructions, possibly having entry and exit points, written in a programming language, such as, for example, Java, C or C++. A software component may be compiled and linked into an executable program, installed in a dynamic link library, or may be written in an interpreted programming language such as, for example, BASIC, Perl, or Python. It will be appreciated that software components may be callable from other components or from themselves, and / or may be invoked in response to detected events or interrupts. Software components configured for execution on computing devices may be provided on a computer readable medium, such as a compact disc, digital video disc, flash drive, magnetic disc, or any other tangible medium, or as a digital download (and may be originally stored in a compressed or installable format that requires installation, decompression or decryption prior to execution). Such software code may be stored, partially or fully, on a memory device of the executing computing device, for execution by the computing device. Software instructions may be embedded in firmware, such as an EPROM. It will be further appreciated that hardware components may be comprised of connected logic units, such as gates and flip-flops, and / or may be comprised of programmable units, such as programmable gate arrays or processors.
[0090] The computer system 500 may implement the techniques described herein using customized hard-wired logic, one or more ASICs or FPGAs, firmware and / or program logic which in combination with the computer system causes or programs computer system 500 to be a special-purpose machine. According to one example of the disclosed technology, the techniques herein are performed by computer system 500 in response to processor(s) 504 executing one or more sequences of one or more instructions contained in main memory 506. Such instructions may be read into main memory 506 from another storage medium, such as storage device 510. Execution of the sequences of instructions contained in main memory 506 causes processor(s) 504 to perform the process steps described herein. In alternative examples, hard-wired circuitry may be used in place of or in combination with software instructions.
[0091] The term “non-transitory media,” and similar terms, as used herein refers to any media that store data and / or instructions that cause a machine to operate in a specific fashion. Such non-transitory media may comprise non-volatile media and / or volatile media. Non-volatile media includes, for example, optical or magnetic disks, such as storage device 510. Volatile media includes dynamic memory, such as main memory 506. Common forms of non-transitory media include, for example, a floppy disk, a flexible disk, hard disk, solid state drive, magnetic tape, or any other magnetic data storage medium, a CD-ROM, any other optical data storage medium, any physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM, NVRAM, any other memory chip or cartridge, and networked versions of the same.
[0092] Non-transitory media is distinct from but may be used in conjunction with transmission media. Transmission media participates in transferring information between non-transitory media. For example, transmission media includes coaxial cables, copper wire and fiber optics, including the wires that comprise bus 502. Transmission media can also take the form of acoustic or light waves, such as those generated during radio-wave and infrared data communications.
[0093] The computer system 500 also includes a communication interface 518 coupled to bus 502. Network interface 518 provides a two-way data communication coupling to one or more network links that are connected to one or more local networks. For example, communication interface 518 may be an integrated services digital network (ISDN) card, cable modem, satellite modem, or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, network interface 518 may be a local area network (LAN) card to provide a data communication connection to a compatible LAN (or WAN component to communicate with a WAN). Wireless links may also be implemented. In any such implementation, network interface 518 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.
[0094] A network link typically provides data communication through one or more networks to other data devices. For example, a network link may provide a connection through local network to a host computer or to data equipment operated by an Internet Service Provider (ISP). The ISP in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the “Internet.” Local network and Internet both use electrical, electromagnetic or optical signals that carry digital data streams. The signals through the various networks and the signals on network link and through communication interface 518, which carry the digital data to and from computer system 500, are example forms of transmission media.
[0095] The computer system 500 can send messages and receive data, including program code, through the network(s), network link and communication interface 518. In the Internet example, a server might transmit a requested code for an application program through the Internet, the ISP, the local network and the communication interface 518.
[0096] The received code may be executed by processor 504 as it is received, and / or stored in storage device 510, or other non-volatile storage for later execution.
[0097] Each of the processes, methods, and algorithms described in the preceding sections may be embodied in, and fully or partially automated by, code components executed by one or more computer systems or computer processors comprising computer hardware. The one or more computer systems or computer processors may also operate to support performance of the relevant operations in a “cloud computing” environment or as a “software as a service” (SaaS). The processes and algorithms may be implemented partially or wholly in application-specific circuitry. The various features and processes described above may be used independently of one another, or may be combined in various ways. Different combinations and sub-combinations are intended to fall within the scope of this disclosure, and certain method or process blocks may be omitted in some implementations. The methods and processes described herein are also not limited to any particular sequence, and the blocks or states relating thereto can be performed in other sequences that are appropriate, or may be performed in parallel, or in some other manner. Blocks or states may be added to or removed from the disclosed examples. The performance of certain of the operations or processes may be distributed among computer systems or computers processors, not only residing within a single machine, but deployed across a number of machines.
[0098] As used herein, a circuit might be implemented utilizing any form of hardware, software, or a combination thereof. For example, one or more processors, controllers, ASICs, PLAs, PALs, CPLDs, FPGAs, logical components, software routines or other mechanisms might be implemented to make up a circuit. In implementation, the various circuits described herein might be implemented as discrete circuits or the functions and features described can be shared in part or in total among one or more circuits. Even though various features or elements of functionality may be individually described or claimed as separate circuits, these features and functionality can be shared among one or more common circuits, and such description shall not require or imply that separate circuits are required to implement such features or functionality. Where a circuit is implemented in whole or in part using software, such software can be implemented to operate with a computing or processing system capable of carrying out the functionality described with respect thereto, such as computer system 500.
[0099] As used herein, the term “or” is to be construed inclusively unless otherwise indicated. Moreover, the description of resources, operations, or structures in the singular shall not be read to exclude the plural. Conditional language, such as, among others, “can,”“could,”“might,” or “may,” unless specifically stated otherwise, or otherwise understood within the context as used, is generally intended to convey that certain examples include, while other examples do not include, certain features, elements and / or steps. Terms such as “first, second” etc. are intended to be descriptive, and do not imply a specific ordering (e.g. spatial, temporal, or otherwise) unless specifically indicated. Thus, a “first” transmission of information does not necessarily occur in time prior to a “second” transmission, for example.
[0100] The term “configured to” as used herein is not intended to invoke means-plus-function usage unless specifically noted, but rather, indicates that a component (e.g. structure) contains stored logic (and associated data in some embodiments) executable to cause that component to perform the actions indicated. Such components may include software instructions stored on a non-transitory computer-readable medium, in which case the instructions may be encoded with particular logic that causes a described action, operation, and / or effect to occur. Such components may also include hardware (e.g. EEPROM, ASIC, etc.) and in such cases the logic to cause a described action, operation, and / or effect to occur may be encoded within the hardware itself.
[0101] Terms and phrases used in this document, and variations thereof, unless otherwise expressly stated, should be construed as open ended as opposed to limiting. Adjectives such as “conventional,”“traditional,”“normal,”“standard,”“known,” and terms of similar meaning should not be construed as limiting the item described to a given time period or to an item available as of a given time, but instead should be read to encompass conventional, traditional, normal, or standard technologies that may be available or known now or at any time in the future. The presence of broadening words and phrases such as “one or more,”“at least,”“but not limited to” or other like phrases in some instances shall not be read to mean that the narrower case is intended or required in instances where such broadening phrases may be absent.
[0102] With respect to the previously filed applications referenced above and to which priority is claimed, Applicant notes that no statement, drawing, description, claim, or figure in any of the foregoing applications is intended to limit the present specification, claims, or figures in any way. In the event of any conflict or apparent conflict between any content of the previously filed applications and the present application, precedence and priority for meaning and interpretation shall be given to the content of the present specification, claims, and figures.
Claims
1. A method, comprising:accessing, by a computer system, a large language model (LLM) control schema, wherein the control schema specifies a plurality of output constraint parameters affecting output content of an LLM associated with the computer system;receiving, by the computer system, a user prompt specifying a user request for the LLM to generate particular output content;based on the user request and the control schema, the computer system causing the LLM to generate the particular output content using the plurality of output constraint parameters affecting the output content of the LLM;causing transmission of the generated particular output content to a user device of a user; andreapplying, by the computer system, at least a portion of the control schema to a context window of the LLM.
2. The method of claim 1, further comprising:receiving a second user prompt specifying a second user request for the LLM to generate second output content;based on the second user request and the reapplied portion of the control schema, the computer system causing the LLM to generate the second output content using the plurality of output constraint parameters affecting the output content of the LLM; andcausing transmission of the generated second output content.
3. The method of claim 2, further comprising:performing a second reapplication of the reapplied portion of the control schema into the context window of the LLM;receiving a third user prompt specifying a third user request for the LLM to generate third output content;based on the third user request and the second reapplication, the computer system causing the LLM to generate the third output content; andcausing transmission of the generated third output content.
4. The method of claim 1, wherein the reapplied portion of the control schema is generated automatically by the LLM based on control instructions specified in the control schema.
5. The method of claim 1, further comprising:receiving, by the computer system from the user device, a reference to a particular output constraint parameter defined in a particular control schema stored by the computer system.
6. The method of claim 5, further comprising:the computer system decoding the reference to the particular output constraint parameter using the particular control schema stored by the computer system, wherein generating the particular output content is based on the decoding.
7. The method of claim 1, wherein the control schema is stored by the computer system.
8. The method of claim 7, further comprising:the computer system automatically implementing the control schema for generating the particular output content without an explicit request from the user to have the LLM use the control schema.
9. The method of claim 7, further comprising:the computer system receiving a control request from the user for the LLM to use the control schema, wherein the control request does not include an entirety of the control schema.
10. The method of claim 1, wherein reapplying the at least a portion of the control schema into a context window of the LLM comprises including the reapplied portion in the generated particular output content.
11. The method of claim 9, further comprising:the computer system causing a display of the generated particular output content on the user device to omit display of the reapplied portion of the control schema.
12. The method of claim 1, wherein the context window of the LLM comprises a token limit corresponding to a maximum number of tokens upon which the LLM is configured to generate output, and wherein an increasing quantity of tokens in the context window corresponds to an increasing usage of memory storage by the LLM.
13. A system, comprising:a processor; anda non-transitory computer-readable medium having stored thereon instructions that are executable by the processor to cause the system to perform operations comprising:providing, to a user device of a user, a user interface (UI) configured to allow the user to submit a prompt to a large language model (LLM);receiving, via the UI, a user prompt specifying a user request for an LLM to generate particular output content;accessing a large language model (LLM) control schema, wherein the control schema specifies a plurality of output constraint parameters affecting output content of the LLM;based on the user request and the control schema, causing the LLM to generate the particular output content using the plurality of output constraint parameters affecting the output content of the LLM;causing transmission of the generated particular output content to the user device; andreapplying at least a portion of the control schema into a context window of the LLM.
14. The system of claim 13, wherein the operations further comprise:receiving first user input that specifies at least one of an initial definition of the control schema or a modification of the control schema.
15. The system of claim 14, wherein the operations further comprise:storing a reference configured to provide access by the LLM to the control schema for a plurality of different user sessions with different users;receiving a second user prompt from a second user device of a second user;based on determining that the second user prompt includes the reference:accessing the control schema; andgenerating second output content using the plurality of output constraint parameters specified by the control schema; andcausing the second output content to be transmitted to the second user device.
16. The system of claim 14, wherein the operations further comprise:receiving second user input from a second user different from a user associated with the first user input, wherein the second user input specifies a second modification of the control schema;creating a modified control schema in accordance with the second user input from the second user; andstoring the modified control schema.
17. A non-transitory computer-readable medium having stored thereon instructions that are executable by a processor of a computer system to cause the computer system to perform operations, comprising:accessing a large language model (LLM) control schema, wherein the control schema specifies a plurality of output constraint parameters affecting output content of an LLM associated with the computer system;receiving a user prompt, from a user device associated with a user, that specifies a user request for the LLM to generate particular output content;based on the user request and the control schema, causing the LLM to generate the particular output content using the plurality of output constraint parameters affecting the output content of the LLM;causing transmission of the generated particular output content to the user device; andreapplying at least a portion of the control schema into a context window of the LLM.
18. The non-transitory computer-readable medium of claim 17, wherein the operations further comprise:receiving a second user prompt specifying a second user request for the LLM to generate second output content;based on the second user request and the reapplied portion of the control schema, the computer system causing the LLM to generate the second output content using the plurality of output constraint parameters affecting the output content of the LLM; andcausing transmission of the generated second output content.
19. The non-transitory computer-readable medium of claim 17, wherein the plurality of output constraint parameters include at least one of an average number of words per sentence, a vocabulary constraint, a prohibition against first content being included in LLM output, a positive requirement for second content being included in the LLM output, a data constraint on one or more first data sources that the LLM is not permitted to access in generating the LLM output, or a data requirement on one or more second data sources that the LLM is required to access in generating the LLM output.
20. The non-transitory computer-readable medium of claim 17, wherein the operations further comprise:causing a display of the generated particular output content on the user device to omit display of the reapplied portion of the control schema, wherein reapplying the at least a portion of the control schema into a context window of the LLM comprises including the reapplied portion in the generated particular output content.
