File Search Tool in Gemini API

🔍 File Search Tool in Gemini API

Build Smart RAG Applications with Google Gemini

📋 Table of Contents

🎯 What is File Search Tool?

Google has just launched an extremely powerful feature in the Gemini API: File Search Tool.
This is a fully managed RAG (Retrieval-Augmented Generation) system
that significantly simplifies the process of integrating your data into AI applications.

💡 What is RAG?

RAG (Retrieval-Augmented Generation) is a technique that combines information retrieval
from databases with the text generation capabilities of AI models. Instead of relying solely on pre-trained
knowledge, the model can retrieve and use information from your documents to provide
more accurate and up-to-date answers.

If you’ve ever wanted to build:

  • 🤖 Chatbot that answers questions about company documents
  • 📚 Research assistant that understands scientific papers
  • 🎯 Customer support system with product knowledge
  • 💻 Code documentation search tool

Then File Search Tool is the solution you need!

✨ Key Features

🚀 Simple Integration

Automatically manages file storage, content chunking, embedding generation,
and context insertion into prompts. No complex infrastructure setup required.

🔍 Powerful Vector Search

Uses the latest Gemini Embedding models for semantic search.
Finds relevant information even without exact keyword matches.

📚 Built-in Citations

Answers automatically include citations indicating which parts of documents
were used, making verification easy and transparent.

📄 Multiple Format Support

Supports PDF, DOCX, TXT, JSON, and many programming language files.
Build a comprehensive knowledge base easily.

🎉 Main Benefits

  • Fast: Deploy RAG in minutes instead of days
  • 💰 Cost-effective: No separate vector database management needed
  • 🔧 Easy maintenance: Google handles updates and scaling
  • Reliable: Includes citations for information verification

⚙️ How It Works

File Search Tool operates in 3 simple steps:

  • Create File Search Store
    This is the “storage” for your processed data. The store maintains embeddings
    and search indices for fast retrieval.
  • Upload and Import Files
    Upload your documents and the system automatically:

    • Splits content into chunks
    • Creates vector embeddings for each chunk
    • Builds an index for fast searching
  • Query with File Search
    Use the File Search tool in API calls to perform semantic searches
    and receive accurate answers with citations.

File Search Tool Workflow Diagram

Figure 1: File Search Tool Workflow Process

🛠️ Detailed Installation Guide

Step 1: Environment Preparation

✅ System Requirements

  • Python 3.8 or higher
  • pip (Python package manager)
  • Internet connection
  • Google Cloud account

📦 Required Tools

  • Terminal/Command Prompt
  • Text Editor or IDE
  • Git (recommended)
  • Virtual environment tool

Step 2: Install Python and Dependencies

2.1. Check Python

python –version

Expected output: Python 3.8.x or higher

2.2. Create Virtual Environment (Recommended)

# Create virtual environment
python -m venv gemini-env# Activate (Windows)
gemini-env\Scripts\activate# Activate (Linux/Mac)
source gemini-env/bin/activate

2.3. Install Google Genai SDK

pip install google-genai

Wait for the installation to complete. Upon success, you’ll see:

# Output when installation is successful:
Successfully installed google-genai-x.x.x

Package installation output

Figure 2: Successful Google Genai SDK installation

Step 3: Get API Key

  • Access Google AI Studio
    Open your browser and go to:
    https://aistudio.google.com/
  • Log in with Google Account
    Use your Google account to sign in
  • Create New API Key
    Click “Get API Key” → “Create API Key” → Select a project or create a new one
  • Copy API Key
    Save the API key securely – you’ll need it for authentication

Google AI Studio - Get API Key

Figure 3: Google AI Studio page to create API Key

Step 4: Configure API Key

Method 1: Use Environment Variable (Recommended)

On Windows:

set GEMINI_API_KEY=your_api_key_here

On Linux/Mac:

export GEMINI_API_KEY=’your_api_key_here’

Method 2: Use .env File

# Create .env file
GEMINI_API_KEY=your_api_key_here

Then load in Python:

from dotenv import load_dotenv
import osload_dotenv()
api_key = os.getenv(“GEMINI_API_KEY”)

⚠️ Security Notes

  • 🔒 DO NOT commit API keys to Git
  • 📝 Add .env to .gitignore
  • 🔑 Don’t share API keys publicly
  • ♻️ Rotate keys periodically if exposed

Step 5: Verify Setup

Run test script to verify complete setup:

python test_connection.py

The script will automatically check Python environment, API key, package installation, API connection, and demo source code files.

Successful setup test result

Figure 4: Successful setup test result

🎮 Demo and Screenshots

According to project requirements, this section demonstrates 2 main parts:

  • Demo 1: Create sample code and verify functionality
  • Demo 2: Check behavior through “Ask the Manual” Demo App

Demo 1: Sample Code – Create and Verify Operation

We’ll write our own code to test how File Search Tool works.

Step 1: Create File Search Store

Code to create File Search Store

Figure 5: Code to create File Search Store

Output when store is successfully created

Figure 6: Output when store is successfully created

Step 2: Upload and Process File

Upload and process file

Figure 7: File processing workflow

Step 3: Query and Receive Response with Citations

Query and Response with citations

Figure 8: Answer with citations

Demo 2: Check Behavior with “Ask the Manual” Demo App

Google provides a ready-made demo app to test File Search Tool’s behavior and features.
This is the best way to understand how the tool works before writing your own code.

🎨 Try Google’s Demo App

Google provides an interactive demo app called “Ask the Manual” to let you
test File Search Tool right away without coding!

🚀 Open Demo App

Ask the Manual demo app interface

Figure 9: Ask the Manual demo app interface (including API key selection)

Testing with Demo App:

  1. Select/enter your API key in the Settings field
  2. Upload PDF file or DOCX to the app
  3. Wait for processing (usually < 1 minute)
  4. Chat and ask questions about the PDF file content
  5. View answers returned from PDF data with citations
  6. Click on citations to verify sources

Files uploaded in demo app

Figure 10: Files uploaded in demo app

Query and response with citations

Figure 11: Query and response with citations in demo app

✅ Demo Summary According to Requirements

We have completed all requirements:

  • Introduce features: Introduced 4 main features at the beginning
  • Check behavior by demo app: Tested directly with “Ask the Manual” Demo App
  • Introduce getting started: Provided detailed 5-step installation guide
  • Make sample code: Created our own code and verified actual operation

Through the demo, we see that File Search Tool works very well with automatic chunking,
embedding, semantic search, and accurate results with citations!

💻 Complete Code Examples

Below are official code examples from Google Gemini API Documentation
that you can copy and use directly:

Example 1: Upload Directly to File Search Store

The fastest way – upload file directly to store in 1 step:

from google import genai
from google.genai import types
import timeclient = genai.Client()# Create the file search store with an optional display name
file_search_store = client.file_search_stores.create(
config={‘display_name’: ‘your-fileSearchStore-name’}
)# Upload and import a file into the file search store
operation = client.file_search_stores.upload_to_file_search_store(
file=‘sample.txt’,
file_search_store_name=file_search_store.name,
config={
‘display_name’: ‘display-file-name’,
}
)# Wait until import is complete
while not operation.done:
time.sleep(5)
operation = client.operations.get(operation)# Ask a question about the file
response = client.models.generate_content(
model=“gemini-2.5-flash”,
contents=“””Can you tell me about Robert Graves”””,
config=types.GenerateContentConfig(
tools=[
file_search=(
file_search_store_names=[file_search_store.name]
)
]
)
)print(response.text)

Example 2: Upload then Import File (2 Separate Steps)

If you want to upload file first, then import it to store:

from google import genai
from google.genai import types
import timeclient = genai.Client()# Upload the file using the Files API
sample_file = client.files.upload(
file=‘sample.txt’,
config={‘name’: ‘display_file_name’}
)# Create the file search store
file_search_store = client.file_search_stores.create(
config={‘display_name’: ‘your-fileSearchStore-name’}
)# Import the file into the file search store
operation = client.file_search_stores.import_file(
file_search_store_name=file_search_store.name,
file_name=sample_file.name
)# Wait until import is complete
while not operation.done:
time.sleep(5)
operation = client.operations.get(operation)# Ask a question about the file
response = client.models.generate_content(
model=“gemini-2.5-flash”,
contents=“””Can you tell me about Robert Graves”””,
config=types.GenerateContentConfig(
tools=[
file_search=(
file_search_store_names=[file_search_store.name]
)
]
)
)print(response.text)
📚 Source: Code examples are taken from

Gemini API Official Documentation – File Search

🎯 Real-World Applications

1. 📚 Document Q&A System

Use Case: Company Documentation Chatbot

Problem: New employees need to look up information from hundreds of pages of internal documents

Solution:

  • Upload all HR documents, policies, and guidelines to File Search Store
  • Create chatbot interface for employees to ask questions
  • System provides accurate answers with citations from original documents
  • Employees can verify information through citations

Benefits: Saves search time, reduces burden on HR team

2. 🔬 Research Assistant

Use Case: Scientific Paper Synthesis

Problem: Researchers need to read and synthesize dozens of papers

Solution:

  • Upload PDF files of research papers
  • Query to find studies related to specific topics
  • Request comparisons of methodologies between papers
  • Automatically create literature reviews with citations

Benefits: Accelerates research process, discovers new insights

3. 🎧 Customer Support Enhancement

Use Case: Automated Support System

Problem: Customers have many product questions, need 24/7 support

Solution:

  • Upload product documentation, FAQs, troubleshooting guides
  • Integrate into website chat widget
  • Automatically answer customer questions
  • Escalate to human agent if information not found

Benefits: Reduce 60-70% of basic tickets, improve customer satisfaction

4. 💻 Code Documentation Navigator

Use Case: Developer Onboarding Support

Problem: New developers need to quickly understand large codebase

Solution:

  • Upload API docs, architecture diagrams, code comments
  • Developers ask about implementing specific features
  • System points to correct files and functions to review
  • Explains design decisions with context

Benefits: Reduces onboarding time from weeks to days

📊 Comparison with Other Solutions

Criteria File Search Tool Self-hosted RAG Traditional Search
Setup Time ✅ < 5 minutes ⚠️ 1-2 days ✅ < 1 hour
Infrastructure ✅ Not needed ❌ Requires vector DB ⚠️ Requires search engine
Semantic Search ✅ Built-in ✅ Customizable ❌ Keyword only
Citations ✅ Automatic ⚠️ Must build yourself ⚠️ Basic highlighting
Maintenance ✅ Google handles ❌ Self-maintain ⚠️ Moderate
Cost 💰 Pay per use 💰💰 Infrastructure + Dev 💰 Hosting

🌟 Best Practices

📄 File Preparation

✅ Do’s

  • Use well-structured files
  • Add headings and sections
  • Use descriptive file names
  • Split large files into parts
  • Use OCR for scanned PDFs

❌ Don’ts

  • Files too large (>50MB)
  • Complex formats with many images
  • Poor quality scanned files
  • Mixed languages in one file
  • Corrupted or password-protected files

🗂️ Store Management

📋 Efficient Store Organization

  • By topic: Create separate stores for each domain (HR, Tech, Sales…)
  • By language: Separate stores for each language to optimize search
  • By time: Archive old stores, create new ones for updated content
  • Naming convention: Use meaningful names: hr-policies-2025-q1

🔍 Query Optimization

# ❌ Poor query
“info” # Too general# ✅ Good query
“What is the employee onboarding process in the first month?”# ❌ Poor query
“python” # Single keyword# ✅ Good query
“How to implement error handling in Python API?”# ✅ Query with context
“””
I need information about the deployment process.
Specifically the steps to deploy to production environment
and checklist to verify before deployment.
“””

⚡ Performance Tips

Speed Up Processing

  1. Batch upload: Upload multiple files at once instead of one by one
  2. Async processing: No need to wait for each file to complete
  3. Cache results: Cache answers for common queries
  4. Optimize file size: Compress PDFs, remove unnecessary images
  5. Monitor API limits: Track usage to avoid hitting rate limits

🔒 Security

Security Checklist

  • ☑️ API keys must not be committed to Git
  • ☑️ Use environment variables or secret management
  • ☑️ Implement rate limiting at application layer
  • ☑️ Validate and sanitize user input before querying
  • ☑️ Don’t upload files with sensitive data if not necessary
  • ☑️ Rotate API keys periodically
  • ☑️ Monitor usage logs for abnormal patterns
  • ☑️ Implement authentication for end users

💰 Cost Optimization

Strategy Description Savings
Cache responses Cache answers for identical queries ~30-50%
Batch processing Process multiple files at once ~20%
Smart indexing Only index necessary content ~15-25%
Archive old stores Delete unused stores Variable

🎊 Conclusion

File Search Tool in Gemini API provides a simple yet powerful RAG solution for integrating data into AI.
This blog has fully completed all requirements: Introducing features, demonstrating with “Ask the Manual” app, detailed installation guide,
and creating sample code with 11 illustrative screenshots.

🚀 Quick Setup • 🔍 Automatic Vector Search • 📚 Accurate Citations • 💰 Pay-per-use

🔗 Official Resources

 

Built a Real-Time Translator Web App Running a Local LLM on My Mac M1

🧠 I Built a Real-Time Translator Web App Running a Local LLM on My Mac M1

Recently, I had a small idea: to create a real-time speech translation tool for meetings, but instead of relying on online APIs, I wanted everything to run completely local on my Mac M1.
The result is a web demo that lets users speak into the mic → transcribe speech → translate in real-time → display bilingual subtitles on screen.
The average response time is about 1 second, which is fast enough for real-time conversations or meetings.


🎙️ How the App Works

The app follows a simple pipeline:

  1. SpeechRecognition in the browser converts voice into text.

  2. The text is then sent to a local LLM hosted via LM Studio for translation (e.g., English ↔ Vietnamese).

  3. The translated text is displayed instantly as subtitles on the screen.

My goal was to experiment with real-time translation for live meetings — for example, when someone speaks English, the listener can instantly see the Vietnamese subtitle (and vice versa).


⚙️ My Setup and Model Choice

I’m using a Mac mini M1 with 16GB RAM and 12GB of available VRAM via Metal GPU.
After testing many small models — from 1B to 7B — I found that google/gemma-3-4b provides the best balance between speed, accuracy, and context awareness.

Key highlights of google/gemma-3-4b:

  • Average response time: ~1 second on Mac M1

  • 🧩 Context length: up to 131,072 tokens — allowing it to handle long conversations or paragraphs in a single prompt

  • 💬 Translation quality: natural and faithful to meaning

  • 🎯 Prompt obedience: follows structured prompts well, unlike smaller models that tend to drift off topic

I host the model using LM Studio, which makes running and managing local LLMs extremely simple.
With Metal GPU acceleration, the model runs smoothly without lag, even while the browser is processing audio in parallel.

🧰 LM Studio – Local LLMs Made Simple

One thing I really like about LM Studio is how simple it makes running local LLMs.
It’s a desktop app for macOS, Windows, and Linux that lets you download, run, and manage models without writing code, while still giving you powerful developer features.

Key features that made it perfect for my setup:

  • Easy installation: download the .dmg (for macOS) or installer for Windows/Linux and you’re ready in minutes.

  • Built-in model browser: browse models from sources like Hugging Face, choose quantization levels, and download directly inside the app.

  • Local & public API: LM Studio can launch a local REST API server with OpenAI-compatible endpoints (/v1/chat/completions, /v1/embeddings, etc.), which you can call from any app — including my translator web client.

  • Logs and performance monitoring: it displays live logs, token counts, generation speed, and resource usage (RAM, GPU VRAM, context window occupancy).

  • No coding required: once the model is loaded, you can interact through the built-in console or external scripts using the API — perfect for prototyping.

  • Ideal for local prototyping: for quick experiments like mine, LM Studio removes all setup friction — no Docker, no backend framework — just plug in your model and start testing.

Thanks to LM Studio, setting up the local LLM was nearly effortless.


🌐 About SpeechRecognition – It’s Still Cloud-Based

At first, I thought the SpeechRecognition API in browsers could work offline.
But in reality, it doesn’t:

On browsers like Chrome, SpeechRecognition (or webkitSpeechRecognition) sends the recorded audio to Google’s servers for processing.
As a result:

  • It can’t work offline

  • It depends on an internet connection

  • You don’t have control over the recognition engine

This means that while the translation part of my app runs entirely local, the speech recognition part still relies on an external service.

🧪 Real-World Test

To test the pipeline, I read a short passage from a fairy tale aloud.
The results were surprisingly good:

  • Subtitles appeared clearly, preserving the storytelling tone and rhythm of the original text.

  • No missing words as long as I spoke clearly and maintained a steady pace.

  • When I intentionally spoke too fast or slurred words, the system still kept up — but occasionally missed punctuation or merged phrases, something that could be improved with punctuation post-processing or a small buffering delay before sending text to the LLM.

Tips for smoother results:

  • Maintain a steady speaking rhythm, pausing naturally every 5–10 words.

  • Add punctuation normalization before rendering (or enable auto-punctuation when using Whisper).

  • Process short chunks (~2–3 seconds) and merge them for low latency and better context retention.

🧩 Some Demo Screenshots

📷 Image 1 – Web Interface:
User speaks into the microphone; subtitles appear in real time below, showing both the original and translated text.

📷 Image 2 – LM Studio:
google/gemma-3-4b running locally on Metal GPU inside LM Studio, showing logs and average response time.


🔭 Final Thoughts

This project is still a small experiment, but I’m truly impressed that a 4B parameter model running locally can handle real-time translation this well — especially with a 131K token context window, which allows it to keep track of long, coherent discussions.
With Whisper integrated locally, I believe it’s possible to build a fully offline real-time translation tool — useful for meetings, presentations, or any situation where data privacy matters.


✳️ In short:
If you’re looking for a small yet smart model that runs smoothly on a Mac M1 without a discrete GPU, I highly recommend trying google/gemma-3-4b with LM Studio.
Sometimes, a small but well-behaved model — with a huge context window — is all you need to unlock big ideas 🚀

Quick Guide to Using Jules

Jules is Google’s asynchronous AI coding agent that integrates directly with your GitHub repositories to perform tasks like fixing bugs, writing tests, building new features, and bumping dependency versions.

Getting Started:

  1. Connect GitHub: Visit jules.google, select your repository and branch

  2. Assign Tasks: Write a detailed prompt for Jules, or add the “jules” label to a GitHub issue

  3. Jules Works: Jules fetches your repository, clones it to a Cloud VM, and develops a plan using the latest Gemini 2.5 Pro model Jules – An Asynchronous Coding Agent

  4. Review & Approve: Jules provides a diff of the changes for you to browse and approve
  5. Create PR: Once approved, Jules creates a pull request for you to merge and publish on GitHub

Automatically Generate Google Slides with an AI Prompt

I came across a very interesting idea from the author まじん (Majin) on note.com:

Majin used Gemini to turn a single prompt into a complete Google Slides presentation, but I tried customizing it to run with ChatGPT (or Google AI Studio), and the results were quite exciting.


1. 🔍 Structure of Majin’s Prompt

Through analysis, Majin’s prompt has the following main components:

  • Role assignment for AI: The AI is not just a chatbot, but acts as a Data Scientist and Presentation Designer.

  • Absolute mission: From a piece of input text, the AI must output a JavaScript object array (slideData) that defines the entire slide structure.

  • Fixed blueprint: The prompt includes a Google Apps Script (GAS) framework, where you only need to replace slideData to generate Google Slides.

  • SlideData includes:

    • title: Slide title

    • content: Content (in the form of bullets, text, or tables)

    • pattern: Display type (Title, List, TwoColumn, Image, …)

    • speakerNote: Presenter’s notes

👉 The important point: The prompt does not directly create slides, but outputs JSON-like data that the GAS script uses to build the slides.


2. 🛠️ Customizing & Running with ChatGPT

First, download system prompt.md

🔧 Steps inside the Project

  1. Create a new Project → give it a name (e.g., Google Slide Auto Generator).

  2. Add a file → upload system prompt.md.

  3. In the Project Settings / Overview screen, you will find the Instructions (System message) box → paste the line:
    添付した「system prompt.md」に忠実に従ってください。

  4. (Meaning: Please strictly follow the attached system prompt.md).
    If you don’t see a dedicated “Instructions” field, ChatGPT may show “Description” or “Setup” instead → paste it there. It works as the System Prompt for the whole Project.

  5. From now on, in that Project, whenever you input raw text, ChatGPT will immediately reference system prompt.md and output both slideData + GAS code.

👉 In other words: the Project’s Instruction acts as a dedicated System Message for that workspace. The UI may look different, but it’s always under “Overview/Setup” when you open the Project.

Next, type a prompt about the content you want to make slides from → and it will generate slideData.

I tested it with content about LLMs and got the following result:

const slideData = [

{

type: ‘title’,

title: ‘The Busy Person’s Intro to Large Language Models’,

date: ‘2025.09.21’,

notes: ‘Re-recorded overview of LLMs focusing on what they are, how to run them, how they are trained, and why next-word prediction works’

},

{

type: ‘content’,

title: ‘Agenda’,

points: [

‘What is an LLM’,

‘Running a model locally’,

‘Training at scale’,

‘Why next-word prediction is powerful’,

‘Key takeaways’

],

notes: ‘Keep it practical and concrete. We start with the simplest mental model, then show inference vs training, then the intuition for why LLMs encode knowledge’

},

{

type: ‘section’,

title: ‘1. What is an LLM’,

notes: ‘Define an LLM at the simplest level and frame the talk around artifacts you can hold on disk’

},

{

type: ‘content’,

title: ‘LLM = Two Files’,

subhead: ‘Weights + Runner’,

points: [

‘Parameters file holds learned weights’,

‘Runner implements forward pass of the network’,

‘Self contained package runs offline’

],

notes: ‘Stress that inference can be simple and local. The interesting part lives in the parameters learned during training’

},

{

type: ‘content’,

title: ‘Example: Llama 2 • 70B’,

subhead: ‘Open weights from Meta’,

points: [

‘Sizes include 7B 13B 34B 70B’,

‘Open weights and paper enable local study’,

‘Closed APIs trade control for convenience’

],

notes: ‘Contrast open weights with closed APIs like hosted assistants without exposing internals’

},

{

type: ‘section’,

title: ‘2. Running a Model’,

notes: ‘Give a feel for local inference and why the demo used a smaller model for speed’

},

{

type: ‘process’,

title: ‘Local Inference Flow’,

subhead: ‘From files to generations’,

steps: [

‘Get weights file on disk’,

‘Compile or install a runner’,

‘Point runner to weights’,

‘Send a prompt’,

‘Stream generated tokens’

],

notes: ‘Mention that a 7B model is fast enough on a laptop while 70B is roughly an order of magnitude slower’

},

{

type: ‘compare’,

title: ‘Open Weights vs Closed API’,

leftTitle: ‘Open Weights’,

rightTitle: ‘Closed API’,

leftItems: [

‘Full local control’,

‘Offline capable’,

‘Tunable and inspectable’

],

rightItems: [

‘Best quality access’,

‘No infra to manage’,

‘Faster to integrate’

],

notes: ‘There is no universal winner. Choose based on control privacy latency and capability needs’

},

{

type: ‘section’,

title: ‘3. Training at Scale’,

notes: ‘Explain where weights come from and why training is expensive compared to inference’

},

{

type: ‘content’,

title: ‘Training Ingredients’,

subhead: ‘Data Compute Cost’,

points: [

‘Large curated text corpus’,

‘Massive GPU clusters for days’,

‘Significant budget for runs’

],

notes: ‘Use order of magnitude thinking rather than exact numbers. Emphasize engineering and data work beyond raw compute’

},

{

type: ‘timeline’,

title: ‘From Corpus to Weights’,

subhead: ‘Very high level lifecycle’,

milestones: [

{ label: ‘Collect and filter data’, date: ‘Step 1’, state: ‘done’ },

{ label: ‘Train on GPU cluster’, date: ‘Step 2’, state: ‘done’ },

{ label: ‘Evaluate and align’, date: ‘Step 3’, state: ‘done’ },

{ label: ‘Release weights and runner’, date: ‘Step 4’, state: ‘next’ }

],

notes: ‘Keep the audience at the bird’s eye view. The output is a weights artifact you can reuse everywhere for inference’

},

{

type: ‘section’,

title: ‘4. Why It Works’,

notes: ‘Bridge from mechanics to intuition about capability’

},

{

type: ‘content’,

title: ‘Next Word Prediction Objective’,

subhead: ‘Simple objective rich consequences’,

points: [

‘Model predicts a distribution over next token’,

‘Good prediction forces world knowledge’,

‘Patterns styles and relations get compressed’

],

notes: ‘Relate prediction to lossy compression intuition. To predict the next token the model must encode structure facts and relationships’

},

{

type: ‘content’,

title: ‘Common Misconceptions’,

points: [

‘It is not copy paste of the web’,

‘Bigger is not always better’,

‘Closed is not always better than open’

],

notes: ‘Clarify generalization vs memorization and the role of data quality and algorithms along with scale’

},

{

type: ‘section’,

title: ‘5. Takeaways’,

notes: ‘Land the plane with pragmatic guidance’

},

{

type: ‘content’,

title: ‘Practical Guidance’,

points: [

‘Choose model size for latency and cost’,

‘Use open weights for control’,

‘Use hosted APIs for frontier quality’

],

notes: ‘Map choices to product constraints such as privacy cost latency and maintainability’

},

{

type: ‘closing’,

notes: ‘Thanks for watching. Invite questions and link resources in the description’

}

];

Next steps

  1. Open the .md file on your computer.

  2. Copy the code from the .md file.

  3. Open Google Slides → create a new slide deck.

  4. Click Extensions → Apps Script.

  5. Paste the copied code into the Apps Script editor.

  6. Paste your slideData.

  7. Press Run


3. ✅ Experience & Results

 

  • Works well on ChatGPT: No need for Gemini, GPT-5 is enough.

  • Advantage: The prompt standardizes the output into a JSON-like object, making it easy to control.

  • Reference implementation:


📌 Conclusion

  • Majin’s prompt is a great framework to turn AI into an automatic slide design tool.

  • It doesn’t have to be Gemini — ChatGPT (GPT-5) also works well.

  • You just need to customize the input → and you can generate Google Slides for any topic (training, pitching, learning…).

👉 This article was written with reference to blogs by まじん (Majin):