Jump to Content
Startups

Generative AI for Web3 on Google Cloud

October 6, 2023
Bertrand Portier

Principal, Google Cloud Digital Assets

Generative AI (gen AI) has captured the public’s attention. Throughout the year, it’s seemed like large language models (LLMs) have made the news everyday. While the hype may be shifting from crypto to gen AI, the research community is looking deeply at the intersection of blockchain and AI, and the Web3 community hasn’t been shy about experimenting. For example:

  • Coinbase hosted the Machine Learning and Blockchain Research Summit
  • SAKSHI is a proposal for a decentralized AI platform and includes a proofs layer to address adversarial challenges
  • FalconX introduced Satoshi to assist crypto traders
  • Etherscan introduced Code Reader to learn about smart contract code
  • Solana Labs introduced a plugin for real-time data and real-world transactions like token transfers

In this blog post, my goal is to go a step further past experiments and talk about what the community is building. Specifically, I am going to cover some of the digital assets and Web3 use cases we are helping our customers implement.

The first use case is document search and synthesis. This use case is about identification, summarization, and explanations. It allows non-technical (i.e., business) users to get insights from large document sets. For example, gen AI can help summarize a blockchain protocol’s whitepaper or help find vulnerabilities in a smart contract definition. We see a lot of customers selecting these areas for their first use case for evaluating LLMs, with internal users accessing both private and public data. Vertex AI Search facilitates this use case, making it straightforward to quickly build generative AI search engines.

The next use case is customer service support and enhanced virtual assistants. This one is a customer-facing application. Conversational AI represents the evolution of virtual agents, bots, and assistants. With LLM-powered virtual agents, we take this to the next level and allow customers to interact in a more natural way—including enabling the agent to execute transactions. Vertex AI Conversation and DialogFlow CX allow you to build lifelike conversational AI with state of the art virtual agents.

Content discovery is another critical use case. The illustration for Web3 is what I’d call crypto trading research. Analysts can start the day with a summary of what happened in the news related to their crypto portfolio. They can dig in and be laser-focused on what matters. For example, think about this Vertex AI Search demo being applied to crypto trading. But that’s not all. Based on what they learn, analysts can trade and develop an algorithmic crypto trading strategy.

And that’s when we get into the developer efficiency use case. This is AI-assisted development and arguably the number one use case for Web3. For example, AI-assisted development can help developers deal with the complexities of Solidity as they write smart contracts. Likewise, a Web3 infrastructure provider can use gen AI to generate documentation for APIs using foundation models like Google Cloud’s Codey or AI offerings like Duet AI for Google Cloud, which is available in the Integrated Development Environment (IDE) and code editor. Four things are top of mind:

1- Inline code completion

2- Boilerplate code generation

3- Code explanation where chatbots can answer code-related questions

4- Code security guardrails: vulnerable dependencies, suggested fixes, etc.

LLM orchestration and routing is a more advanced use case, and one we’ve seen our customers build. Most enterprises will rely on multiple LLMs for multiple use cases. Think about all the use cases we covered in this article. Not all of them are going to be realized using the same large language model. Based on a given user query (i.e., prompt), how can you select the optimal model to invoke? We demoed using Google’s text-bison model and LangChain’s RouterChain to achieve this.

Last but not least for Web3 are the creative use cases, specifically image and video generative AI. Here we get into the realm of NFTs. The foundation model from Google is Imagen, which is made available via Vertex AI. For example, suppose you own an NFT and want to create new images in the same style as the NFT, or you want to generate new pictures or videos with your NFT as the subject in these creations. Imagen now includes digital watermarking and verification (experimental) and allows you to do things like:

  • Generate new images based on a text prompt
  • Edit an image based on text prompt
  • Generate caption for an image
  • Fine tune a model for a specific subject

That was a whirlwind tour of gen AI for Web3 use cases. Generative AI on Google Cloud allows Web3 and other developers to build the use cases described above. For a more detailed discussion, platform and architecture walkthrough and demos related to these use cases, check out the webinar recording on gen AI for Web3 use cases.


Special thanks to Prakash Hariramani for his inputs to this blog post.

Posted in