Professional Documents
Culture Documents
[EXTERNAL] AI Trailblazers Workshop - Industry (5th Sep)
[EXTERNAL] AI Trailblazers Workshop - Industry (5th Sep)
Jul
Government / Industry Capstone Projects
Gen AI Workshops
Teams to build on their
Scale up workshops to get projects
more industries to try out
Gen AI and create use cases
AI Trailblazers Programme Journey (Industry)
Tech Review
Workshop Demo Day with Capstone 🎓
with Google
Day EDB & Google MVP Graduation
Engineers
● Gen AI Hands-On Session Prep Session Prep Working MVP ready Work towards
● Submit use case(s) ● Use case(s) ● Refined use case(s) production
● Decide on ● Architecture diagram
engagement model ● Working prototype
By end of Week 4:
● Move out from sandbox to organisation
Jul
50
14th August 5th September 29th September 6th Oct Industry
Teams
11 Industry 12 Industry 11 Industry 11 Industry
Teams Teams Teams Teams
Gen AI/LLM Intro
9:45 - 10:10
● AI Foundation
● Generative AI/LLM Intro
● New Opportunities
A.I.
Transformative Potential
The Path to Generative Language Models
The Path to Generative Language Models
The Path to Generative Language Models
What is a Language Model?
● Natural Language Processing (NLP)
● Natural Language Generation (NLG)
P(books) = 0.5
P(laptops) = 0.3
P(exams) = 0.1
P(minds) = 0.1
What is a Neural Network?
What is a Transformer?
Adapting to
downstream task
Pre-Training
Prompt Engineering
New Model
Fine Tuning
New Layers
Parameter-Efficient Fine Tuning
Proprietary + Confidential
Open Data + Context + Examples Open Data + Private Data Open Data + Private Data
● End user interface to use LLM. ● Strongest performance, higher ● Frozen pre-trained model
Pros
● Guide model to output expect quality (accuracy, domain ● Comparable performance wrt FT
speci city, smaller student models,
results by writing prompt. on larger model.
fewer hallucinations)
● Zero to few-shot learning ● Unlimited training data
● Meet data residency requirements
● Limited prompt length. ● Each tuning task is a fork of ● Limited use cases
● Inference only. Can not bring your pre-train model ● Poor performance on smaller and
Cons
Technology Retail
● Generating Code Snippets from description ● Natural language prompted search and buy experiences
● Multi-modal search, personalization and recommendations
● Code Translation between languages
● Auto generated product descriptions and summarized product reviews to
● Auto Generated Documentation from Code power user experiences
● Auto Generated summary of documents ● Auto Generated content creation for blogs, images, videos.
● Entity Extraction from KYC documents ● Trailer, script, video generation
● Summarize and rephrase investment news articles, earnings reports. ● Personalized news and content generation
Generative AI is driving new opportunities
Operational efficiencies, cost savings, and value creation
Improve time-to-value to Improve customer Generate text, code, image, Customize large models and
search, navigate, and experience, reaching larger video, or music quickly and incorporate state of the art
extract insights and client bases by making multi-modally, speeding up generative capabilities
understanding from large online interactions more every business process and natively into your own
amounts of complex data natural, conversational, and maximizing employee internal ML operational
rewarding productivity platforms
Customer
Analyst Service AI
Creative
Data Employee Practitioner
Consumer Engagement
Make data more
accessible and useful
with Gen App Builder
BERT
1E+5 GPT-1
3,000+ Google / Deepmind researchers and
7,000+ scientific publications continue to 2018 2019 2020 2021 2022 2023
drive our research to product pipeline YEAR
Google / DeepMind OpenAI NVIDIA
Beeswarm/bubble plot, sizes linear to scale. Selected highlights only. Original: Alan D. Thompson, August 2022, https://lifearchitect.ai/
AI ecosystem
Vertex AI Duet AI
Vertex AI
AI Solutions
Contact Center | Document
Model Garden
Google | OSS | Partner Models
32k context windows support longer form content Improved semantic matching for retrieval
Extensions
Enable foundation models to take action
Connect models to real-time data and real-world actions Use Cases: Factuality on private data, retrieval
augmented generation, user personalized
Extensions provides a set of fully-managed tools for building and managing
responses and code interpretation
extensions that connect models to proprietary data sources or 3rd party services
Enterprise-grade tooling
Will support data transparency, data residency, customer-managed encryption
keys, and virtual private cloud security controls
Build using the single extension standard across Google
Vertex AI Search
Deliver relevant, personalized search experiences in minutes, for enterprise apps
or consumer-facing websites
Quickly set up Google quality multi-modal,
multi-turn search experiences for customers and employees
Ground search results in enterprise data or combine
with LLM knowledge
Enterprise access controls ensure information is surfaced
only to users who have access
Data connectors and extensions connect to backend
systems to read data and take actions with 3rd party applications
like Salesforce, etc.
Vector Search for highly scalable vector embedding search across
different types of data
Helpful features like summarization, citations, relevance scores,
flexible LLM style prompting help in knowledge discovery and
customize search results
Vertex AI Conversation
Build custom chat and voice bots powered by generative AI and grounded in
your enterprise data
Combine deterministic workflows with generative AI to make
conversations dynamic and personalized
Multi-modal support image and audio in addition to text
Train on a variety of data from websites, documents, FAQs, email
and agent conversation history
Enable transactions to connect to backend systems or 3rd party
applications for complete transactions (bookings, payments etc)
Generators and generative fallbacks inject actions and
pre-programmed conversations into workflows
Helpful features for customer service workflows summarization,
generative FAQ, citations and agent assist
Your content
Google Cloud
Central Hosting
Conversation Enterprise
AI search
Chatbot, API, etc. Your data
Internet/Intranet
Vertex AI
Your inference
(Full) Fine
Tuning
Parameter
Efficient Fine
Tuning
PLM (24B) PLM (~24B+) with task
specific tuned parameters
Confidential + Proprietary
How does it work?
Confidential + Proprietary
How does it work?
Soft prompts are fed together with the input Tunable Soft Prompt
prompt to get the tuned response for the
downstream tasks.
BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-models Confidential + Proprietary
Reinforcement Learning from Human Feedback Proprietary + Confidential
Approach
2. Training language models on objectives that are linked with human feedback.
Reinforcement Learning (RL):
● Unique way of taking valuable signals
● Directly optimizes a reward defined by human preference.
Key idea
Tasks
● Classification
● Summarization
● Q&A
API
LLM
Proprietary + Confidential
Common Patterns
1 Webhook
2 LLM
Google
Search
LLM
LLM LLM
SQL LLM
Code
LLM
… and more
Proprietary + Confidential
LangChain 🦜🔗
Open source developer framework for
developing LLM applications built around LLMs
● Chatbots
● Generative QA
● Summarization
● LLM agents
Value adds:
● Modular components + implementation
● Common ways to combine those
components together
Proprietary + Confidential
LangChain 🦜🔗
Google Drive
Google Search
Google PaLM2
Databases
Code Repositories
Proprietary + Confidential
LangChain Concepts
Proprietary + Confidential
Agents
Core Idea: Agents is using LLMs as a reasoning engine to determine how to interact with the outside
world based on user input.
Webhook
Code
Proprietary + Confidential
Agents: Implementation
LLM
Proprietary + Confidential
LangChain + Vertex AI
Vertex AI PaLM — Text, Chat, and Embeddings — and Vertex AI Matching Engine are officially
integrated with the LangChain Python SDK, making it convenient to build applications on top of
Vertex AI PaLM models.
Use case: Max is a developer looking to search for code snippets, confluence design
documentation or kick starting their role with easy access assets. The architecture
leverages a retrieval augmented generation (RAG) architecture to search huge corpus of
data, urls and other disparate assets. Components Description
Summarize relevant 5 Extract embeddings from text block documents: We extract the
information with 4
chat context text embeddings with Vertex AI Embedding Extractor. We will use
these embeddings to search for similar text passages across long
User Input
form documents
PaLM
Summarize relevant information with chat context: Not only does
5 the search operations return multiple documents, but also if more
Public/Intranet
6 Relevant long form than one search is needed, then there could potentially be multiple
Websites
Using chat documents documents. With the objective to condense that information, a
memory and map-reduce style of summarization will be done.
Chat relevant results
response from search,
return results with Return result: Using the contents of the search summarization and
URLs linking to 6 previous chat iterations, a new relevant response will be
websites or constructed using the PaLM API.
documents.
Proprietary + Confidential
Ingestion
# Define Text Embeddings model
embedding = VertexAIEmbeddings()
Build
# Split document into chunks
Vector Store
Index Streaming Inserts Matching Engine text_splitter = RecursiveCharacterTextSplitter(
Fetch actual text chunk_size=1000, chunk_overlap=0)
based on doc ids doc_splits = text_splitter.split_documents(document)
Doc Chunks (Text)
Cloud Storage
# Add embeddings of document chunks to Matching Engine
texts = [doc.page_content for doc in doc_splits]
me.add_texts(texts=texts)
Proprietary + Confidential
No 2 3 4 We’re
urgency - 1 late - 5
73%
65%
58%
52% 47%
Customer Software General Data Content Marketing Security Quality Forecasting Sales
service, development efficiency analysis creation assurance manage supply process
chat bots (automation)
Design Thinking
Workshop for
AI Trailblazers
1. Identify and assign roles within the team (5 mins) Make a copy of the
○ Roles: Leading the discussion and follow-up, Design Doc ⬇!
create slides and take notes
○ Google CE & Partner Eng will facilitate the session
13:00 - 13:30 [All] Cloud Skills Boost Lab - Get Started with Generative AI Studio
● Fine-tuning LLMs
● Zero/few-shot prompting
13:30 - 15:30 ● LangChain with Vertex PaLM API
● PaLM API
● LangChain - QA with Documents
Step 5: If you see that you’re signed in to your account, please sign out
Step 7: Now, sign in to your Cloud Skills Boost account and continue to Step 8
Proprietary + Confidential
Once you’re done with the first lab: Vertex AI: Qwik Start, you can try out other
labs as listed below:
Note: These labs will be available to you for 30 days starting from today
Hands On:
Custom LLM &
LangChain Integration
13:30 - 15:30
Hands-on Lab:
Google Cloud
Environment
Proprietary + Confidential
User Account
Email ai-sb-user-##@ai-trailblazer-sandbox.com
Step 1: Go to tinyurl.com/ai-tb-userid-5sep to
reserve User IDs
Project name:
ai-sandbox-<your-company>
Proprietary + Confidential
● Each team has been allocated 3 GPUs each for the hands-on lab.
● You will find them named in this format:
○ <company>-gpu-1
○ <company>-gpu-2
○ <company>-gpu-3
● Please consider sharing the screen with each other or take turns to try the
fine-tuning lab
Hands-on Fine Tuning: A100 80GB GPU VM instance
Step 3: Look for the GPUs assigned to your company and choose one of it
Step 6: When prompted, type “y” to Nvidia Driver Installation. Once done, you
should see Nvidia driver installed printed in your terminal
This to provide permission required for installing packages (& compiling with CUDA)
Hands-on Fine Tuning: Copy files to your VM instance
Step 8: Upgrade pytorch to 2.0 with the following command:
pip install --upgrade torch
If you see this error → ERROR: Could not install packages due to an OSError: [Errno 13]
Permission denied: 'autocast_mode.cpython-310.pyc'
Consider using the --user option or check the permissions.
Use this command instead → pip install --upgrade torch --user
Step 9: Copy the Python notebooks from Cloud Storage bucket with:
gsutil cp -r gs://llm-models-base-bucket .
Step 10: Run ls and check that you copied llm-models-base-bucket successfully
Hands-on Fine Tuning: Starting Jupyter Lab
Step 11: To start the Jupyter Lab, run the following command:
jupyter lab --ip=0.0.0.0 --port=8888
Hands-on Fine Tuning: Starting Jupyter Lab
Step 12: Copy the URL that starts with http://127.0.0.1:8888/lab?token=...
Hands-on Fine Tuning: Starting Jupyter Lab
Step 13: Head back to Compute Engine page and copy your VM’s External IP
Step 14: Replace 127.0.0.1 with your External IP and paste it in a new window/tab
Example
http://35.186.147.47:8888/lab?token=b6099de8e953f40a39092d892c3ac5397a251cd0599cd1ec
Hands-on Fine Tuning: Fine Tuning Llama-2-7b
Step 17: Once your packages are installed, restart the kernel then run the
remaining cells to start fine-tuning Llama-2-7b.
ai-sandbox-<>
Step 6: Once a green tick appears, click OPEN JUPYTERLAB to open the notebook
Hands-on LangChain: Starting Vertex Workbench
Step 8: In the Jupyter Notebook, click on Terminal to open a new terminal tab.
Step 12: Run all the cells to see LangChain + Vertex AI PaLM API in action.
Proprietary + Confidential
deidentify/tokenize/mask data
Design Thinking
Workshop for
AI Trailblazers
4. Deliverables
○ Draft version of solution design or prototype artifacts
○ Action plan to build the prototype
○ Action plan to verify the values/benefits from target users
Summary and
Follow-Up All
16:45 - 17:00
Use Case Development & Deployment Services (self-funding)
Google PSO Development Service $25,000.00 2 Weeks Use case evaluation, feasibility study, and prototyping
Google SI Partner $20,000.00 2 Weeks Use case evaluation, feasibility study, and prototyping
Production Deployment It's highly depends on agencies env and requirements, and expect agency/organization has to
Complex Solution apply their own budget to cover the production deployment
The Machine Learning Advanced Solutions Lab (ASL) is
focused on significant Google Cloud
$200,000.00 4 weeks + customers/prospects to work with core Google
engineering and the GCP professional services team
ASL Immersive Training on hard, real-world ML problems with client data.
Proprietary + Confidential
UX Research Plan
UX Study Report Roadmap
Product Story CUJs/Personas Milestones
UX Design Prioritization
Success Metrics
Product Req Document
Tech Design
Sharad
GenAI offerings
Custom AI
Build your production Custom
AI solution
Summary and Actionable Follow-up (Industry)
AI Trailblazer is the first step of Attend the WEEK + 2 Checkpoint (Tech Review)
8 weeks of engagements,
bit.ly/AI-Trailblazer-Survey
Join Google Gen AI
Community:
Industry Customers