Integrating Serverless Apps with NoSQL Database and LLMs: Building a ‘Shopper’ Chat-Bot with PaLM 2 and LangChain

In the ever-evolving landscape of technology, the synergy between serverless architectures, NoSQL databases, and Large Language Models (LLMs) is opening new frontiers in application development. This article delves into the integration of these cutting-edge technologies using Google’s PaLM 2 and the LangChain framework, demonstrated through the development of a ‘shopper’ chat-bot.

In this entry I will describe an example I am preparing to showcase the possibility of using ReAct (Reasoning & Acting) paradigm of Large Language Model and incorporate serverless apps into our GenAI-powered applications

Shopper architecture

So here it is – a shopper architecture. Fairly straight forward. We are going to utilize Firestore as our NoSQL database, 3 Cloud functions that can accept API calls to list or modify content of the database, and 3 python-developed tools that will be utilized by LangChain Agent, powered by PaLM 2 Large Language model. But I’m getting ahead of myself. Let’s start step by step.

Continue reading

Deploy your PaLM 2 Chat App on Google Colab!

In my previous entry I showed you step-by-step instruction of how to develop a simple code for general text-based chat app. If you haven’t seen it yet, give it a try: Create Your first Chat App with PaLM 2. In this short entry I want to show you how you can test/run/showcase such application using Google Colaboratory

Quick introduction to colab

Google Colaboratory, commonly referred to as “Colab,” is a free cloud service hosted by Google to encourage Machine Learning and Artificial Intelligence research. It provides a versatile environment that combines executable code, rich text, and graphics to help users create, collaborate on, and share documents. Colab is based on the Jupyter notebook environment and supports Python 3 interpreters. It offers free access to computing resources including GPUs and TPUs which can be particularly beneficial for resource-intensive tasks. This platform is widely used for educational purposes, data analysis, and prototyping, as it allows users to write and execute code, save and share their analyses, and access powerful computing resources, all through their browsers without the need for any setup.

Sounds perfect for our use case, doesn’t it?

Continue reading

Create Your first Chat App with PaLM 2

In the ever-evolving landscape of AI, Google’s PaLM 2 has emerged as a revolutionary force, unlocking new potentials in natural language processing. Imagine harnessing this cutting-edge technology to create something as interactive and engaging as a chat application. In this blog entry, I’m thrilled to show you exactly how straightforward it can be to develop your very first Python application—a “chat application” that interacts with the remarkable chat-bison model from the PaLM 2 family.

Fair warning: a very basic understanding of Python is required, but you definitely do not need to be a pro!

We’ll dive into the world of Generative AI Studio, a remarkable tool (set of tools really) that provides us with a baseline of code. From there, I’ll guide you through tweaking and customizing this foundation to fit your unique vision for the app. This isn’t just about coding; it’s about creativity and bringing your ideas to life.

Continue reading