WhoBuilt

AI Engineering with the Google Gemini 2.5 Model Family

Jul 11, 2025· 1 h 45 min· 4.9K views·Watch on YouTube

Speaker

Philipp Schmid of Google DeepMind leads an AI Engineer workshop on building with the Gemini 2.5 model family, using code and notebooks to explore text, multimodal inputs, tools, and MCP integration.

Set up Gemini and the workshop notebooks

Schmid introduces Gemini 2.5 Pro and Flash, focusing on Flash because it is available through the free API tier. Participants use AI Studio to create an API key and run workshop notebooks in Google Colab; the repository includes setup instructions and solutions. The workshop covers text generation, multimodal tasks, structured outputs, function calling, native tools, and MCP servers.

Generate text, manage conversations, and control costs

The first section demonstrates text generation, streaming responses, token counting, chat history, and generation settings through the Google AI SDK. Schmid explains that Gemini 2.5 can spend tokens on thinking, which are priced like output tokens, and that a thinking budget can limit this usage. He also shows uploading a book through the Files API so requests can refer to the stored file instead of resending it.

Use Gemini with images, PDFs, audio, and video

The multimodal section shows Gemini extracting a €20.20 total from a German supermarket invoice and processing PDFs with OCR and page images. Schmid recommends testing model performance on representative documents and using token counts and evaluations to assess cost and accuracy. He also describes video analysis, including timestamped answers, and says videos are processed at one frame per second.

Build structured outputs and tool calling

Schmid uses Pydantic schemas to turn model responses into structured data, including extracting invoice dates, items, and prices. He then demonstrates function calling: Gemini returns a function name and arguments, the developer runs the function, and its result goes back to the model for a user-facing answer. Calls can run in parallel when independent, or sequentially when one result is needed by another.

Connect native tools and MCP servers

Gemini's native tools include Google Search, code execution, and URL context; Search can return grounding metadata that links response content to sources. Schmid shows the Google GenAI SDK handling the tool loop for an MCP weather server, while noting that larger tool sets may need filtering. He also introduces ADK as a higher-level option for building agents and managing tools.

Takeaways

  • Use the Gemini SDK's streaming method to return response chunks as they arrive.
  • Track input, output, and thinking tokens when estimating request costs; set a thinking budget to cap reasoning usage.
  • Evaluate multimodal models on your own documents and prompts, since accuracy depends on the material and task.
  • Return structured data with a schema when model output needs to feed a database or another API.
  • Use MCP to reuse tool definitions and implementations, and filter available tools when the set becomes large.

Mentioned in this talk

Search inside this talk

What was claimed 14

Show all 14 facts

Related talks