Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Generative AI on Google Cloud with LangChain
  • Table Of Contents Toc
Generative AI on Google Cloud with LangChain

Generative AI on Google Cloud with LangChain

By : Leonid Kuligin, Jorge Zaldívar, Maximilian Tschochohei
2 (1)
close
close
Generative AI on Google Cloud with LangChain

Generative AI on Google Cloud with LangChain

2 (1)
By: Leonid Kuligin, Jorge Zaldívar, Maximilian Tschochohei

Overview of this book

The rapid transformation and enterprise adoption of GenAI has created an urgent demand for developers to quickly build and deploy AI applications that deliver real value. Written by three distinguished Google AI engineers and LangChain contributors who have shaped Google Cloud’s integration with LangChain and implemented AI solutions for Fortune 500 companies, this book bridges the gap between concept and implementation, exploring LangChain and Google Cloud’s enterprise-ready tools for scalable AI solutions. You'll start by exploring the fundamentals of large language models (LLMs) and how LangChain simplifies the development of AI workflows by connecting LLMs with external data and services. This book guides you through using essential tools like the Gemini and PaLM 2 APIs, Vertex AI, and Vertex AI Search to create sophisticated, production-ready GenAI applications. You'll also overcome the context limitations of LLMs by mastering advanced techniques like Retrieval-Augmented Generation (RAG) and external memory layers. Through practical patterns and real-world examples, you’ll gain everything you need to harness Google Cloud’s AI ecosystem, reducing the time to market while ensuring enterprise scalability. You’ll have the expertise to build robust GenAI applications that can be tailored to solve real-world business challenges.
Table of Contents (22 chapters)
close
close
Lock Free Chapter
1
Part 1: Intro to LangChain and Generative AI on Google Cloud
4
Part 2: Hallucinations and Grounding Responses
9
Part 3: Common Generative AI Architectures
15
Part 4: Designing Generative AI Applications

ReACT pattern

What we did before is a sequence of steps:

  1. We call a model
  2. It decides to call one of the available tools (a calculator) and generates a payload (input) for this tool
  3. We call the tool and give results back to the model (please note that we send the whole history of our interactions with an LLM since it doesn’t cache it server-side, although sometimes it’s done client-side on the SDK level)
  4. These steps continue until the model decides to generate a final output that can be passed to a user

In other words, we continuously asked an LLM to reason and then we acted on this reasoning. It is a so-called ReACT pattern. ReACT stands for Reason+Act, and this pattern was introduced in the famous paper published by Google Search and Princeton University (the project resulted from an internship at Google) [7].

Figure 9.1 – ReACT pattern

Figure 9.1 – ReACT pattern

Let’s look at a very simple example:

react_prompt = ChatPromptTemplate...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Generative AI on Google Cloud with LangChain
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon