Slide 1

Slide 1 text

Generative AI and Similarity Search with Vertex AI Matching Engine Kamolphan Liwprasert She/Her GDE Cloud / WTM Ambassador

Slide 2

Slide 2 text

Generative AI is a type of artificial intelligence (AI) that can create new content, such as text, images, or music. Generative AI Generative AI Vertex AI

Slide 3

Slide 3 text

LLM: Large Language Models LLM Example: ChatGPT, Bard (PaLM 2)

Slide 4

Slide 4 text

When all these begin? Language Model

Slide 5

Slide 5 text

PaLM 2 (Pathway Language Model) is a Google’s LLM. It comes with different model sizes and parameters for different tasks. cloud.google.com/vertex-ai/docs/generative-ai/learn/models PaLM API PaLM API Available models: ● Text-bison ● Textembedding-gecko ● Chat-bison ● Code-bison ● Codechat-bison ● Code-gecko

Slide 6

Slide 6 text

Getting started with Generative AI! Generative AI developers.generativeai.google/

Slide 7

Slide 7 text

MakerSuite MakerSuite developers.generativeai.google/

Slide 8

Slide 8 text

Vertex AI capabilities Vertex AI

Slide 9

Slide 9 text

Demo time!

Slide 10

Slide 10 text

Demo Scenario PDF files PaLM API embeddings Vector Store 🦜🔗

Slide 11

Slide 11 text

Embedding Google Developers Embedding Layer in a Deep Network An embedding is a relatively low-dimensional space into which you can translate high-dimensional vectors. Embeddings make it easier to do machine learning on large inputs like sparse vectors representing words

Slide 12

Slide 12 text

Similarity Search Flikr Similarity Search “Nearest Neighbor Search” : Compare embedding distance

Slide 13

Slide 13 text

Show me the code! Code

Slide 14

Slide 14 text

Code github.com/GoogleCloudPlatform/generative-ai/blob/main /language/use-cases/document-qa/question_answering_d ocuments_langchain_matching_engine.ipynb

Slide 15

Slide 15 text

Vector Store Vertex AI Matching Engine is a high-scale low latency vector database. These vector databases are commonly referred to as vector similarity-matching or an approximate nearest neighbor (ANN) service. Matching Engine provides the ability to search for semantically similar or semantically related items from its embeddings. Vertex AI Matching Engine Real world use cases such as: ● Recommendation engines ● Search engines ● Ad targeting systems ● Image classification or image search ● Text classification ● Question answering ● Chatbots

Slide 16

Slide 16 text

Langchain LangChain is a framework (Python / JS library) for developing applications powered by large language models (LLMs). The main values of LangChain are: ● Components: abstractions for working with language models, along with a collection of implementations for each abstraction. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not ● Off-the-shelf chains: a structured assembly of components for accomplishing specific higher-level tasks langchain.com

Slide 17

Slide 17 text

Code github.com/GoogleCloudPlatform/generative-ai/blob/main /language/examples/document-qa/question_answering_do cuments_langchain_matching_engine.ipynb

Slide 18

Slide 18 text

Architecture Image:github.com/GoogleCloudPlatform/generative-ai/blob/main/language/examples/document-qa/question_answering_document s_langchain_matching_engine.ipynb Store embeddings in Vertex AI Matching Engine (vector search)

Slide 19

Slide 19 text

Architecture Image:github.com/GoogleCloudPlatform/generative-ai/blob/main/language/examples/document-qa/question_answering_document s_langchain_matching_engine.ipynb RAG = Retrieval Augmented Generation

Slide 20

Slide 20 text

Vector Store Create Index * Take up to 1 hours Create Index Endpoint (deploy index) Add documents as embeddings Read PDF files chunks → embeddings Vertex AI Matching Engine

Slide 21

Slide 21 text

developers.generativeai.google Resource

Slide 22

Slide 22 text

github.com/GoogleCloudPlatform /generative-ai Resource

Slide 23

Slide 23 text

Generative AI Learning Path cloudskillsboost.google/journeys/118 Resource

Slide 24

Slide 24 text

Generative AI Learning Path cloudskillsboost.google/journeys/118 Resource

Slide 25

Slide 25 text

cloud.withgoogle.com/next Event Aug. 29-31, 2023

Slide 26

Slide 26 text

Q & A Kamolphan Liwprasert She/Her GDE Cloud / WTM Ambassador

Slide 27

Slide 27 text

Thank You Kamolphan Liwprasert She/Her GDE Cloud / WTM Ambassador