ChatGPT’s mainstream introduction in 2022 kicked off an era of Generative AI that has brought both awe and apprehension. Its ability to generate human-like text, images and music has undoubtedly reshaped industries and opened new possibilities. However, with these advancements comes the pressing concerns of untraceability, where the origins of AI-generated content and training data remains obscured, raising ethical and accountability issues.
Though much of the mainstream discussion surrounding Generative AI has been focused on limiting its sentience, a more pressing undiscussed issue is the blurring boundaries between human and AI creations and the need for more traceability and transparency. One year later, the situation on the surface surrounding Generative AI remains largely the same. We don’t know if what we are viewing is human or AI generated.
In the midst of this technological excitement, Numbers Protocol has been working behind the scenes to serve the provenance needs of anything digital so when Generative AI came into the picture, we were more than ready to accommodate. Today we are going to showcase how Numbers Protocol works in tandem with AI platforms to create traceable Generative AI content.
Prerequisites
We will not be writing any code in this showcase as we will be using Instill AI’s Versatile Data Pipeline (VDP) to construct our traceable Generative AI. Instill AI provides no/low code tools to convert unstructured data into meaningful data representations. If you're interested make sure to check them out here.
You will need to create an Instill AI account in order to create the data pipeline and a Capture Account to create on-chain records. Since we are interacting with the Numbers blockchain to create on-chain records we will need NUM token to facilitate these transactions. New Capture accounts are credited with 12 NUM Credits which equates to 120 registrations at no cost.
Here's our tutorial video, if you prefer to watch a video.
Create a Capture Account
Create a Free Instill AI Account
Add New Pipeline
Set up Pipeline Properties
Set up Source & Destination
Adding AI & Blockchain Components
Create and Configuring Connectors
Set up the connections
Configure your pipeline like shown above. Text-to Image takes in text input which is fed into Stability AI to output an Image. This Image is stored along with metadata inputs onto the Numbers blockchain. Since we are interested in also recording our prompt we can also feed the text input Numbers. As a final output we are interested in seeing our final image and the metadata stored on-chain
Configuring the on-chain records
To ensure the on-chain commits are comprehensive you will need to set the values. Do so by navigating to the Numbers Protocol connector component and clicking on “more”. Doing so will open up a window with commit parameters such as license, mining_preference, generatedBy, etc. Fill these with the appropriate values and be mindful that as on-chain records they will be immutable. To learn more about each of these parameters and what they represent in terms of digital provenance see here.
Activate
Click “save” in bottom right to save and initialize our pipeline. Open up the pipeline properties window to view details on how to trigger the pipeline
This pipeline creates an API endpoint that we can initialize by sending a POST request. Before we do that we will need to set up a free API token by navigating to Settings > API Token
Executing the Pipeline with Instill Editor
The pipeline can be executed with an API call utilizing your preferred API platform or sending a curl request. For simpler execution of our pipeline we can utilize the in-editor “Run” function. Enter in the inputs (prompt and other defined parameters) in the start operator and click “Run”. If the execution is successful we will see our results in the end operator. For our pipeline our outputs are the final image and the asset-profile link. The asset-profile link is where we can view the assets full history and most importantly its on-chain records.
Viewing the Asset Profile
Reviewing On-Chain Records
From the commit table click on the transaction opens up the transaction record on Numbers Blockchain. We can click on UTF-8 under Call Function to display the metadata that was recorded on-chain.
For a better view of the metadata we can click on the Asset Tree link from the asset profile commit table. The Asset Tree is a formatted file standard containing the assets information. It contains information like license, creator, encoding format, etc.
That’s It!
In this walkthrough we were able to set up a fully operating data pipeline that takes a text prompt and generates an image utilizing Stable Diffusion AI model. Unlike other AI generated images, it was also registered with a unique ID onto the Numbers Blockchain creating an on-chain record defining the images license, creator, and most importantly how it was created. In other words, we have created a fully transparent and traceable WEB3.0 AI Generated asset that is able to standout in a sea of untraceability.
Next Steps
If you are interested in learning more about Numbers Protocol check out our documentation. Also consider joining our Telegram and Discord Community to get the latest news on Numbers Protocol. If you're a developer and have questions, we would love to hear from you! We have more developer related content coming soon. So stay tuned!