Google has introduced three major updates to the Gemini API File Search tool: multimodal support, custom metadata filtering, and page-level citations. These features help developers bring structure to unstructured data for efficient, verifiable RAG.
RAG, or retrieval-augmented generation, is the practice of grounding an LLM's responses in external documents rather than relying purely on training data. The challenge has always been infrastructure: you need chunking logic, an embedding pipeline, a vector store, and a retrieval layer before you write a single line of product code. Google's File Search Tool is a fully managed RAG system built directly into the Gemini API that abstracts away the retrieval pipeline so developers can focus on building.
The latest expansion takes that foundation further. Text-only retrieval is no longer the ceiling.
What Is the Gemini API File Search Tool?
The Gemini API enables RAG through the File Search tool. File Search imports, chunks, and indexes your data to enable fast retrieval of relevant information based on a provided prompt. This retrieved information is then used as context for the model, allowing it to provide more accurate and relevant answers.
File Search is the Gemini API's built-in RAG tool. When you upload your documents, the API takes care of the heavy lifting: chunking, embedding, indexing, and retrieval. At query time, pass a file_search tool alongside your prompt, and the model automatically retrieves relevant chunks from your data to generate a grounded response.
A File Search store is a container for your document embeddings. While raw files uploaded through the Files API are deleted after 48 hours, the data imported into a File Search store is stored indefinitely until you manually delete it.
The Three New Capabilities
Native Multimodal Retrieval
File Search now processes images and text together. Powered by the Gemini Embedding 2 model, the tool understands native image data, providing agents contextual awareness.
The File Search tool in the Gemini API now supports multimodal retrieval by adding support for Gemini Embedding 2. This update allows images, such as charts, product photos, and diagrams, to be natively indexed and searched in the same store as your text-based documents.
With the gemini-embedding-2 model, images are embedded directly rather than relying on OCR, enabling true visual retrieval. That distinction matters. OCR-based approaches extract text from images and discard the visual signal. A shared embedding space preserves it. Multimodal embeddings reduce the need for separate vision-only retrieval stacks by representing images and text in a shared vector space, which can simplify pipelines for tasks that mix visual and textual queries.
To enable multimodal stores, when you create a FileSearchStore, you must override the default text-only embedding model to use a multimodal model. Use models/gemini-embedding-2 to process both text and images.
Custom Metadata Filtering
By applying metadata filters at query time, your application can scope requests to the data slice required. This significantly reduces noise from irrelevant documents, increasing both the speed and accuracy of your RAG workflows.
Custom metadata filters perform a classic information-retrieval optimization, narrowing candidate sets before nearest-neighbor search, which typically reduces latency and cost at scale. In practice, this means a multi-tenant application can share a single store across product lines or regions without duplicating documents, filtering by label at query time instead.
Page-Level Citations
When your application pulls an answer from a massive PDF, users need to verify exactly where that answer came from. File Search now ties the model's response directly to the original source. It captures the page number for every piece of indexed information.
Every response includes grounding metadata that links the answer to specific documents and pages. For multimodal stores, citations also include downloadable image references.
Page-level citations address a persistent RAG failure mode by making provenance auditable, which helps downstream verification and assertion tracing in user-facing applications. For compliance-heavy domains like legal or healthcare, this isn't a convenience feature. It's a prerequisite.
The Gemini Embedding 2 Model Underneath
The multimodal capability rests on Gemini Embedding 2, which recently reached general availability. It's the first embedding model in the Gemini API that maps text, images, video, audio, and documents into a single embedding space, supporting over 100 languages.
The model handles an expansive range of inputs in a single call: up to 8,192 text tokens, 6 images, 120 seconds of video, 180 seconds of audio, and 6 pages of PDFs.
Early adopters are reporting measurable gains. Harvey, a legal research platform for law firms and enterprises, has seen a 3% increase in Recall@20 precision on legal-specific benchmarks compared to their previous embeddings, leading to more accurate citations and answers. Supermemory has achieved a 40% increase in search Recall@1 accuracy and leveraged these embeddings to drive performance across their core retrieval pipelines, spanning indexing, search, and Q&A.
Gemini Embedding 2 is trained using Matryoshka Representation Learning (MRL), so you can truncate the default 3072-dimensional vectors down to smaller dimensions using the output_dimensionality parameter for more efficient storage. Google recommends 1536 or 768 for highest efficiency.
Pricing and Storage
File storage and embedding generation at query time is free, and you'll only pay for creating embeddings when you first index your files and the normal Gemini model input/output token cost. This billing model makes the File Search Tool both easier and more cost-effective to build and scale with.
The fixed rate is $0.15 per 1 million tokens for initial indexing using gemini-embedding-001. For teams with high read volume and infrequent document updates, the economics are favorable compared to services that charge per query.
Each project receives ten stores, with free tier storage capped at 1 GB. Higher tiers scale storage to 1 TB, though Google suggests 20 GB stores for stable latency.
One practical note: developers should track how often their system updates documents, because re-indexing triggers new embedding costs.
Real-World Performance
Beam, an AI-driven game generation platform developed by Phaser Studio, integrates File Search into its workflow, running thousands of searches daily against a growing library of template data. File Search routinely handles parallel queries across all corpora, combining results in under 2 seconds, a significant improvement over manual cross-referencing that previously took hours.
A healthcare client migrated 12 years of SOPs (approximately 640 MB) into File Search and wired it into a Gemini 2.5 Pro assistant, slashing document lookup time from 9 minutes to 45 seconds. The citations exported straight into their audit trail with no extra tooling required.
Final Thoughts
The multimodal expansion is the most technically meaningful part of this update. Text-only RAG has been solvable for a while, but the moment your knowledge base includes diagrams, charts, scanned forms, or product images, the pipeline complexity used to spike dramatically. Putting images and text into a shared vector space through a managed API removes that complexity at the infrastructure level, which is where it belongs.
The page-level citation feature deserves equal attention. Hallucination in RAG systems isn't always about the model generating wrong answers. Sometimes it's about the model citing the right document but the wrong section, and users having no way to check. Tying every response to a specific page number, and including downloadable image references for multimodal stores, makes the output auditable in a way that actually holds up in production.
The open question I'd watch is retrieval precision on mixed-modality queries at scale. Early benchmark numbers from Harvey and Supermemory are encouraging, but those are text-heavy domains. How well the shared embedding space handles queries that genuinely span both modalities, say a question answered partly by a diagram and partly by a paragraph, will determine how broadly this gets adopted in visually rich domains. If you're building anything that touches documents with embedded visuals, this update is worth testing now. What do you think? Drop your thoughts in the comments.
Frequently Asked Questions
5 questions
1What is the Gemini API File Search tool?
It's a fully managed RAG system built directly into the Gemini API that abstracts away the retrieval pipeline so developers can focus on building. It handles chunking, embedding, indexing, and retrieval automatically.







