A live demo walkthrough showing how to optimize prompts for on-device AI using ML Kit's GenAI prompt API with Gemini Nano. The presenter demonstrates how an initial verbose prompt produces slow, lengthy responses, then shows how adding constraints like 'one sentence, less than 15 words' dramatically speeds up generation to 1.6 seconds. The optimized prompt is then shown running in a Jetpack Compose Android app for a Paris trip itinerary summary feature.

1m watch time
1 Impression