Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Generative AI and Similarity Search with Vertex AI Matching Engine

Generative AI and Similarity Search with Vertex AI Matching Engine

Given a talk at Google I/O Extended Bangkok 2023 and Google I/O Extended Vientiane 2023

This talk featured using PaLM API to embed the document and save the embeddings to Vertex AI Matching Engine. Langchain was also introduced to provide the interface in the demo.

The demo is based on https://github.com/GoogleCloudPlatform/generative-ai/tree/main

Kamolphan Liwprasert

August 12, 2023

More Decks by Kamolphan Liwprasert

Other Decks in Technology


  1. Generative AI and Similarity Search with Vertex AI Matching Engine

    Kamolphan Liwprasert She/Her GDE Cloud / WTM Ambassador
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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