A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the United States Patent and Trademark Office patent file or records but otherwise reserves all copyright rights whatsoever.
This patent application relates generally to database systems, and more specifically to natural language processing techniques involving database systems.
“Cloud computing” services provide shared resources, applications, and information to computers and other devices upon request. In cloud computing environments, services can be provided by one or more servers accessible over the Internet rather than installing software locally on in-house computer systems. Users can interact with cloud computing services to undertake a wide range of tasks.
One type of cloud computing system is a generative language model. Generative language models are used to generate novel text based on provided input. However, interactions with generative language models can pose significant challenges, for instance due to limitations inherent in generative language models. For instance, generative language models are distinct from and typically do not interact with the database systems in which most business data is stored. Accordingly, improved techniques for facilitating interactions with generative language models via a database system environment are desired.
The included drawings are for illustrative purposes and serve only to provide examples of possible structures and operations for the disclosed inventive systems, apparatus, methods, and computer program products for prompt authoring and execution. These drawings in no way limit any changes in form and detail that may be made by one skilled in the art without departing from the spirit and scope of the disclosed implementations.
Techniques and mechanisms described herein provide for a generative language model interface system. A prompt studio may provide a graphical user interface through which an end user can configure a tenant prompt template. The tenant prompt template may include natural language instructions for text generation by a generative language model. The tenant prompt template may also include one or more references to information accessible via a database system. A raw prompt may be created for execution by combining the tenant prompt template with one or more raw prompt sections and dynamically determined information determined by retrieving data from the database system. The raw prompt may then be executed by a generative language model to create a completion, which may be parsed to determine information with which to update the database system.
A tenant prompt template is determined at 102 based on user input received at the database system. In some embodiments, determining the tenant prompt template may involve operations such as determining one or more instructions, policies, or examples to include in the tenant prompt template. Alternatively, or additionally, determining the tenant prompt template may involve operations such as determining language information, tone information, output format information, interaction context information, model information, data information, and/or hyperparameter information governing the tenant prompt template. Additional details regarding the determination of a tenant prompt template are discussed with respect to the method 300 shown in
Dynamic input for generation of a prompt based on the tenant prompt template is received at 104. In some embodiments, the dynamic input may include any of various types of dynamically determined information, and may be received from a client machine or an application server implementing a web application via the database system.
One or more database system instructions to retrieve information from the database system are executed at 106 based on the dynamic input. In some embodiments, the instructions may include one or more criteria, database record identifiers, or other such information for selecting database records. Additionally, the instructions may include criteria for selecting information from one or more fields associated with the retrieved database records.
At 108, a prompt is determined based on the tenant prompt template, the dynamic input, and the retrieved information. In some embodiments, the prompt may include a tenant prompt template in which one or more fillable portions are filled based on the dynamic input and/or the retrieved information. The prompt may include one or more additional sections related to operations such as prompt filtering, prompt enclosure, instruction defense, and the like. Additional details regarding the receipt of dynamic input, the retrieval of information from the database system, and the generation of a prompt are discussed with respect to the method 400 shown in
A completion is determined at 110 based on communication with a generative language model. According to various embodiments, generating the completion may involve transmitting the raw prompt to the generative language model through a suitable interface, examples of which are discussed with respect to
The database system is updated at 112 based on the completion. Updating the database system may involve, for instance, storing one or more records in the database system. Alternatively, or additionally, a message including some or all of the novel text may be transmitted to a recipient, such as an application server, a client machine, or another suitable destination. Additional details regarding determining the completion and updating the database system are discussed with respect to the method 600 shown in
A prompt studio 202 may provide a graphical user interface for specifying information involved in generating a prompt template. For instance, the prompt studio may be used to specify one or more prompt templates 204, policies governing prompt templates 206, and/or permissions related to prompt templates 208.
According to various embodiments, access to the generative models is provided via the LLM gateway 210. The LLM gateway 210 provides a secure interface for transmitting data to the generative models. The LLM gateway 210 is also configured to receive and parse responses received from the generative models. For example, the LLM gateway provides services such as data masking, prompt defense, and toxicity detection.
In some implementations, the data masker/demasker 214 may mask private data before a prompt is transmitted to a generative language model. For instance, the data masker may replace a private data value with a unique identifier. Then, when a response is received from the generative language model, the unique identifier may be replaced with the private data. In this way, the generative language model can reason about the context in which the private data is situated without observing the private data.
In some embodiments, the output defender 212 may help to ensure that natural language instructions in a tenant-defined prompt template or in dynamic input from a user are not used to overcome restrictions such as prompt policies. For example, the prompt defender 212 may evaluate dynamic input to compare it against the prompt instructions. As another example, the prompt defender 212 may evaluate output provided by a generative language model against the instructions included in the raw prompt. If a problem is identified by the prompt defender 212, the prompt defender 212 may trigger an automated alert and/or filter the generated prompt. Information related to alerts and filters may be stored in the feedback store 218.
According to various embodiments, the toxicity detector 216 may evaluate novel text generated by a generative language model for content and tone. For instance, the toxicity detector may include a language model trained to identify text indicative of profane or otherwise offensive language. The toxicity detector 216 may determine a toxicity score for a completion and transmit the information to the feedback store for storage.
The feedback store 208 stores information such as toxicity scores 224, data sources 226, prompt performance ratings, audit trail information 220, alerts and filters 228, LLM output 22, and the like. The data sources 226 may be used to store information for external sources of data to be accessed for generating prompts and/or for transmitting data generated by generative language models.
In some embodiments, the LLM output 222 may store information generated by a generative language model. Such information may include completions and/or information extracted from completions.
According to various embodiments, some of the information stored in the feedback store 218 may be determined automatically. For instance, toxicity scores 224 may be automatically determined. Alternatively, or additionally, some of the information stored in the feedback store 218 (e.g., user feedback data) may be determined based on user input.
According to various embodiments, information stored in the feedback store 208 may be used for any of a variety of purposes. Such purposes include, but are not limited to: revising prompt templates, security monitoring, and generating new prompt templates.
In some embodiments, the secure data retrieval interface 230 provides for secure access to data accessible via the database system. For example, the CRM data interface 232 may be used to retrieve CRM data from the database system. As another example, the feedback data interface 234 may be used to store feedback data in the feedback store 218. For instance, end users may provide feedback via the CRM applications 236, and this feedback may then be logged in the feedback store. As yet another example, the feedback data interface 234 may be used to retrieve data from outside the database system, such as from one or more external data sources.
The customer relations management (CRM) applications 236 provide an interface for interacting with one or more client machines and/or other parts of the database system. According to various embodiments, a variety of types of CRM applications may be employed. For instance, a CRM application may be used to store customer data, interact with an existing customer, or conduct sales operations for a new customer.
According to various embodiments, CRM applications may perform any or all of a variety of tasks. For example, a CRM application may receive dynamic input and private the input for generating a raw prompt based on a raw prompt template created via the prompt studio 202. As another example, a CRM application may also receive, process, act on, and distribute information generated by a generative language model and provided via the LLM gateway 210. As yet another example, a CRM application may provide feedback for storage in a feedback store 218 via the secure data retrieval interface 230.
According to various embodiments, the LLM gateway 210 may provide access to any of a variety of LLMs, such as the LLM 240 and the LLM 242. These may include, but are not limited to: ChatGPT provided by OpenAI, Google Bard provided by Google, Llama 2 provided by Meta, a different generative model provided as a service, a generative model provided by the database tenant, or any other suitable generative model.
A request to configure a prompt template for a designated prompt type is received at 302. In some embodiments, the request may be received at the database system from a client device. For instance, the request may be received via a graphical user interface through which the client machine may access computing services at the database system.
According to various embodiments, the prompt type may be used to determine the role of a prompt template within the database system. For example, a prompt template of a database record field type may be linked with a particular database record field. Then, when a user interface is generated in which data stored in the database record field is displayed, a button for generating a prompt based on a prompt template associated with the database record field may be displayed.
In some embodiments, the prompt type may be included with the request. Alternatively, or additionally, the prompt type may be selected via a graphical user interface or provided as part of a configuration file.
One or more instructions for the prompt template are determined at 304. In some embodiments, the one or more instructions may be provided via user input. The one or more instructions may include natural language instructions to a generative language model, provided for the purpose of instructing the generative language model how to generate novel text.
In some embodiments, the one or more instructions may include one or more references to data retrieval from one or more data providers, as is discussed in additional detail elsewhere in the application. The references may include, for instance, fillable portions to be filled with data retrieved from the database system itself or from outside the database system.
In some implementations, a reference to a data provider may invoke a configurable flow. The configurable flow may include flow control logic such as one or more if/then statements that guide the dynamic retrieval of information and/or the inclusion of such information in a prompt based on the prompt template.
In particular embodiments, a data provider may identify types of information that are classified as sensitive, such as personally identifying information. Such information may then be masked when included in a prompt sent to a generative language model.
One or more policies for the prompt template are determined at 306. In some embodiments, a policy may be provided via user input. Alternatively, or additionally, one or more policies may be imposed by a tenant associated with the client machine or by the service provider of the database system.
According to various embodiments, any of a variety of policies may be employed. Examples of potential policies include restrictions on the type of output generated by a generative language model, restrictions on access to or use of potentially sensitive information, restrictions on the use of intellectual property, and the like.
One or more examples for the prompt template are determined at 308. In some embodiments, an example may include text of the type that a prompt generated based on the prompt template should generate. Such examples may be used to guide the generative language model in its generation of novel text. Examples may be provided via user input, retrieved from the database system, or identified in any other suitable way.
Language and/or tone information is determined at 310. According to various embodiments, language and/or tone information may include any instructions or information about the language, dialect, tone, or style governing the novel text generated by the generative language model in response to a prompt determined based on the prompt template. In some cases, such information may be determined at least in part based on user input. Alternatively, or additionally, such information may be determined at least in part by the system itself. For example, a default language and/or dialect may be employed based on information such as the geographic location of the tenant, one or more configuration settings for the tenant, and the like. As another example, default tone or style instructions may be determined based on a geographic location, configuration setting, or context. Alternatively, or additionally, tone or style instructions may be extracted or inferred from the instructions determined at 304.
Output format information for the prompt template is determined at 312. According to various embodiments, the output format information may identify characteristics such as length, organization, and/or division into paragraphs, sections, list elements. Such information may be determined based on user input.
Interaction context information for the prompt template is determined at 314. According to various embodiments, the context information may provide contextual information about the nature of the interaction between the generative language model completing the prompt and the recipient of the novel text. For example, the context information may indicate whether the novel text should be generated from the perspective of an executive, a lawyer, a computer scientist, or some other such role. As another example, the context information may indicate whether the novel text should be generated from the perspective of someone communicating with an executive, a small child, a loyal customer, a concerned customer, or some other such individual or group.
A model for the prompt template is determined at 316. According to various embodiments, any available language generation model may be used. For instance, the language generation model may be GPT-4, Google Bard, a user-provided model, or another such generative language model. Such information may be determined based on user input. Alternatively, or additionally, a default model may be used if a different model is not specified.
One or more hyperparameters for the model associated with the prompt template are determined at 318. According to various embodiments, the hyperparameters may include information such as a stop sequence, a temperature, and other such settings governing the execution of the prompt.
Data information for generating the prompt template is determined at 320. According to various embodiments, the data information may include one or more indications of how tenant data stored in the database system is to be used in generating the prompt. For example, the data information may identify one or more types of database records that may be retrieved and used to construct a prompt based on the prompt template.
The prompt template is generated at 322. According to various embodiments, generating the prompt template may involve determining and storing one or more data records reflecting the information discussed with respect to the method 300. Additional details regarding such records are discussed throughout the application.
At 1004, a list of prompt template entries that have already been configured is shown. According to various embodiments, a prompt template may be of one of various types, such as field, email, website, live chat, transcription, record summarization, unstructured text summarization, and more. For example, a record summarization prompt template type may be used to summarize a record such as a contact record. As another example, a text summarization prompt template type may be used to summarize an unstructured text portion such as an
In some embodiments, a prompt template's type may guide its appearance in a user interface. For example, a contact phone prompt template associated with a phone number field of a contact object may be triggered by a button placed in proximity in a user interface to a region in which a phone number for a contact is displayed. As another example, a reply recommendation prompt template for a live chat interface may be triggered by a user interface element positioned near a live chat interface in which a human agent is interacting with a person in a chat session.
In some embodiments, a prompt template's type may guide the information requested during the configuration of the prompt template, for instance as shown in
In
In
Returning to flowcharts,
A request to execute a prompt is received at 402. In some embodiments, the request may be received at the database system from a client device. For instance, the request may be received via a graphical user interface through which the client machine may access computing services at the database system.
In some embodiments, the request may be received from the database system itself. For example, the database system may be part of an on-demand computing services environment that executes various web applications. During its execution, a web application may generate the request on behalf of a tenant as part of its operations to provide computing services to the tenant.
Dynamic input information for the prompt is determined at 404. In some embodiments, the dynamic input information may be provided with the request received at 402. For instance, the dynamic input information may be provided via user input or via an API request sent from a web application.
According to various embodiments, the dynamic input information may include any of various types of data. For example, the dynamic input information may include text to include in the prompt. As another example, the dynamic input information may identify one or more database records containing information for inclusion in the prompt. The one or more database records may be identified directly (e.g., by an identifier), via one or more search terms, via one or more query criteria, and/or via any other suitable mechanism.
According to various embodiments, the dynamic input information may include any information that is specific to the prompt instance but not the prompt template. For example, if the prompt template is used to determine a response in a customer interaction, then the dynamic information may include information that is specific to that customer interaction and not generic to all customer interactions. In such a situation, the dynamic input information may include, for instance, one or more records from a chat interaction or transcribed voice interactions between the customer and the system.
According to various embodiments, the dynamic input information may include a locale and/or language setting associated with a requestor associated with the generation of the prompt. For instance, the requestor may be authenticated to a database system account associated with a database record identifying a particular language preferred by the requestor. Language information may then be used to guide the generation of the information included in the prompt. For instance, the prompt may provided to the generative language model in the requestor's language, and then the generative language model may generate output in the user's language.
A prompt template is identified at 406. In some embodiments, the prompt template may be generated as discussed with respect to the method 300 shown in
One or more instructions for retrieving information via the database system are identified at 408. In some embodiments, the one or more instructions may be identified based on the raw prompt template determined at 406. For instance, the raw prompt template may include one or more references to database object types. Such references may be combined with runtime information such as a record ID referenced in the dynamic input information or determined from context to then determine instructions for retrieving information from the database system.
At 410, a determination is made as to whether the requestor, such as a database system account, has permission to access the data included in the prompt. The determination may be made by accessing one or more repositories of permission rules stored in the database system and comparing the retrieved rules against the information to be included in the prompt.
One or more database records are retrieved for the prompt at 412. According to various embodiments, the one or more database records may be identified based on the request received at 402. For example, the request may be received by the database system in the context of a particular interaction related to a customer record. As another example, the request received at 402 may explicitly identify a particular database record or records to which the request relates.
In some embodiments, the information may be retrieved via the database system but need not necessarily be stored in the database system. For instance, the instructions may identify one or more sources of information external to the database system. The database system may then retrieve the requested information from the one or more sources.
A generative language model for executing the prompt is determined at 414. In some embodiments, the generative language model may be predetermined, for instance during the execution of the method 300 shown in
The raw prompt is generated at 416. According to various embodiments, generating the raw prompt may involve replacing one or more fillable portions in the prompt template with some or all of the dynamic input information and the information retrieved via the database system. In addition, the filled prompt template may be encapsulated in a raw prompt that includes one or more sections before and/or after the filled prompt template.
In particular embodiments, the raw prompt may vary based on the generative language model selected for executing the prompt. For example, different generative language models may respond differently to different instructions. Accordingly, one or more elements of the raw prompt, such as instruction defense, may be tuned differently for different generative language models. Thus, the particular configuration of elements to include in the raw prompt may be selected based at least in part on the generative language model determined at 412.
According to various embodiments, the term “raw prompt” is used herein to refer to a prompt that encompasses and contains a filled prompt template along with other elements. For example, as shown in
In some embodiments, some or all of a raw prompt may be kept private from users of the database system, for instance to provide enhanced security by concealing from end users information such as the prompt policies 504 and/or the instruction defense 506.
In some embodiments, the prompt policies section 504 may include one or more natural language instructions specifying policies governing the completion of the prompt. According to various embodiments, the policies may include natural language instructions specifying information such as that discussed with respect to the method 300 shown in
According to various embodiments, the instruction defense section 506 includes one or more natural language instructions to the generative language model for guarding against overcoming policies via specially crafted dynamic user input. For example, the instruction defense section 506 may include a natural language instruction to the generative language model instructing the generative language model to ignore any instructions that are dynamically input to the prompt template during execution that contradict instructions from within the prompt template.
According to various embodiments, the prompt content 508 includes one or more user-provided natural language instructions to the generative language model. The user-provided natural language instructions may include or reflect dynamic input 510.
In some embodiments, the dynamic input may include dynamically received natural language instructions. For instance, a user may dynamically provide natural language instructions to include in the raw prompt via a chat interface, graphical user interface, or application procedure interface.
In some embodiments, the dynamic input may include data retrieved based on contextual information determined at runtime. For instance, if the prompt content 508 includes a reference to one or more database fields, then the dynamic input may include data corresponding to the database fields and retrieved from the database system. The database object from which to retrieve the data corresponding with the database fields may be determined dynamically. For example, the database object may be identified based on user input. As another example, the database object may identified automatically, such as based on information recently accessed by a user account responsible for triggering the generation of the raw prompt 502.
In some implementations, the prompt enclosure 512 may include one or more natural language instructions indicating that the user-specified prompt content 508 is finished. For instance, the prompt enclosure 512 may instruct the generative language model as to how to respond if the prompt content includes instructions to disregard any previous instructions, or take other such actions that are not permitted.
In some embodiments, the post-prompting section 514 and/or the prompt filter section 516 may include one or more natural language instructions related to the language, tone, length, and/or style to be used when generating the novel text.
An example of a raw prompt generated in accordance with various embodiments of techniques and mechanisms described herein is shown below. In the following raw prompt, fillable portions are shown within braces (e.g., {!fillable-portion})).
As an example of the execution of the operations discussed herein, and specifically with respect to the method 300 shown in
To determine a prompt based on the prompt template, the fillable portions may be filled at runtime with information dynamically determined based on the interaction filled. For example, the {conv_context} portion may be filled with all or a portion of a conversation with a customer, such as “Hello! I'm reaching out because my water pack seems to be broken. The water flow is pretty slow.” As another example, the conversation may be used to retrieve one or more knowledge articles, from which text may be extracted for inclusion in the {Retriever.knowledge_recommendations} fillable portion. Finally, information may be retrieved from the database may be retrieved to directly fill one or more other elements of the prompt. For example, a completed tenant prompt is as follows, with the containing raw prompt elements such as those shown in
A request to execute a prompt is received at 602. In some embodiments, the request may be received at the database system from a client device. For instance, the request may be received via a graphical user interface through which the client machine may access computing services at the database system. Alternatively, the request may be received from the database system itself. For example, the database system may be part of an on-demand computing services environment that executes various web applications. During its execution, a web application may generate the request on behalf of a tenant as part of its operations to provide computing services to the tenant. The request may identify a prompt created as discussed with respect to the method 600 shown in
A determination is made at 604 as to whether to mask sensitive information. In some embodiments, the determination may be made at least in part based on configuration information. For example, when configuring the tenant prompt template as discussed with respect to the method 300 shown in
Upon making a determination to mask sensitive information, sensitive information in the prompt is identified at 606. In some embodiments, sensitive information may be identified as such by the database system, for instance when it is retrieved from the database. Alternatively, or additionally, sensitive information may be identified dynamically, for instance by analyzing the prompt to identify information such as names, addresses, identifiers, and other such information.
The sensitive information is replaced with unique identifiers at 608. In some embodiments, the use of a unique identifier may allow sensitive information to be replaced when the completion is received from the generative language model. For example, a name may be replaced with an identifier such as “NAME OF PERSON 35324”. As another example, an address may be replaced with a more general description of a place, such as “LOCATION ID 53342 CITY, STATE, COUNTRY”, with the street and building number omitted. As yet another example, a database record identifier may be replaced with a substitute identifier.
The prompt is transmitted to a generative language model for execution at 610. According to various embodiments, the particular generative language model to which the prompt is sent may be determined as discussed with respect to
A completion is received from the generative language model at 612. According to various embodiments, the completion may include novel text determined by the generative language model based on the raw prompt. The completion may be received in a response message.
The response message is parsed at 614 to determine a response. In some embodiments, parsing the response message may include extracting the novel text from the response message and optionally performing one or more post-processing operations on the novel text. For example, the novel text may be placed in the context of a chat interface. As another example, the novel text may be converted to voice via a text-to-speech system.
A toxicity score is determined at 616 based on the response. In some embodiments, the toxicity score may evaluate the novel text determined by the generative language model via a toxicity model configured to evaluate text toxicity. The toxicity model may identify text characteristics such as sentiment, negativity, hate speech, harmful information, and/or stridency, for instance based on the presence of inflammatory words or phrases, punctuation patterns, and other indicators.
In some embodiments, information about bias may be determined instead of, or in addition to, a toxicity score. Bias detection may involve evaluating generated text to determine, for instance, whether it favors a particular point of view.
A determination is made at 618 as to whether to replace sensitive information in the completion. The determination may be made based on whether sensitive information was masked at operations 606 and 608. Upon determining to replace sensitive information, the unique identifiers added to the prompt at 610 may be replaced with the corresponding sensitive information.
The database system is updated based on the action at 622. According to various embodiments, updating the database system may involve storing, removing, or updating one or more records in the database system. For instance, the response may include novel text to include in a database system record. Alternatively, or additionally, updating the database system may involve transmitting a response to a client machine, an application server, or another recipient. The response may include some or all of the novel text. As still another possibility, updating the database system may involve sending an email or other such message including some or all of the novel text.
In some embodiments, updating the database system may involve storing and/or transmitting the toxicity score. For example, the toxicity score may be presented in a graphical user interface of a web application in which the novel text determined by the generative language model is shown.
In some embodiments, a prompt template may be associated with a prompt class. For example, a system prompt template may be configured and executed by the database system provider. As another example, a user prompt template may be configured and executed by a user of the database system. As yet another example, an assistant prompt template may be configured and executed in the context of a messaging interaction between two humans.
In some embodiments, some elements discussed with respect to the method 600 shown in
In
According to various embodiments, feedback may be received in any of various ways. For example, feedback may be received as a thumbs up or thumbs down. As another example, feedback may be received at explicit text feedback. As yet another example, feedback may include information such as the prompt itself, the generated response, and/or a corrected response. As still another example, feedback may include one or more edits, text regeneration requests, text usages, and/or abandonment of generated text. Such information may be used for observability monitoring, alerts, analytics, prompt adjustments, model tuning, and/or any other suitable purpose.
An on-demand database service, implemented using system 716, may be managed by a database service provider. Some services may store information from one or more tenants into tables of a common database image to form a multi-tenant database system (MTS). As used herein, each MTS could include one or more logically and/or physically connected servers distributed locally or across one or more geographic locations. Databases described herein may be implemented as single databases, distributed databases, collections of distributed databases, or any other suitable database system. A database image may include one or more database objects. A relational database management system (RDBMS) or a similar system may execute storage and retrieval of information against these objects.
In some implementations, the application platform 718 may be a framework that allows the creation, management, and execution of applications in system 716. Such applications may be developed by the database service provider or by users or third-party application developers accessing the service. Application platform 718 includes an application setup mechanism 738 that supports application developers' creation and management of applications, which may be saved as metadata into tenant data storage 722 by save routines 736 for execution by subscribers as one or more tenant process spaces 754 managed by tenant management process 760 for example. Invocations to such applications may be coded using PL/SOQL 734 that provides a programming language style interface extension to API 732. A detailed description of some PL/SOQL language implementations is discussed in commonly assigned U.S. Pat. No. 7,730,478, titled METHOD AND SYSTEM FOR ALLOWING ACCESS TO DEVELOPED APPLICATIONS VIA A MULTI-TENANT ON-DEMAND DATABASE SERVICE, by Craig Weissman, issued on Jun. 1, 2010, and hereby incorporated by reference in its entirety and for all purposes. Invocations to applications may be detected by one or more system processes. Such system processes may manage retrieval of application metadata 766 for a subscriber making such an invocation. Such system processes may also manage execution of application metadata 766 as an application in a virtual machine.
In some implementations, each application server 750 may handle requests for any user associated with any organization. A load balancing function (e.g., an F5 Big-IP load balancer) may distribute requests to the application servers 750 based on an algorithm such as least-connections, round robin, observed response time, etc. Each application server 750 may be configured to communicate with tenant data storage 722 and the tenant data 723 therein, and system data storage 724 and the system data 725 therein to serve requests of user systems 712. The tenant data 723 may be divided into individual tenant storage spaces 762, which can be either a physical arrangement and/or a logical arrangement of data. Within each tenant storage space 762, user storage 764 and application metadata 766 may be similarly allocated for each user. For example, a copy of a user's most recently used (MRU) items might be stored to user storage 764. Similarly, a copy of MRU items for an entire tenant organization may be stored to tenant storage space 762. A UI 730 provides a user interface and an API 732 provides an application programming interface to system 716 resident processes to users and/or developers at user systems 712.
System 716 may implement a web-based prompt configuration and execution system. For example, in some implementations, system 716 may include application servers configured to implement and execute software applications through which interactions with generative language models may be configured and executed. The application servers may be configured to provide related data, code, forms, web pages and other information to and from user systems 712. Additionally, the application servers may be configured to store information to, and retrieve information from a database system. Such information may include related data, objects, and/or Webpage content. With a multi-tenant system, data for multiple tenants may be stored in the same physical database object in tenant data storage 722, however, tenant data may be arranged in the storage medium(s) of tenant data storage 722 so that data of one tenant is kept logically separate from that of other tenants. In such a scheme, one tenant may not access another tenant's data, unless such data is expressly shared.
Several elements in the system shown in
The users of user systems 712 may differ in their respective capacities, and the capacity of a particular user system 712 to access information may be determined at least in part by “permissions” of the particular user system 712. As discussed herein, permissions generally govern access to computing resources such as data objects, components, and other entities of a computing system, such as a generative language model interface, a social networking system, and/or a CRM database system. “Permission sets” generally refer to groups of permissions that may be assigned to users of such a computing environment. For instance, the assignments of users and permission sets may be stored in one or more databases of System 716. Thus, users may receive permission to access certain resources. A permission server in an on-demand database service environment can store criteria data regarding the types of users and permission sets to assign to each other. For example, a computing device can provide to the server data indicating an attribute of a user (e.g., geographic location, industry, role, level of experience, etc.) and particular permissions to be assigned to the users fitting the attributes. Permission sets meeting the criteria may be selected and assigned to the users. Moreover, permissions may appear in multiple permission sets. In this way, the users can gain access to the components of a system.
In some an on-demand database service environments, an Application Programming Interface (API) may be configured to expose a collection of permissions and their assignments to users through appropriate network-based services and architectures, for instance, using Simple Object Access Protocol (SOAP) Web Service and Representational State Transfer (REST) APIs.
In some implementations, a permission set may be presented to an administrator as a container of permissions. However, each permission in such a permission set may reside in a separate API object exposed in a shared API that has a child-parent relationship with the same permission set object. This allows a given permission set to scale to millions of permissions for a user while allowing a developer to take advantage of joins across the API objects to query, insert, update, and delete any permission across the millions of possible choices. This makes the API highly scalable, reliable, and efficient for developers to use.
In some implementations, a permission set API constructed using the techniques disclosed herein can provide scalable, reliable, and efficient mechanisms for a developer to create tools that manage a user's permissions across various sets of access controls and across types of users. Administrators who use this tooling can effectively reduce their time managing a user's rights, integrate with external systems, and report on rights for auditing and troubleshooting purposes. By way of example, different users may have different capabilities with regard to accessing and modifying application and database information, depending on a user's security or permission level, also called authorization. In systems with a hierarchical role model, users at one permission level may have access to applications, data, and database information accessible by a lower permission level user, but may not have access to certain applications, database information, and data accessible by a user at a higher permission level.
As discussed above, system 716 may provide on-demand database service to user systems 712 using an MTS arrangement. By way of example, one tenant organization may be a company that employs a sales force where each salesperson uses system 716 to manage their sales process. Thus, a user in such an organization may maintain contact data, leads data, customer follow-up data, performance data, goals and progress data, etc., all applicable to that user's personal sales process (e.g., in tenant data storage 722). In this arrangement, a user may manage his or her sales efforts and cycles from a variety of devices, since relevant data and applications to interact with (e.g., access, view, modify, report, transmit, calculate, etc.) such data may be maintained and accessed by any user system 712 having network access.
When implemented in an MTS arrangement, system 716 may separate and share data between users and at the organization-level in a variety of manners. For example, for certain types of data each user's data might be separate from other users' data regardless of the organization employing such users. Other data may be organization-wide data, which is shared or accessible by several users or potentially all users form a given tenant organization. Thus, some data structures managed by system 716 may be allocated at the tenant level while other data structures might be managed at the user level. Because an MTS might support multiple tenants including possible competitors, the MTS may have security protocols that keep data, applications, and application use separate. In addition to user-specific data and tenant-specific data, system 716 may also maintain system-level data usable by multiple tenants or other data. Such system-level data may include industry reports, news, postings, and the like that are sharable between tenant organizations.
In some implementations, user systems 712 may be client systems communicating with application servers 750 to request and update system-level and tenant-level data from system 716. By way of example, user systems 712 may send one or more queries requesting data of a database maintained in tenant data storage 722 and/or system data storage 724. An application server 750 of system 716 may automatically generate one or more SQL statements (e.g., one or more SQL queries) that are designed to access the requested data. System data storage 724 may generate query plans to access the requested data from the database.
The database systems described herein may be used for a variety of database applications. By way of example, each database can generally be viewed as a collection of objects, such as a set of logical tables, containing data fitted into predefined categories. A “table” is one representation of a data object, and may be used herein to simplify the conceptual description of objects and custom objects according to some implementations. It should be understood that “table” and “object” may be used interchangeably herein. Each table generally contains one or more data categories logically arranged as columns or fields in a viewable schema. Each row or record of a table contains an instance of data for each category defined by the fields. For example, a CRM database may include a table that describes a customer with fields for basic contact information such as name, address, phone number, fax number, etc. Another table might describe a purchase order, including fields for information such as customer, product, sale price, date, etc. In some multi-tenant database systems, standard entity tables might be provided for use by all tenants. For CRM database applications, such standard entities might include tables for case, account, contact, lead, and opportunity data objects, each containing pre-defined fields. It should be understood that the word “entity” may also be used interchangeably herein with “object” and “table”.
In some implementations, tenants may be allowed to create and store custom objects, or they may be allowed to customize standard entities or objects, for example by creating custom fields for standard objects, including custom index fields. Commonly assigned U.S. Pat. No. 7,779,039, titled CUSTOM ENTITIES AND FIELDS IN A MULTI-TENANT DATABASE SYSTEM, by Weissman et al., issued on Aug. 17, 2010, and hereby incorporated by reference in its entirety and for all purposes, teaches systems and methods for creating custom objects as well as customizing standard objects in an MTS. In certain implementations, for example, all custom entity data rows may be stored in a single multi-tenant physical table, which may contain multiple logical tables per organization. It may be transparent to customers that their multiple “tables” are in fact stored in one large table or that their data may be stored in the same table as the data of other customers.
Accessing an on-demand database service environment may involve communications transmitted among a variety of different components. The environment 800 is a simplified representation of an actual on-demand database service environment. For example, some implementations of an on-demand database service environment may include anywhere from one to many devices of each type. Additionally, an on-demand database service environment need not include each device shown, or may include additional devices not shown, in
The cloud 804 refers to any suitable data network or combination of data networks, which may include the Internet. Client machines located in the cloud 804 may communicate with the on-demand database service environment 800 to access services provided by the on-demand database service environment 800. By way of example, client machines may access the on-demand database service environment 800 to retrieve, store, edit, and/or process generative language model information.
In some implementations, the edge routers 808 and 812 route packets between the cloud 804 and other components of the on-demand database service environment 800. The edge routers 808 and 812 may employ the Border Gateway Protocol (BGP). The edge routers 808 and 812 may maintain a table of IP networks or ‘prefixes’, which designate network reachability among autonomous systems on the internet.
In one or more implementations, the firewall 816 may protect the inner components of the environment 800 from internet traffic. The firewall 816 may block, permit, or deny access to the inner components of the on-demand database service environment 800 based upon a set of rules and/or other criteria. The firewall 816 may act as one or more of a packet filter, an application gateway, a stateful filter, a proxy server, or any other type of firewall.
In some implementations, the core switches 820 and 824 may be high-capacity switches that transfer packets within the environment 800. The core switches 820 and 824 may be configured as network bridges that quickly route data between different components within the on-demand database service environment. The use of two or more core switches 820 and 824 may provide redundancy and/or reduced latency.
In some implementations, communication between the pods 840 and 844 may be conducted via the pod switches 832 and 836. The pod switches 832 and 836 may facilitate communication between the pods 840 and 844 and client machines, for example via core switches 820 and 824. Also or alternatively, the pod switches 832 and 836 may facilitate communication between the pods 840 and 844 and the database storage 856. The load balancer 828 may distribute workload between the pods, which may assist in improving the use of resources, increasing throughput, reducing response times, and/or reducing overhead. The load balancer 828 may include multilayer switches to analyze and forward traffic.
In some implementations, access to the database storage 856 may be guarded by a database firewall 848, which may act as a computer application firewall operating at the database application layer of a protocol stack. The database firewall 848 may protect the database storage 856 from application attacks such as structure query language (SQL) injection, database rootkits, and unauthorized information disclosure. The database firewall 848 may include a host using one or more forms of reverse proxy services to proxy traffic before passing it to a gateway router and/or may inspect the contents of database traffic and block certain content or database requests. The database firewall 848 may work on the SQL application level atop the TCP/IP stack, managing applications' connection to the database or SQL management interfaces as well as intercepting and enforcing packets traveling to or from a database network or application interface.
In some implementations, the database storage 856 may be an on-demand database system shared by many different organizations. The on-demand database service may employ a single-tenant approach, a multi-tenant approach, a virtualized approach, or any other type of database approach. Communication with the database storage 856 may be conducted via the database switch 852. The database storage 856 may include various software components for handling database queries. Accordingly, the database switch 852 may direct database queries transmitted by other components of the environment (e.g., the pods 840 and 844) to the correct components within the database storage 856.
In some implementations, the app servers 888 may include a framework dedicated to the execution of procedures (e.g., programs, routines, scripts) for supporting the construction of applications provided by the on-demand database service environment 800 via the pod 844. One or more instances of the app server 888 may be configured to execute all or a portion of the operations of the services described herein.
In some implementations, as discussed above, the pod 844 may include one or more database instances 890. A database instance 890 may be configured as an MTS in which different organizations share access to the same database, using the techniques described above. Database information may be transmitted to the indexer 894, which may provide an index of information available in the database 890 to file servers 886. The QFS 892 or other suitable filesystem may serve as a rapid-access file system for storing and accessing information available within the pod 844. The QFS 892 may support volume management capabilities, allowing many disks to be grouped together into a file system. The QFS 892 may communicate with the database instances 890, content search servers 868 and/or indexers 894 to identify, retrieve, move, and/or update data stored in the network file systems (NFS) 896 and/or other storage systems.
In some implementations, one or more query servers 882 may communicate with the NFS 896 to retrieve and/or update information stored outside of the pod 844. The NFS 896 may allow servers located in the pod 844 to access information over a network in a manner similar to how local storage is accessed. Queries from the query servers 822 may be transmitted to the NFS 896 via the load balancer 828, which may distribute resource requests over various resources available in the on-demand database service environment 800. The NFS 896 may also communicate with the QFS 892 to update the information stored on the NFS 896 and/or to provide information to the QFS 892 for use by servers located within the pod 844.
In some implementations, the content batch servers 864 may handle requests internal to the pod 844. These requests may be long-running and/or not tied to a particular customer, such as requests related to log mining, cleanup work, and maintenance tasks. The content search servers 868 may provide query and indexer functions such as functions allowing users to search through content stored in the on-demand database service environment 800. The file servers 886 may manage requests for information stored in the file storage 898, which may store information such as documents, images, basic large objects (BLOBs), etc. The query servers 882 may be used to retrieve information from one or more file systems. For example, the query system 882 may receive requests for information from the app servers 888 and then transmit information queries to the NFS 896 located outside the pod 844. The ACS servers 880 may control access to data, hardware resources, or software resources called upon to render services provided by the pod 844. The batch servers 884 may process batch jobs, which are used to run tasks at specified times. Thus, the batch servers 884 may transmit instructions to other servers, such as the app servers 888, to trigger the batch jobs.
While some of the disclosed implementations may be described with reference to a system having an application server providing a front end for an on-demand database service capable of supporting multiple tenants, the disclosed implementations are not limited to multi-tenant databases nor deployment on application servers. Some implementations may be practiced using various database architectures such as ORACLE®, DB2® by IBM and the like without departing from the scope of present disclosure.
Any of the disclosed implementations may be embodied in various types of hardware, software, firmware, computer readable media, and combinations thereof. For example, some techniques disclosed herein may be implemented, at least in part, by computer-readable media that include program instructions, state information, etc., for configuring a computing system to perform various services and operations described herein. Examples of program instructions include both machine code, such as produced by a compiler, and higher-level code that may be executed via an interpreter. Instructions may be embodied in any suitable language such as, for example, Apex, Java, Python, C++, C, HTML, any other markup language, JavaScript, ActiveX, VBScript, or Perl. Examples of computer-readable media include, but are not limited to: magnetic media such as hard disks and magnetic tape;
optical media such as flash memory, compact disk (CD) or digital versatile disk (DVD); magneto-optical media; and other hardware devices such as read-only memory (“ROM”) devices and random-access memory (“RAM”) devices. A computer-readable medium may be any combination of such storage devices.
In the foregoing specification, various techniques and mechanisms may have been described in singular form for clarity. However, it should be noted that some embodiments include multiple iterations of a technique or multiple instantiations of a mechanism unless otherwise noted. For example, a system uses a processor in a variety of contexts but can use multiple processors while remaining within the scope of the present disclosure unless otherwise noted. Similarly, various techniques and mechanisms may have been described as including a connection between two entities. However, a connection does not necessarily mean a direct, unimpeded connection, as a variety of other entities (e.g., bridges, controllers, gateways, etc.) may reside between the two entities.
In the foregoing specification, reference was made in detail to specific embodiments including one or more of the best modes contemplated by the inventors. While various implementations have been described herein, it should be understood that they have been presented by way of example only, and not limitation. For example, some techniques and mechanisms are described herein in the context of particular generative language models. However, the techniques disclosed herein apply to a wide variety of generative language models. Particular embodiments may be implemented without some or all of the specific details described herein. In other instances, well known process operations have not been described in detail in order to avoid unnecessarily obscuring the disclosed techniques. Accordingly, the breadth and scope of the present application should not be limited by any of the implementations described herein, but should be defined only in accordance with the claims and their equivalents.
This application claims the benefit under 35 U.S.C. § 119 (e) of U.S. Provisional Patent App. No. 63/511,578 by Padmanabhan and Ramesh, filed Jun. 30, 2023, titled “Language Model Prompt Authoring and Execution in a Database System”, which is hereby incorporated by reference in its entirety and for all purposes.
Number | Date | Country | |
---|---|---|---|
63511578 | Jun 2023 | US |