Today, we're launching the File Search Tool, a fully managed RAG system built directly into the Gemini API that abstracts away the retrieval pipeline so you can focus on building. File Search provides a simple, integrated and scalable way to ground Gemini with your data, delivering responses that are more accurate, relevant and verifiable.
To make File Search simple and affordable for all developers, we’re making storage and embedding generation at query time free of charge. You only pay for creating embeddings when you first index your files, at a fixed rate of $0.15 per 1 million tokens (or whatever the applicable embedding model cost is, in this case gemini-embedding-001). This new billing paradigm makes the File Search Tool both significantly easier and very cost-effective to build and scale with.
How File Search works
File Search accelerates your development workflow by handling the complexities of RAG for you. It provides a user-friendly alternative to a self-managed setup.
- Simple, integrated developer experience: We've streamlined the entire RAG process. File Search automatically manages file storage, optimal chunking strategies, embeddings and the dynamic injection of retrieved context into your prompts. It works within the existing `generateContent` API, making it easy to adopt.
- Powerful vector search: Powered by our latest state-of-the-art Gemini Embedding model, File Search uses vector search to understand the meaning and context of a user's query. It can find relevant information from your documents, even if the exact words aren't used.
- Built-in citations: The model’s responses automatically include citations that specify which parts of your documents were used to generate the answer, simplifying verification.
- Support for a wide range of formats: You can build a comprehensive knowledge base using a vast array of file formats, including PDF, DOCX, TXT, JSON and many common programming language file types (see the full list of supported formats in the docs)
You can see the File Search Tool in action through one of our new demo app in Google AI Studio (needs a paid API key).
