Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/derailed-dash/gemini-file-search-demo/llms.txt

Use this file to discover all available pages before exploring further.

This codelab walks you through building RAG-powered agents using Gemini File Search — Google’s fully-managed retrieval system built directly into the Gemini API. You’ll go from a baseline agent with no knowledge of your data, to a multi-agent system that can query your bespoke documents alongside live Google Search — all without writing a single line of embedding code.

Introduction

What this codelab covers and what you’ll build by the end

Prerequisites

Set up your Google Cloud project, clone the repo, and get your API key

What is RAG?

Understand why RAG matters and how Gemini File Search simplifies it

Gemini File Search

Explore how the File Search Store works and what document types it supports

What you’ll build

By the end of this codelab, you’ll have a multi-agent system that:
  • Uses Gemini File Search to answer questions about your bespoke documents
  • Falls back to Google Search for general knowledge queries
  • Is built on the Google Agent Development Kit (ADK) for clean, extensible structure
  • Can be explored interactively through the ADK Web UI
1

Build the baseline agent

Start with a simple Gemini SDK agent that uses Google Search. Prove it cannot answer questions about your custom documents.
2

Create a File Search Store

Use a Jupyter notebook to create a Gemini File Search Store and upload your documents. No chunking, embedding, or vector DB needed.
3

Add RAG to your agent

Attach the File Search Store as a tool. Watch the agent correctly answer questions it previously had no knowledge of.
4

Migrate to ADK and combine tools

Convert your agent to ADK, then combine File Search and Google Search in a multi-agent system using the Agent-as-a-Tool pattern.

The approach

Basic SDK agent

A minimal agent using the raw Google Gen AI SDK with Google Search

File Search Store setup

Create and populate a File Search Store via Jupyter notebook

SDK RAG agent

Attach the File Search Store to your SDK agent for RAG capability

Multi-agent ADK system

Build a full multi-agent ADK system with both RAG and Google Search
This codelab is designed to run in Google Cloud Shell Editor or any local Python 3.12+ environment. Costs are minimal — completing the lab is expected to cost at most a few pennies.

Build docs developers (and LLMs) love