Build intelligent Android apps: Cloud and hybrid inference

Build intelligent Android apps: Cloud and hybrid inference 图片 1
Build intelligent Android apps: Cloud and hybrid inference 图片 2
Build intelligent Android apps: Cloud and hybrid inference 图片 3
Build intelligent Android apps: Cloud and hybrid inference 图片 4

Posted by Thomas Ezan, Jolanda Verhoef, Caren Chang, Senior Developer Relations Engineers, Android Developer Relations

Welcome back to the blog post series " Build intelligent Android apps " where we take a basic Android app and transform it into a personalized, intelligent, and agentic experience. In our previous post we explored how to build intelligent on-device features using Gemini Nano through ML Kit's Prompt API.

In this post, we will look at how you can leverage Firebase AI Logic to build cloud-hosted and hybrid AI features:

Grounding answers in real-world context

Routing requests dynamically between cloud and local execution using hybrid inference

Translating content with custom routing systems

Sometimes a use case requires AI models with greater world knowledge, a much larger context window, or the ability to handle complex queries. In those scenarios, we can leverage cloud models.

Other times, you want the best of both worlds: using hybrid inference to run on-device when available to lower costs, while falling back to the cloud to ensure compatibility for all devices.

Cloud and hybrid features in Jetpacker: Museum assistant with web grounding, hybrid restaurant review drafting, and support chat featuring custom-routed live translation.

Let’s look at how we implemented three cloud and hybrid features in Jetpacker:

a museum assistant with web grounding

hybrid restaurant review drafting

hotel support chat featuring custom-routed live translation.

Use LLM grounding for up-to-date informationMuseum assistant chatbot with LLM grounding

The Museum assistant is an interactive chatbot designed to help users plan their museum visits. It provides visitors with up-to-date details regarding specific exhibits, current opening hours, ticket pricing, and more.

Museum assistant is a chatbot that answers questions, such as

‘How can I get a ticket discount for Le Louvre?’

When building AI features, getting the model to answer with fresh, accurate, and spec…

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论