GenAI App Development with Genkit
Introduction
Learn how to create and deploy a GenAI application with Google Cloud and Firebase Genkit. This hands-on example provides skills transferable to other GenAI frameworks.
You will learn how create the GenAI components that power the **Movie Guru** application.
Watch the video below to see what it does and understand the flows you will be building in this gHack (turn down the volume!).
Learning Objectives
In this hack you will learn how to:
- Vectorise a simple dataset and add it to a vector database (Postgres PGVector).
- Create a flow using Genkit that anaylses a user’s statement and extracts their long term preferences and dislikes.
- Create a flow using Genkit that summarises the conversation with the user and transform’s the user’s latest query into one that can be used by a vector database.
- Create a flow using Genkit that takes the transformed query and retrieves relevant documents from the vector database.
- Create a flow using Genkit that takes the retrieved documents, conversation history and the user’s latest query and formulates a relevant response to the user.
Challenges
- Challenge 1: Upload the data to the vector database
- Using a Genkit flow, create an embedding for each entry in the dataset (discussed later), and upload the data to a vector database using the predefined schema.
- Challenge 2: Your first flow that analyses the user’s input
- Create a flow that takes the user’s latest input and extract any long term preference or dislike.
- Challenge 3: Create vector searchable queries
- Challenge 4: Update the retriever to fetch documents
- Challenge 5: The full RAG flow
- Select the relevant outputs from the previous stages and return a meaningful output to the user.
Prerequisites
- Your own GCP project with Owner IAM role.
- gCloud CLI
- gCloud CloudShell Terminal OR
- Local IDE (like VSCode) with Docker and Docker Compose
Warning With CloudShell Terminal you cannot get the front-end to talk to the rest of the components, so viewing the full working app locally is difficult, but this doesn’t affect the challenges.
Contributors
- Manasa Kandula
- Christiaan Hees