Introduction to Generative AI

Jul 20, 2024

Introduction to Generative AI

Course Overview

  • Instructor: Roger Martinez, Developer Relations Engineer at Google Cloud
  • Course Focus: Define, explain, describe, and explore applications of generative AI

What is Generative AI?

  • Definition: A type of AI that produces various types of content (text, imagery, audio, synthetic data)

Context: AI and Machine Learning

  • AI: Branch of computer science creating intelligent agents (systems that reason, learn, and act autonomously)
  • Machine Learning (ML): Subfield of AI; programs/systems that train a model from input data to make predictions

Types of Machine Learning Models

  • Supervised ML Models: Trained with labeled data.
  • Unsupervised ML Models: Trained with unlabeled data.

Examples

  • Supervised ML: Learning to predict tips based on bill amount and order type in a restaurant
  • Unsupervised ML: Clustering employees based on tenure and income

Deep Learning

  • Subset of ML using artificial neural networks (inspired by the human brain)
  • Processes complex patterns, can use labeled/unlabeled data (semi-supervised learning)

Generative AI

  • Subset of deep learning using artificial neural networks
  • Can process both labeled and unlabeled data
  • Uses supervised, unsupervised, and semi-supervised methods
  • Large Language Models (LLMs): Type of deep learning model within generative AI

Model Types: Generative vs. Discriminative

  • Discriminative Models: Classify/predict labels for data points
  • Generative Models: Generate new data instances based on learned patterns

Examples of Model Use

  • Discriminative Model: Classifies if an animal is a dog or a cat
  • Generative Model: Generates a new image of a dog

Generative AI Applications

  • Natural Language (text): Speech, text generation
  • Images: Image generation
  • Audio/Video: Audio synthesis, video generation

Mathematical View

  • Not Generative: If output Y is a number (e.g., predicted sales)
  • Generative: If output Y is natural language or image (e.g., definition of sales, image generation)

Traditional vs. Generative AI Process

  • Traditional ML: Uses training code and labeled data to build a model
  • Generative AI: Uses training code, labeled, and unlabeled data to build a foundation model capable of generating various types of content

Generative AI Model Types

  • Text to Text: Translates text input to text output (e.g., language translation)
  • Text to Image/Video/3D: Generates images, videos, 3D models from text descriptions
  • Text to Task: Performs defined actions based on text input

Foundation Models

  • Definition: Large AI models pre-trained on vast data, adapted for various tasks (e.g., sentiment analysis, image captioning)
  • Vertex AI Model Garden: Provides foundation models like PaLM API for text, and stable diffusion for images

Coding with Generative AI

  • Code Generation: Debugging, translating code, generating documentation
  • Google's Tools:
    • Vertex AI Studio: Customize generative AI models
    • Vertex AI Search & Conversation: Build chatbots, custom search engines, etc.
    • PaLM API: Access large language models for prototyping

Challenges: Transformer Issues

  • Transformer Models: Consist of encoder and decoder
  • Hallucinations: Problematic nonsensical phrases generated by the model

Prompt Design

  • Definition: Creating a prompt to control the output of a large language model (LLM)
  • Importance: Ensures desired output based on input text

Tools and Resources

  • Vertex AI Studio: Tools for exploring and customizing models
  • Vertex AI Search & Conversation: Building applications with minimal coding
  • PaLM API: Prototyping with large language models
  • Gemini: Multimodal AI model understanding text, images, audio, and code

Summary

  • Generative AI: Creates new content based on learned patterns
  • Applications: Wide range of applications from text generation to video production

Thank you for attending the course. Check out our other videos to learn more!