AI / Google Antigravity Gemini Fundamentals Interview Questions
What is Search Grounding and why is it important for Gemini applications?
Search Grounding connects Gemini models to Google Search, enabling responses based on real-time, up-to-date web information rather than the model's training data alone. This is especially important because all Gemini 3 models have a knowledge cutoff of January 2025.
from google import genai from google.genai import types client = genai.Client() # Enable search grounding in generateContent response = client.models.generate_content( model="gemini-3.5-flash", contents="What are the latest Gemini API changes announced this week?", config=types.GenerateContentConfig( tools=[types.Tool(google_search=types.GoogleSearch())] ), ) print(response.text) # Access grounding metadata (sources used): if response.candidates[0].grounding_metadata: for chunk in response.candidates[0].grounding_metadata.grounding_chunks: print(f"Source: {chunk.web.title} - {chunk.web.uri}") # In the Interactions API: interaction = client.interactions.create( model="gemini-3.5-flash", input="What happened in AI news this week?", tools=[{"google_search": {}}], )
What grounding provides:
- Responses based on real-time Google Search results
- Source attribution - the API returns grounding metadata showing which web pages were used
- Significantly reduced hallucination for time-sensitive factual questions
- Automatic triggering when the model determines a search would improve the answer
Note: grounding does not eliminate hallucination entirely - it reduces it for recent factual queries. Always validate critical information from grounded responses.
More Related questions...