Slide 1

Slide 1 text

Jirawat Karanwittayakarn Google Developer Expert in Firebase What’s New in Firebase

Slide 2

Slide 2 text

Google I/O Extended 2024 Bangkok

Slide 3

Slide 3 text

Google I/O Extended 2024 Bangkok Build Auth Cloud Functions Cloud Firestore Cloud Storage Extensions Realtime Database Hosting ML App Check Remote Config A/B Testing App Distribution Crashlytics Performance Monitoring Test Lab In-App Messaging Analytics Cloud Messaging Run

Slide 4

Slide 4 text

Google I/O Extended 2024 Bangkok Vertex AI Vertex AI for Firebase

Slide 5

Slide 5 text

Google I/O Extended 2024 Bangkok Firebase App Check Vertex AI Gemini API Vertex AI for Firebase

Slide 6

Slide 6 text

Google I/O Extended 2024 Bangkok Gemini API in Vertex AI App Check server proxy Client SDKs Vertex AI for Firebase

Slide 7

Slide 7 text

Google I/O Extended 2024 Bangkok Firestore

Slide 8

Slide 8 text

Improve the results of LLMs by enhancing the prompt RAG

Slide 9

Slide 9 text

Google I/O Extended 2024 Bangkok Product documentation Topic 1 Topic 2 Topic 3 Topic 4 Topic 5 Topic 6 Topic 7 Topic 8 Question Answer Generator / LLM Topic 2 Topic 5 Topic 7 Retriever ✔ ✔ ✔ RAG

Slide 10

Slide 10 text

What are vector embeddings? RAG

Slide 11

Slide 11 text

Google I/O Extended 2024 Bangkok In this approach we create an anthemic opener showing real people using A.I. to do amazing things. This can be everyday people Sweetness Crunchiness Spiciness Apple 0.8 0.6 0.1 Banana 0.9 0.2 0.1 Ice Cream 0.95 0.3 0.05 Jalapeno 0.1 0.2 0.9 Carrot 0.4 0.8 0.1 Potato 0.4 0.3 0.1 Finding near vector values Dimension 1: Sweetness Dimension 2: Crunchiness Dimension 3: Spiciness RAG

Slide 12

Slide 12 text

Google I/O Extended 2024 Bangkok You can now store and query vector embeddings of data in your Firestore database Firestore Vector Search Firestore

Slide 13

Slide 13 text

Google I/O Extended 2024 Bangkok import { Firestore, FieldValue, } from "@google-cloud/firestore"; const db = new Firestore(); const coll = db.collection('coffee-beans'); await coll.add({ name: "Kahawa coffee beans", description: "Information about the Kahawa coffee beans.", embedding_field: FieldValue.vector([0.1 , -0.2, 0.99]) }); Writing a vector embedding to Firestore Firestore

Slide 14

Slide 14 text

Google I/O Extended 2024 Bangkok Have multiple Firestore databases in a single project to minimize serving latency and maximize data privacy. Multi-DB Firestore

Slide 15

Slide 15 text

Google I/O Extended 2024 Bangkok Get the document count for a query or collection, or the sum or average on a field in there, without reading the individual documents. Aggregations Firestore

Slide 16

Slide 16 text

Google I/O Extended 2024 Bangkok Have range and inequality conditions on multiple fields in a single query. Multi-fields range conditions Firestore db.collection(“car”) .whereLessThan(“price”, 40) .whereGreaterThan(“rating”, 3)

Slide 17

Slide 17 text

Google I/O Extended 2024 Bangkok Firebase NoSQL databases since 2012

Slide 18

Slide 18 text

Google I/O Extended 2024 Bangkok Firebase Data Connect

Slide 19

Slide 19 text

Google I/O Extended 2024 Bangkok PostgreSQL Cloud SQL

Slide 20

Slide 20 text

“You write the queries. We do the rest.” Firebase Data Connect

Slide 21

Slide 21 text

Google I/O Extended 2024 Bangkok Right-click and select ‘Replace image’ Firebase Data Connect

Slide 22

Slide 22 text

Google I/O Extended 2024 Bangkok Define your data model and the queries in GraphQL Declarative data model query GetUsers @auth(level: USER) { users { uid first last } } type User @table(key: ”uid”) { uid: String! first: String! last: String! email: String! } Firebase Data Connect

Slide 23

Slide 23 text

Google I/O Extended 2024 Bangkok SDKs Database API server Firebase Data Connect

Slide 24

Slide 24 text

Google I/O Extended 2024 Bangkok Firebase Data Connect import davideast.DemoConnector import davideast.ListUsersQuery val connector = DemoConnector.instance val response = connector.listUsers.execute() val firstUser = response.data.users.first() val firstName = firstUser.first Type-safe libraries Client code can be generated for multiple platforms in a type-safe manner.

Slide 25

Slide 25 text

Google I/O Extended 2024 Bangkok Firebase Data Connect Stay in sync from backend to front. Model changes type User @table(key: ”uid”) { uid: String! first: String! last: String! firstName: String! lastName: String! email: String! } val firstUser = response.data.users.first() val firstName = firstUser.first val firstName = firstUser.firstName

Slide 26

Slide 26 text

Google I/O Extended 2024 Bangkok Relations type User @table(key: ”uid”) { uid: String! firstName: String! lastName: String! email: String! } Define relationships between types in your schema type Order @table { customer: User! total: Float! name: String! } Firebase Data Connect

Slide 27

Slide 27 text

Google I/O Extended 2024 Bangkok Firebase Data Connect pgvector and embeddings mutation UpdatePizza($ref: String!, $description: String!, ...) { pizza_upsert(data: { ref: $ref, # ... description: $description, embedding_embed: { model: "textembeddinggecko@003", text: $description } }) }

Slide 28

Slide 28 text

Google I/O Extended 2024 Bangkok Firebase Data Connect Vector similarity search query SearchPizzas($query: String!, $ingredient: String) { description: description_embedding_similarity( compare_embed: { model: "textembeddinggecko@003", text: $query }, where: {ingredients: {includes: $ingredient}}, limit: 5 ) { ref, name, description } }

Slide 29

Slide 29 text

Google I/O Extended 2024 Bangkok Firebase Genkit

Slide 30

Slide 30 text

“An open source framework that helps you build, deploy, and monitor AI-powered apps” Firebase Genkit

Slide 31

Slide 31 text

Google I/O Extended 2024 Bangkok Firebase Genkit Easily put together the AI components Reduces the complexity of integrating AI components by giving you plugins and templates

Slide 32

Slide 32 text

Google I/O Extended 2024 Bangkok Plugins Integrations with AI models, vector databases, and more Firebase Genkit

Slide 33

Slide 33 text

Google I/O Extended 2024 Bangkok Developer tooling Run, evaluate, and debug your AI features locally Firebase Genkit

Slide 34

Slide 34 text

Google I/O Extended 2024 Bangkok Firebase App Hosting

Slide 35

Slide 35 text

“Build and deploy modern, full-stack web apps” Firebase App Hosting

Slide 36

Slide 36 text

Google I/O Extended 2024 Bangkok Connect App Hosting to your GitHub repository using the Firebase console or CLI. When it's time to deploy, push your changes to GitHub and watch App Hosting roll them out to production. Roll out to production with a simple 'git push' Firebase App Hosting

Slide 37

Slide 37 text

Google I/O Extended 2024 Bangkok No-config-needed build support for Angular and Next.js Firebase App Hosting Framework aware

Slide 38

Slide 38 text

Google I/O Extended 2024 Bangkok Apps are built with Cloud Build, served on Cloud Run with automatic scaling, and cached in Cloud CDN. Integrated services like Cloud Secret Manager keep your API keys safe. Firebase App Hosting App Hosting is powered by Google Cloud

Slide 39

Slide 39 text

Google I/O Extended 2024 Bangkok Firebase App Hosting App Hosting Dashboard Track each version of your web app to the exact git commit it was built with.

Slide 40

Slide 40 text

AI Assistance in Firebase Gemini in Firebase Gemini

Slide 41

Slide 41 text

Google I/O Extended 2024 Bangkok Answers questions about Firebase products and features Generates and explains Firebase code for faster development Offers troubleshooting support to improve app quality Gemini in Firebase

Slide 42

Slide 42 text

Google I/O Extended 2024 Bangkok Gemini in Crashlytics

Slide 43

Slide 43 text

Google I/O Extended 2024 Bangkok

Slide 44

Slide 44 text

Google I/O Extended 2024 Bangkok Firebase Test Lab

Slide 45

Slide 45 text

Google I/O Extended 2024 Bangkok Firebase Test Lab Android Device Streaming

Slide 46

Slide 46 text

Google I/O Extended 2024 Bangkok Firebase Remote Config

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

Remote Config A/B Testing App Distribution Crashlytics Performance Monitoring Test Lab In-App Messaging Analytics Cloud Messaging Run Build Auth Cloud Functions Cloud Firestore Cloud Storage Extensions Realtime Database App Hosting Genkit Data Connect Hosting ML App Check

Slide 54

Slide 54 text

“Making your app the best it can be” Firebase

Slide 55

Slide 55 text

Thank You @Jirawatee Google Developer Expert in Firebase