Learn MoreHack Cartesi Rollups and 1 million CTSI is yours...
The New Design Space in AI

The New Design Space in AI

Tech/Sep 12, 2023/EDUARDO TIÓ
Share:

Both AI and Web3 are fundamental shifts in how we use computers. They’re new paradigms, new ways to understand what we can do with existing technologies and ways to build new ones.

Cartesi can bridge these paradigms and let AI’s sophisticated pattern matching, combined with Web3’s inherent verifiability, improve how we work with data. We’d all prefer to use AI models that have been trained on tamper-proof and transparent datasets. We’d all feel more comfortable with a customer service chatbot if it was somewhat accountable for what it says.

Those are just some directions it could go. Start building AI projects with Cartesi to come up with your own solutions, or keep reading to learn more about what you could do.

The limitations of on-chain AI

The AI boom has left many wondering if and how this technology converges with Web3. Let’s see what ChatGPT thinks when prompted with “Can ChatGPT run on a blockchain?”:

 What ChatGPT thinks when prompted with “Can ChatGPT run on a blockchain?”

It goes on to list 7 other reasons… A shorter answer is that it could, but there’s not much of a “how” yet. What ChatGPT doesn’t know is that we could forget about most of the “how” if we solved one main problem.

Limited interoperability

AI and Web3 exist in very different worlds that don’t really speak to each other. All the tools and libraries that are used to train AI models only exist in the realm of Web2 and traditional software development. Meanwhile, Web3 is, in a sense, inventing a new kind of computer.

This new kind of computer — a global shared computer — could be very useful to AI projects. It does a great job at something that’s very important for training AI models: it can provide trustworthy data. Conversely, Web3 could benefit from offering AI features to users in an open, verifiable, and decentralized way.

The problem is that the Ethereum Virtual Machine doesn’t understand anything about AI. It can’t “talk” with AI projects.

What if we could build the AI models from Web2 so that they can also run on-chain? Just like when we’re trying to build Web3 games or complex DeFi applications, we’d have to reinvent the wheel. Then, we’d run into the limitation of how much data the Ethereum Virtual Machine can process.

Transcending limitations

Of course, what we need is an efficient way to translate between the Web2 language(s) that AI speaks and the language(s) that Web3 speaks. A sort of lingua franca or common ground.

Cartesi Virtual Machine and Cartesi Rollups

With Cartesi, this common ground can be an operating system — namely, Linux. The Cartesi Virtual Machine can be used to build Linux blockchain applications that “speak” with the AI world. It understands C++ or Python and supports libraries such as OpenCV or scikit-learn, which are used to build AI applications. At the same time, it also “speaks” to the Ethereum Virtual Machine thanks to Cartesi’s app-specific rollups.

Bruno Maia summed this up in response to a question submitted by community member AscensionDK on Reddit:

“...And why does Cartesi matter to bring those apps into reality? Cartesi's solution, through the app-specific rollups architecture, handles computational capacity three orders of magnitude higher than what is possible to do directly on the Ethereum blockchain, and our Linux-based VM gives not only freedom on the programming language (in this case, Python and all its great fit for AI programs), but also the usage of complex libraries including several key ones very used on AI applications.”

Proving the concept: ChainGPT

So, can we have a Web3 version of ChatGPT? We can.

ChainGPT is an ETHGlobal Lisbon finalist that built exactly that. The project is a chatbot like ChatGPT — Stanford’s Alpaca Large Language Model (LLM) — that runs on-chain thanks to Cartesi Rollups.

The best part is that it demonstrates why an on-chain AI chatbot is useful in the first place. As explained by its creator Deanna Hood:“Why do we need cryptographic truth when using LLMs? Because LLMs always give an answer and don’t actually know what’s true.

Examples:

  • Cryptographic truth ensures accountability for AI Business Agents (chatbots) and their service providers because, in the event of a customer claim against an AI chatbot, the blockchain can be leveraged to see who is at fault.
  • Auditing and improving AI agents in regulated industries.
  • Guaranteeing the safety of children when using Education chatbots and wherever society needs certainty that models haven't been tampered with.

ChainGPT is a 🤯 C++ application 🤯 that is guaranteed to give [a reproducible] result - providing economic security for businesses that leverage AI chatbots. The security of ChainGPT's output comes from it being run on multiple "validator nodes" (which are just regular computers in anyone's house). The fact that ChainGPT results are reproducible means that together, these validators ensure [a verifiable] response. These results can be referenced to settle claims against the behaviour of chatbots.”

The possibilities of machine learning with Cartesi

Although chatbots are the most popular use case for AI right now, they only scratch the surface of what this technology can do. Thanks to Cartesi, the same is also true of what it can do in the context of Web3 as more and more AI libraries are being supported by the Cartesi Virtual Machine.

Some other examples of AI-related projects in Cartesi include:

  • Biometrics classifier: A proof of concept for fingerprint authentication built with C++ and a Python ML model.
  • Ultrachess: A chess game built with Python that lets players battle an AI on-chain as well as set up AI vs. AI games.
  • Bima Coin: A proof of concept for a decentralized tokenized insurance protocol that uses the Internet of Things and AI to calculate car-related risks.

This is the new design space for AI. Let us know what AI project you would build by joining the community, participating in the Blue Sky Ideas forum, or joining us on Discord.


You can also check out what other teams are building. Better yet, start building your own DeFi dApp and apply for a Cartesi Community Grant.

Subscribe to The Cartesi Newsletter

Join our newsletter to stay up to date on features and releases

Posted in:Use Cases

More from Tech

Tech/Sep 19, 2024

The Radically Simple Guide to: The Power of Linux in Web3

Your go-to guide to understanding the power of Linux onchain.

Written By Cartesi Foundation

Tech/Jul 31, 2024

Cartesi’s Honeypot Challenge Crosses 1M CTSI, Remains Unhacked

Exciting news! The Cartesi

Written By CARTESI FOUNDATION

Tech/May 6, 2024

Cartesi’s Technical Evolution Plan: An Innovative Approach In Decentralized Coordination

Introducing the Cartesi ecosystem's

Written By Brandon Isaacson

© 2024 The Cartesi Foundation. All rights reserved.