Using NLP and the blockchain to build a zero knowledge proof video donation platform

The problems

The power imbalance in video monetization

Because sponsors often hold the purse strings and provide financial support to video creators, there can be a power imbalance between the two parties. This means that sponsors may have more leverage or control over the content that is produced since they are providing the funding for it. This often leads to messaging or product placement that the creator wouldn't normally use in their video.

The issue of power imbalance is not exclusive to sponsors in the online media industry. It can also be observed with video donors. A good example of this is the Bill and Melinda Gates Foundation, which has contributed over 3% of the revenue earned by the popular YouTube channel Kurzgesagt. While they admit to having no creative control over the scripts they do allow the foundation to choose video topics. An example of this dynamic, whether unconsciously or consciously, is the highly scrutinized The Most Gruesome Parasites – Neglected Tropical Diseases – NTDs in which the script takes a happy outcome that would in most likelihood please the foundation.

Transparency and congruency

In the online media industry, laws and regulations mandate that advertisements must contain clear and conspicuous disclosures. This requirement is meant to ensure that audiences are aware when they are being marketed to and can make informed decisions about the products, services or messaging being promoted. However, these regulations typically do not apply to donors who contribute money to support content creators or videos. This lack of regulation and oversight can create challenges in determining whether these contributions are congruent with the brand values of the video creator.

Solution

An immutable, traceable, NLP-powered video donation platform


Regarding the power imbalance, smart contracts on the blockchain can reduce the undue influence on video creators by ensuring that the donation process is managed objectively. Additionally, NLP can level the playing field between creators and donors by providing an objective way to evaluate videos based on various factors such as the number of swear words, brand safety score, topics/sentiments, and language.

In terms of transparency, smart contracts on the blockchain can increase transparency by making the transaction data publicly accessible and verifiable. Meanwhile, NLP can provide a clear and objective way to evaluate video content, enabling donors to see for themselves whether the videos meet their donation criteria.

Lastly, concerning congruency, smart contracts can ensure that donated funds are used for videos that align with the donor's values by releasing funds only if the video meets the donor's criteria. NLP can also help ensure congruency by providing an objective way to evaluate videos and ensuring that the donated funds go to content that aligns with the donor's values.

How it works

Upload a video with your blockchain address.

Video uploaded and added to smart contract

After automatically transcribing the video we call our mindsdb databases and add the video to a smart contract with the extracted characteristics from mindsdb, which are:

{
  "address": "0x7394B6c17FDa8e1d39898FBA8b532B66013C5Eed",
  "player_uri": "https://player.thetavideoapi.com/video/video_nmsnhec281432jcb4khgthvra8",
  "playback_uri": "https://media.thetavideoapi.com/video_nmsnhec281432jcb4khgthvra8/master.m3u8",
  "swear_count": 1,
  "topics": ["vaping", "iPhones", "Androids", "technology",
    "pen and paper", "programming", "Python",
    "JavaScript", "marvel", "espanol"
  ],
  "sentiments": ["negative", "neutral", "neutral", "neutral",
    "neutral", "neutral", "neutral", "neutral", "negative", "neutral"
  ],
  "safety_score": 50,
  "languages": ["English", "Spanish"
  ]
}

Once the video is in the blockchain a donor can donate to it by simply saying what conditions it must fulfill.

Video donation dashboard

Tools

Mindsdb

Mindsdb is a great tool that allowed me to first test large language model responses in the extraction process without having to build my integration to OpenAI's API. I was excited to use the json_struct arguments to enforce the model to return exactly what I needed without explanations. Unfortunately I couldn't manage to get it to correctly return list elements, for which I opened a Github Issue and immediately got assigned to someone which is great. Due to this issue, I had to creatively write my prompts to get the exact response format I was expecting.

1) System: Respond with an integer, include no added commentary, preamble or explanation in your response
    User: In this text, how many swear words are there? "fucking bitch"
    chatgpt: 2
    User: In this text how many swear words are there? "Hello"
    chatgpt: 0
    User: In this text how many swear words are there? "{{script}}"
    chatgpt: 

2) In this text what are the main topics that are mentioned and what is the sentiment of each
    one(positive, negative, neutral)? "{{script}}" Respond with only a python dictionary, include no added commentary, preamble or explanation.

3) In this text  in what languages is it communicating in? "{{script}}" Respond with only a python list of language names, include no added commentary, preamble
    or explanation.

4) Assign a brand safety score from 0 - 1 where 0 is completely unsafe and 1 is completely safe to this text:
    "{{script}}" Respond with only a floating point number,
    include no added commentary, preamble or explanation.

For anyone trying to work with NLP or LLM, I would highly recommend mindsdb as it's an amazing tool to easily integrate your data into super advanced models, or like my project an amazing tool to simply use them natively.

Theta

Theta was the blockchain network and video API service that I used. Since it was my first time working with any blockchain it was extremely difficult. I would definitely recommend anyone to try some blockchain development if they haven't.

Resources

GitHub Repo

MindsDB documentation

Theta network