The present invention relates to an Artificial Intelligence (AI) prompt enforcement method. The invention also relates to a system and to a computer program for AI prompt enforcement.
A large learning model (LLM) refers to a powerful and sophisticated machine learning model that can process and understand vast amounts of data in order to perform complex tasks. These models are typically designed to handle a wide range of natural language processing (NLP) tasks, such as language translation, text generation, question answering, sentiment analysis, and more.
Large learning models are built using deep learning techniques, specifically utilizing deep neural networks with a high number of layers and parameters. These models are trained on massive datasets, often consisting of billions of text samples, to learn patterns, relationships, and representations within the data. The training process involves optimizing the model's parameters through a technique called gradient descent, which minimizes the error between predicted and actual outputs.
The use of these models by users is performed by means of AI prompts, which is any form of text, question, information, or coding that the user communicates to the AI model to indicate what response the user is looking for. AI prompts are frequently used in a wide range of applications, including chatbots, virtual assistants, content generation, translation systems, and more. In other words, by providing an appropriate prompt, users can elicit more accurate and relevant responses from AI models, enhancing the effectiveness and usefulness of AI-powered systems.
One prominent example of a large learning model is OpenAI's GPT (Generative Pre-trained Transformer) series, with GPT-3 being one of the most notable versions. These models have achieved impressive performance on various language-related tasks and have demonstrated the ability to generate coherent and contextually relevant text.
Large learning models have significant computational requirements due to their complexity and size, often requiring powerful hardware and specialized infrastructure for training and inference. However, they have the advantage of capturing intricate language nuances and can generate more human-like responses compared to earlier, smaller models.
ChatGPT, developed by OpenAI, was commercially launched on Nov. 30, 2020. OpenAI introduced a subscription plan called ChatGPT Plus, which provided users with benefits such as general access to ChatGPT during peak times, faster response times, and priority access to new features and improvements. This marked an important milestone in making the ChatGPT technology available to a wider audience for various applications and use cases.
This powerful language model has had a significant social impact since its development. Some of the key social impacts caused by ChatGPT are:
Overall, ChatGPT's social impact is a complex interplay of benefits, challenges, and ethical considerations. Continued research, regulation, and responsible use are essential to maximize its positive effects while mitigating potential risks.
Besides the above, AI-based prompts when used to generate content in the style of original authors, may cause various impacts on the authors themselves, for instance:
However, the impact on original authors due to prompting execution with their style can vary. It may bring recognition, inspiration, and creative exploration, but also raises concerns about copyright and the potential dilution of their unique artistic expression.
As an early and preventive solution, governments or regulatory bodies in certain countries are proposing to impose restrictions on the use or access to AI technologies like ChatGPT. These restrictions can be driven by various factors, including concerns related to content control, privacy, security, or the potential impact on society.
Prohibiting ChatGPT or any AI technology in a country may involve measures such as blocking access to the model's servers or imposing legal restrictions on its usage. Governments might enforce these prohibitions through legislation, regulations, or licensing requirements.
It is worth noting that AI-related regulations can vary widely from country to country, and their specific impact on ChatGPT depends on the context and goals of those regulations. OpenAI, as the organization behind ChatGPT, may also have policies in place regarding the availability or usage of its services in certain jurisdictions.
To obtain accurate and up-to-date information on any specific prohibitions or restrictions related to ChatGPT in a particular country, it is advisable to refer to official government statements, legal documents, or consult with legal professionals who specialize in AI and technology regulations.
Other important uses of AI prompts refer to generative services that rely on images, videos, audio and even software. Some examples of the most relevant generative services regarding images are:
The perpetual conflict between the option to ban or limit the use of emerging technologies, such as AI, and the potential benefits offered by such technologies presents a pressing challenge in contemporary society. Present invention aims to explore the intricacies of this dichotomy, highlighting the transformative potential of advanced technological solutions. By synthesizing the principles of freedom of expression and the advantages of cutting-edge technology, the invention proposes a harmonized approach to strike a balance between preserving fundamental rights and leveraging state-of-the-art tools for AI content generation.
To that end, the present invention proposes, according to one aspect, an AI prompt enforcement method that comprises: receiving, by a processor, an AI prompt for an AI-based model (e.g. a chatbot, a virtual assistant, a content generator, a translation system, etc.) from a prompt generator; performing, by a processor, a natural language processing analysis over the received AI prompt to recognize some features thereof, said features including one or more of the following: entities involved, an intention behind the prompt, a context involved in the generative process of the prompt, and/or an overall sentiment of the prompt; selecting, by a processor, an enforcement policy, comprising one or more conditions for the AI prompt, from a plurality of enforcement policies, and attaching the one or more conditions to the AI prompt using a dedicated smart contract; registering, by a processor, the AI prompt as a digital asset to a decentralized and distributed network, e.g. a public blockchain, using the dedicated smart contract, providing a validated AI prompt as a result of said registration; receiving, by a processor, a request to execute the validated AI prompt from a prompt executor; checking, by a processor, if the prompt executor satisfies the selected enforcement policy; and forwarding, by a processor, the validated AI prompt to the AI-based model only if the selected enforcement policy is satisfied by the prompt executor.
Present invention also proposes, according to another aspect, a system for AI prompt enforcement, comprising one or more processors; an AI-based model (e.g. a chatbot, a virtual assistant, a content generator, a translation system, etc.); a memory or database to store enforcement policies (which can be referred of policy stack); a decentralized and distributed network (e.g. a blockchain network); and a dedicated smart contract. The one or more processors are configured to: receive, from a prompt generator, an AI prompt for the AI model; perform a natural language processing analysis over the received AI prompt to recognize some features thereof, said features including one or more of the following: entities involved, an intention behind the prompt, a context involved in the generative process of the prompt, and/or an overall sentiment of the prompt; select an enforcement policy, comprising one or more conditions for the AI prompt, from the stored enforcement policies, and attach the one or more conditions to the AI prompt using the dedicated smart contract; registering the AI prompt as a digital asset to the decentralized and distributed network using the dedicated smart contract, providing a validated AI prompt as a result; receive a request to execute the validated AI prompt from a prompt executor; check if the prompt executor satisfies the selected enforcement policy; and forward the validated AI prompt to the AI-based model only if the selected enforcement policy is satisfied by the prompt executor.
According to the invention, the AI prompt can be registered to the decentralized and distributed network as a digital token, particularly as a non-fungible toke (NFT) such as ERC-721, being the prompt generator registered as the owner of said token.
Therefore, the present invention provides an AI prompt enforcement mechanism based on decentralized and distributed technology, e.g. blockchain, and in some embodiments on digital tokens, that guarantees that specific conditions are met before the execution of the AI prompt may occur.
In some embodiments, the checking step comprises selecting, by the prompt executor, the validated AI prompt from a decentralized application operating on said decentralized network; and applying, by the dedicated smart contract, the one or more attached conditions and retrieving relevant data to satisfy the selected enforcement policy from the decentralized and distributed network.
In some embodiments, the checking step also comprises initiating, by the decentralized application, a dialog with the prompt executor to satisfy a royalty clause, the validated AI prompt being forwarded only after obtaining approval for royalty compensation from the prompt executor.
In some embodiments, the checking step also comprises initiating, by the decentralized application, a dialog with the prompt executor to verify professional credentials of the prompt executor, the validated AI prompt being forwarded only after having verified that the prompt executor qualifies as a given professional. For instance, if the prompt is related to generating a nutritional diet or recipe it is checked whether the prompt executor qualifies as a medical/nutritionist professional or the like.
In some embodiments, the AI prompt is made in plain text format.
According to the invention, the prompt generator and the prompt executor can be the same individual or different individuals.
Moreover, the AI prompt can comprise a text, a question, an information, and/or a coding that the prompt generator communicates to the AI-based model to indicate what response the prompt generator is looking for.
Other embodiments of the invention that are disclosed herein also include software programs to perform the method embodiment steps and operations summarized above and disclosed in detail below. More particularly, a computer program product is one embodiment that has a computer-readable medium including computer program instructions encoded thereon that when executed on at least one processor in a computer system causes the processor to perform the operations indicated herein as embodiments of the invention.
Particularly, the invention can use the original plaintext of an AI prompt as the key asset for a minting process. Moreover, a set of smart contracts (referred as the Smart Contract layer) can be also used to translate an enforcement policy into a set of programmatic rules that will be operational in a blockchain or the like. The invention proposes a mechanism where each enforcement policy can be defined in a dedicated smart contract so a different kind of logic to unlock the AI prompt is applied during the digital token minting. The result is the registration of the plain text AI prompt to a decentralized and distributed network using the dedicated smart contract which solely unlocks the underlying asset if the set of conditions defined in the corresponding smart contract are fully satisfied.
Consequently, present invention provides a harmonized approach that reconciles the need for regulating the use of AI solutions with the benefits offered by state-of-the-art technology. It emphasizes the importance of preserving fundamental rights, such as freedom of expression, while harnessing advanced algorithms and automated systems to enable certain degree of control and moderation for AI prompting execution. It strikes a balance that upholds societal values and leverages technological advancements for responsible information governance.
While it's important to note that the impact of AI on fundamental rights can vary depending on the specific context and implementation, here are some fundamental rights that may be affected:
Likewise, the present invention poses a technologically viable option to the controlled execution of prompts based on AI. The alternative today to mitigate the social risk of inappropriate use of this technology is the prohibition of the service.
In particular, Natural Language Processing analysis applied to the prompt text allows inferring the context, intent, and entities involved in the potential outcome of the AI service. In this way enforcement mechanisms are generated that allow resolving the counterparts and collateral damage of the use of the prompt. Some examples of potential solutions are:
The previous and other advantages and features will be more fully understood from the following detailed description of embodiments, with reference to the attached figures, which must be considered in an illustrative and non-limiting manner, in which:
The present invention defines a framework by which compliance with certain policies related to the respect of the above-mentioned fundamental rights is controlled. Moreover, the invention presents a specific approach so that only AI based prompt requests that have been qualified as “fair”, that is, that fulfill a series of rules/conditions, are eligible to be executed by a Generative AI Service Provider/Model.
The proposed AI prompt enhancement solution can be splitted into two stages: 1) AI prompt validation and registration; 2) AI prompt controlled execution.
In the first stage, see
Secondly, a natural language processing analysis is launched over the AI prompt to understand certain aspects/features thereof such as, entities involved, the intention behind the prompt, the context involved in the generative process, and/or the overall sentiment of the paragraph. Once the AI prompt has been analyzed in terms of lexical comprehension, an enforcement policy is selected. The enforcement policy contains the corresponding rules/conditions for the AI prompt and is programmatically attached to the AI prompt using a dedicated smart contract.
As the final step of the first stage, the prompt generator is registered to a decentralized and distributed network, e.g. a public blockchain,. The resulting outcome is a validated AI prompt registered to a decentralized and distributed network as a new kind of digital asset. The new value added comes from the fact that future executions of the validated AI prompt will not be possible until every single rule/condition stated in the smart contract is fully satisfied.
Optionally the validated AI prompt is registered in the decentralized and distributed network by minting a non-fungible token (NFT), such as an ERC-721.
Since the registration mechanism is based on decentralized and distributed technology, particularly on blockchain techniques, the prompt generator must register to a decentralized wallet with a public address. This public address will be used by the invention to recognize the prompt generator as the official owner of the digital asset holding the validated AI prompt. A decentralized wallet, also known as a Web3 wallet or blockchain wallet, is a digital wallet that enables users to securely store, manage, and interact with their cryptocurrencies and other digital assets within the Web3 ecosystem. Unlike traditional wallets, which are usually operated by centralized entities like banks or online exchanges, Web3 wallets provide users with direct control over their funds and data. They leverage the power of blockchain technology and smart contracts to ensure security, transparency, and user autonomy.
Some of the key features and characteristics of Web3 wallets are:
It's important to note that the Web3 ecosystem aims to empower individuals with greater control and ownership over their digital assets, and Web3 wallets play a crucial role in achieving this vision.
With regard now to the second stage, which takes place when intending to execute the validated AI prompt by a prompt executor, it is checked if the prompt executor satisfies the different rules/conditions (i.e.: royalty payments, professional credentials, governmental identity, etc.) of the enforcement policy applied to the original prompt. The corresponding interactive dialog will guide the prompt executor to the process so once the whole policy is satisfied, the validated AI prompt stored in the blockchain will be released, particularly, in plain text format. The result at the end is a valid AI prompt ready to be executed by the AI model/service provider.
Moreover, the prompt executor can look into a decentralized application, for example, a Dapp, i.e. a type of software application that operates on the decentralized network, typically using blockchain technology, for a validated AI prompt in it. Once the validated
AI prompt is selected, a resolve_access( ) method can query the dedicated smart contract for the rules/conditions that should be met by the prompt executor to extract the original AI prompt.
In some embodiments, in particular in case that the enforcement policy is related to royalty payments, the application layer launches a dialog with the prompt executor to satisfy the royalty clauses.
Note that there are two different roles using the method, each involved in a different stage of the process. The prompt generator, i.e. the individual/user who wants to apply an enforcement policy to an AI prompt,, and the prompt executor, i.e. the individual/user that wants to execute the prompt and will have to meet the enforcement policy as part of the execution conditions previously defined in the smart contract layer. Once the user satisfies every rule/condition stated in the enforcement policy the corresponding AI prompt will be unlocked and ready to be executed by the AI model. It is important to also note that both the prompt generator and the prompt executor do not necessarily be the same individual.
In the present invention, the inference service is based on natural language processing (NLP) techniques. NLP is a field of study focused on enabling computers to understand, interpret, and generate human language. An NLP module typically refers to a software component or system that incorporates various algorithms and techniques to process and analyze natural language data.
The primary goal of an NLP module is to bridge the gap between human language and computer understanding. Here are some common tasks that an NLP module can perform:
NLP modules typically employ techniques such as statistical models, machine learning algorithms, deep learning architectures, and linguistic rules to process and understand natural language data. Particularly, in the present invention, the NLP module will be focus on a subset of tasks such as Named Entity Recognition (NER). The goal of entity analysis is to extract and categorize these named entities from unstructured text data, enabling further analysis and understanding of the information. By identifying and classifying named entities, NER allows for a deeper comprehension of the text and facilitates various downstream applications, such as information retrieval, question answering, information extraction, and knowledge graph construction.
The process of entity analysis typically involves the following steps:
Entity analysis plays a crucial role in various NLP applications, such as information extraction, search engines, recommendation systems, and text summarization. By automatically identifying and categorizing named entities, systems can extract valuable information from text, establish relationships between entities, and provide more accurate and meaningful insights to users.
On the other hand, intent analysis, also known as intent recognition or intent classification, is a task within Natural Language Processing (NLP) that focuses on understanding the underlying intention or purpose behind a given text or user query. The goal of intent analysis is to determine the specific intent or goal that a user wants to achieve through their input.
In the context of conversational systems or chatbots, intent analysis is crucial for effectively understanding user requests and providing appropriate responses. By identifying the intent, the system can route the user's query to the relevant functionality or take the appropriate action.
The process of intent analysis typically involves the following steps:
Intent analysis is essential for building intelligent conversational systems, virtual assistants, and chatbots that can understand user queries and provide meaningful responses. By accurately recognizing the intent, these systems can effectively assist users, perform actions, or direct queries to the relevant functionality, enhancing the overall user experience.
Sentiment analysis, also known as opinion mining, is a branch of Natural Language Processing (NLP) that focuses on determining the sentiment or subjective opinion expressed in a given piece of text. The goal of sentiment analysis is to analyze text data, such as reviews, social media posts, or customer feedback, and classify it as positive, negative, or neutral based on the underlying sentiment.
The process of sentiment analysis typically involves the following steps:
Sentiment analysis has numerous applications, including brand monitoring, customer feedback analysis, social media monitoring, and market research. It allows businesses to gain insights into public opinion, customer satisfaction, and sentiment trends, enabling them to make data-driven decisions and improve their products or services based on feedback. Additionally, sentiment analysis can be used for personalized recommendations, content filtering, or even automated response generation in chatbots or virtual assistants.
Context inference, in the context of Natural Language Processing (NLP), refers to the process of understanding and inferring the contextual information that surrounds a given piece of text. It involves analyzing the text itself, along with its surrounding context, to derive a deeper understanding of the intended meaning.
Context inference takes into account various factors, such as the preceding and following sentences, the overall discourse, the background knowledge, and the situational context. It helps to disambiguate ambiguous words or phrases, resolve pronoun references, and capture the underlying meaning that goes beyond the literal interpretation of the text.
Here are some key aspects of context inference:
Context inference is crucial in NLP tasks such as machine translation, question answering, summarization, and dialogue systems. By inferring the surrounding context, NLP models can generate more accurate and meaningful responses, understand the speaker's intentions, and provide contextually appropriate information.
With regard to the enforcement policy selection, once the original AI prompt is successfully analyzed (e.g. by the NLP Intent Recognizer block/unit), the output will concisely provide information about the actual purpose behind the prompt execution. In addition, another NLP block/unit can be dedicated to intent classification where mainly a pretrained model assigns a probability distribution over predefined intent categories, allowing for the selection of the most likely intent. To adapt the classification process, a specific dictionary can be created where each category is referred to a predefined enforcement policy. This collection of available enforcement policies can be referred to as policy stack. The way an enforcement policy is selected is based on the matching of the previous intent with a set of preselected words specially defined in the semantic context of each enforcement policy.
For example, if the recognized intent is “Compose a piece of music”, the words of the semantic context may include: Generate, Invent, Conceptualize, Design, Develop,
Construct, Imagine, Formulate, Craft, Build, Produce, Fabricate, Engineer, Author, Compose, Originate, Devise, Manufacture, Realize, Shape, Sculpt, Draft, Blueprint, Prototype, Assemble, being the enforcement policy for this case RoyaltyPayment. In another example, if the recognized intent is “Recommend medicine for muscle pain”, the words of the semantic context may include: Diagnose, Assess, Evaluate, Examine, Analyze, Study, Investigate, Consult, Recommend, Prescribe, Propose, Suggest, Advise, Administer, Monitor, Adjust, Follow-up, Treat, Manage, being the enforcement policy for this case ProfessionalCredentialsApproval.
The present invention exposes a collection of available enforcement policies, thus, eligible predefined policies with the corresponding translation into a smart contract. It is worth mention that in order to add new ways of fair execution of AI prompts and depending on the level of restriction to be applied, the following actions are performed: 1) an enforcement policy is defined, 2) the resulting set of rules/conditions are incorporated to the dedicated smart contract, 3) the corresponding semantic logic is added to the NLP engine. The previous actions permit to increase the policy stack (see
Various aspects of the proposed method, as described herein, may be embodied in programming. Program aspects of the technology may be thought of as “products” or “articles of manufacture” typically in the form of executable code and/or associated data that is carried on or embodied in a type of machine readable medium. Tangible non-transitory “storage” type media include any or all of the memory or other storage for the computers, processors, or the like, or associated modules thereof, such as various semiconductor memories, tape drives, disk drives and the like, which may provide storage at any time for the software programming.
All or portions of the software may at times be communicated through a network such as the Internet or various other telecommunication networks. Such communications, for example, may enable loading of the software from one computer or processor into another, for example, from a management server or host computer of a scheduling system into the hardware platform(s) of a computing environment or other system implementing a computing environment or similar functionalities in connection with image processing. Thus, another type of media that may bear the software elements includes optical, electrical and electromagnetic waves, such as used across physical interfaces between local devices, through wired and optical landline networks and over various air-links. The physical elements that carry such waves, such as wired or wireless links, optical links or the like, also may be considered as media bearing the software. As used herein, unless restricted to tangible “storage” media, terms such as computer or machine “readable medium” refer to any medium that participates in providing instructions to a processor for execution.
A machine-readable medium may take many forms, including but not limited to, a tangible storage medium, a carrier wave medium or physical transmission medium. Non-volatile storage media include, for example, optical or magnetic disks, such as any of the storage devices in any computer(s), or the like, which may be used to implement the system or any of its components shown in the drawings. Volatile storage media may include dynamic memory, such as a main memory of such a computer platform. Tangible transmission media may include coaxial cables; copper wire and fiber optics, including the wires that form a bus within a computer system. Carrier-wave transmission media may take the form of electric or electromagnetic signals, or acoustic or light waves such as those generated during radio frequency (RF) and infrared (IR) data communications. Common forms of computer-readable media may include, for example: a floppy disk, a flexible disk, hard disk, magnetic tape, any other magnetic medium, a CD-ROM, DVD or DVD-ROM, any other optical medium, punch cards paper tape, any other physical storage medium with patterns of holes, a RAM, a PROM and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave transporting data or instructions, cables or links transporting such a carrier wave, or any other medium from which a computer may read programming code and/or data. Many of these forms of computer readable media may be involved in carrying one or more sequences of one or more instructions to a physical processor for execution.
Those skilled in the art will recognize that the present teachings are amenable to a variety of modifications and/or enhancements. For example, although the implementation of various components described herein may be embodied in a hardware device, it may also be implemented as a software only solution—e.g., an installation on an existing server. In addition, processing as disclosed herein may be implemented as a firmware, firmware/software combination, firmware/hardware combination, or a hardware/firmware/software combination.
The present disclosure and/or some other examples have been described in the above. According to descriptions above, various alterations may be achieved. The topic of the present disclosure may be achieved in various forms and embodiments, and the present disclosure may be further used in a variety of application programs. All applications, modifications and alterations required to be protected in the claims may be within the protection scope of the present disclosure.
The scope of the present invention is defined in the following set of claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 23382971.2 | Sep 2023 | EP | regional |