About this lab
You are a developer at a fast-growing fintech startup called PayTrack. The finance team spends hours every month manually reviewing expense reports, reading receipts, and categorizing spending. Your team lead asks you to prototype a smart expense analyzer that uses AI to process visual data automatically.
In this lab, you will learn how Gemini can understand images and documents (not just text), send charts and receipt images to the API and get intelligent analysis back, and use controlled generation to extract clean, structured JSON data from messy visual inputs. By the end, you will have a Python pipeline that processes expense charts and receipts and outputs structured data ready for a database.
Lab details
- Level: Beginner
- Cloud: GCP
- Domain: AI Engineering
- Duration: 75 minutes
What you will learn
- Understand what multimodal AI means and why it matters
- Send images to the Gemini API and get intelligent analysis back
- Use controlled generation to extract structured JSON from images
- Build a pipeline that processes expense documents automatically
- Modify Pydantic schemas to customize what data Gemini extracts
Concepts covered
- Multimodal AI
- Image Analysis
- Structured Output
- Controlled Generation
- Pydantic Models
Technologies used
- Google Cloud Vertex AI
- Gemini 2.5 Flash
- Google Gen AI SDK
- Matplotlib
Prerequisites
- Basic Python knowledge
- A Google Cloud account with Vertex AI API enabled (completed in Lab 1)
Topics
- GCP
- Gemini
- Multimodal
- Image Analysis
- Structured Output
- Beginner
- Gen AI