Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

8/24/23, 5:17 PM Learn about LLMs, PaLM models, and Vertex AI  

|  Google Cloud

Learn about LLMs, PaLM models, and Vertex


AI
General availability

Generative AI Support on Vertex AI is a Generative AI Service subject to the Service Specific Terms for
Generative AI Services.

Trusted Tester Program Opt-Out. If you previously opted in to permit Google to use your data to improve
pre-GA AI/ML services as part of the Trusted Tester Program terms, you can use the Trusted Tester Program
- Opt Out Request (https://forms.gle/HoFzDwSRFoAmJsF46) form to opt out.

Reporting abuse. You can report suspected abuse of the Service or any generated output that contains
inappropriate material or inaccurate information via the form at the following link: Report suspected abuse
on Google Cloud Platform (https://support.google.com/code/contact/cloud_platform_report?hl=en).

Large language models (LLMs) are deep learning models trained on massive amounts of text
data. LLMs can translate language, summarize text, and complement search engines and
recommendation systems. PaLM 2 (https://ai.google/discover/palm2/) is Google's next generation
LLM that builds on Google's legacy of research in machine learning and responsible AI
 (/vertex-ai/docs/generative-ai/learn/responsible-ai).

PaLM 2 models excel at advanced reasoning tasks, classification and question answering,
translation, and natural language generation. Its large size enables it to learn complex patterns
and relationships in language and generate high-quality text for various applications. This is
why the PaLM 2 models are referred to as foundational models
 (/vertex-ai/docs/generative-ai/learn/models).

To use PaLM 2 models in Vertex AI, Google developed Vertex AI PaLM API. with the Vertex AI
PaLM API, you can test, customize, and deploy instances of the models for your own
applications, and tune them using your own specific use-cases.

To see more learning resources, browse the Generative AI GitHub repo


 (https://github.com/GoogleCloudPlatform/generative-ai). Google data scientists, developers, and
developer advocates manage this content.

https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources#:~:text=Large language models (LLMs) are,machine learning and responsible AI. 1/5
8/24/23, 5:17 PM Learn about LLMs, PaLM models, and Vertex AI  |  Google Cloud

Get started
Here are some notebooks, tutorials, and other examples to help you get started. Vertex AI
offers Google Cloud console tutorials and Jupyter notebook tutorials that use the Vertex AI
SDK for Python. You can open a notebook tutorial in Colab or download the notebook to your
preferred environment.

Get started with the Vertex AI PaLM API & Vertex AI SDK for Python

Learn how to use the PaLM API with the Vertex AI SDK for Python. By the end of the notebook, you
should understand various nuances of generative model parameters like temperature, top_k,
top_p, and how each parameter affects your output results.

Jupyter notebook: You can run this tutorial as a Jupyter notebook.


Run in Colab
 (https://colab.sandbox.google.com/github/GoogleCloudPlatform/generative-
ai/blob/main/language/getting-started/intro_palm_api.ipynb)
| View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/getting-
started/intro_palm_api.ipynb)

Get started with Vertex AI Generative AI Studio

Use Generative AI Studio through the Google Cloud console without the need for the API or the
Vertex AI SDK for Python.

View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/getting-
started/intro_generative_ai_studio.md)

Best practices for prompt design

Learn how to design prompts to improve the quality of your responses from the model. This
tutorial covers the essentials of prompt engineering, including some best practices.

Jupyter notebook: You can run this tutorial as a Jupyter notebook.


Run in Colab
 (https://colab.sandbox.google.com/github/GoogleCloudPlatform/generative-
ai/blob/main/language/prompts/intro_prompt_design.ipynb)

https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources#:~:text=Large language models (LLMs) are,machine learning and responsible AI. 2/5
8/24/23, 5:17 PM Learn about LLMs, PaLM models, and Vertex AI  |  Google Cloud

| View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-
ai/blob/main/language/prompts/intro_prompt_design.ipynb)

LangChain 🦜️🔗
LangChain (https://python.langchain.com/docs/get_started/introduction.html) is a framework for
developing applications powered by LLMs like the PaLM models
 (/vertex-ai/docs/generative-ai/learn/overview#palm-api). Use LangChain to bring external data, such
as your files, other applications, and API data, to your LLMs.

To learn more about LangChain and how it works with Vertex AI, see the official LangChain and
Vertex AI documentation  (https://python.langchain.com/docs/get_started/introduction.html).

LangChain and Vertex AI PaLM API

This tutorial provides an introduction to understanding LangChain components and some


common use cases for working with LangChain and the Vertex AI PaLM API. Some examples and
demos in this tutorial include:

How LangChain and the Vertex AI PaLM API work

How to summarize large texts

How to build a retrieval-based question/answering model from PDFs

Jupyter notebook: You can run this tutorial as a Jupyter notebook.


Run in Colab
 (https://colab.sandbox.google.com/github/GoogleCloudPlatform/generative-
ai/blob/main/language/orchestration/langchain/intro_langchain_palm_api.ipynb)
| View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-
ai/blob/main/language/orchestration/langchain/intro_langchain_palm_api.ipynb)

Get text summarization from large documents using LangChain

Text summarization is a natural language processing (NLP) task that creates a concise and
informative summary of a longer text. You can use LLMs to create summaries of news articles,
research papers, technical documents, and other types of text.

https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources#:~:text=Large language models (LLMs) are,machine learning and responsible AI. 3/5
8/24/23, 5:17 PM Learn about LLMs, PaLM models, and Vertex AI  |  Google Cloud

In this notebook, you use LangChain to apply summarization strategies. The notebook covers
several examples of how to summarize large documents.

Jupyter notebook: You can run this tutorial as a Jupyter notebook.


Run in Colab
 (https://colab.sandbox.google.com/github/GoogleCloudPlatform/generative-
ai/blob/main/language/use-cases/document-
summarization/summarization_large_documents_langchain.ipynb)
| View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/use-
cases/document-summarization/summarization_large_documents_langchain.ipynb)

Answer questions from large documents with LangChain

This notebook uses LangChain with Vertex AI PaLM API to build a question-answering (Q&A)
system that extracts information from large documents.

Jupyter notebook: You can run this tutorial as a Jupyter notebook.


Run in Colab
 (https://colab.sandbox.google.com/github/GoogleCloudPlatform/generative-
ai/blob/main/language/use-cases/document-
qa/question_answering_documents_langchain.ipynb)
| View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/use-
cases/document-qa/question_answering_documents_langchain.ipynb)

Answer questions from documents with LangChain and Matching Engine

This notebook shows how to implement a question & answering (QA) system that improves an
LLM response. You learn how to augment its knowledge with external data sources such as
documents and websites. This notebook uses Matching Engine, LangChain, and Vertex AI PaLM
API for text and embedding creation, .

Jupyter notebook: You can run this tutorial as a Jupyter notebook.


Run in Colab
 (https://colab.sandbox.google.com/github/GoogleCloudPlatform/generative-
ai/blob/main/language/use-cases/document-
qa/question_answering_documents_langchain_matching_engine.ipynb)
| View on GitHub
 (https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/use-
cases/document-qa/question_answering_documents_langchain_matching_engine.ipynb)

https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources#:~:text=Large language models (LLMs) are,machine learning and responsible AI. 4/5
8/24/23, 5:17 PM Learn about LLMs, PaLM models, and Vertex AI  |  Google Cloud

What's next
Explore more resources in the Generative AI GitHub repo
 (https://github.com/GoogleCloudPlatform/generative-ai).

See other Vertex AI notebook tutorials in the Tutorials overview (/vertex-ai/docs/tutorials).

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
 (https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the Apache 2.0 License
 (https://www.apache.org/licenses/LICENSE-2.0). For details, see the Google Developers Site Policies
 (https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-08-23 UTC.

https://cloud.google.com/vertex-ai/docs/generative-ai/learn-resources#:~:text=Large language models (LLMs) are,machine learning and responsible AI. 5/5

You might also like