From the Google technology developers blog…

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 accurate, relevant and verifiable:

  • Integrated developer experience: automatically manages file storage, chunking strategies, embeddings and dynamic injection of retrieved context into prompts.
  • Vector search: to understand the meaning and context of user querys even if the exact words aren’t used.
  • Built-in citations: automatically included citations specify which parts of your documents were used to generate the answer.
  • Support for a wide range of formats: including PDF, DOCX, TXT, JSON and common programming language file types.

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 easier and cost-effective to build and scale with.

https://blog.google/technology/developers/file-search-gemini-api