google-gemini-file-search

Installation
Summary

Fully managed RAG with automatic chunking, embeddings, and citations for document Q&A.

  • Supports 100+ file formats (PDF, Word, Excel, code) with configurable chunking strategies optimized by content type (technical docs: 500 tokens/chunk, prose: 800, legal: 300)
  • Requires Gemini 3 Pro or Flash models; File Search and Google Search tools are mutually exclusive in single requests
  • Prevents 12 common errors including storage quota miscalculation (3x multiplier), document immutability (delete+re-upload pattern), polling timeouts with manual verification fallback, and metadata limits (20 max fields)
  • Pricing: $0.15 per 1M input tokens for one-time indexing; free tier includes 1 GB storage and 1,500 requests/day; includes cost estimation and deduplication strategies
  • Includes 3 working templates (basic Node.js, Cloudflare Workers edge deployment, Next.js full-stack) plus CLI tools for store creation, batch uploads, and interactive queries
SKILL.md

Google Gemini File Search Setup

Overview

Google Gemini File Search is a fully managed RAG system. Upload documents (100+ formats: PDF, Word, Excel, code) and query with natural language—automatic chunking, embeddings, semantic search, and citations.

What This Skill Provides:

  • Complete @google/genai File Search API setup
  • 8 documented errors with prevention strategies
  • Chunking best practices for optimal retrieval
  • Cost optimization ($0.15/1M tokens indexing, 3x storage multiplier)
  • Cloudflare Workers + Next.js integration templates

Prerequisites

1. Google AI API Key

Create an API key at https://aistudio.google.com/apikey

Related skills
Installs
332
GitHub Stars
776
First Seen
Jan 20, 2026