AI / Google Antigravity Gemini Fundamentals Interview Questions
How does thinking/reasoning work in Gemini models and what is thinking_level?
Gemini 3 series models use dynamic thinking by default - they automatically decide how much internal reasoning to apply before responding, calibrated to the task complexity. Developers can influence this via the thinking_level parameter.
from google import genai from google.genai import types client = genai.Client() # Dynamic thinking is ON by default for Gemini 3 models # Use thinking_level to control depth: response = client.models.generate_content( model="gemini-3.1-pro-preview", contents="Design a thread-safe cache with O(1) operations.", config=types.GenerateContentConfig( thinking_config=types.ThinkingConfig( thinking_level="high", # "none" | "low" | "medium" | "high" ) ) ) # Thinking steps are visible as execution steps in the Interactions API interaction = client.interactions.create( model="gemini-3.1-pro-preview", input="Find all race conditions in this code: ...", ) for step in interaction.steps: if step.type == "thought": print(f"Thinking: {step.signature[:50]}...") # encrypted thought elif step.type == "model_output": print(f"Output: {step.content[0].text}")
| Value | Behaviour | Use case |
|---|---|---|
| none | No internal reasoning; direct response | Simple factual queries, fast responses |
| low | Minimal reasoning | Basic analysis tasks |
| medium | Balanced reasoning (typical default) | Most general tasks |
| high | Deep reasoning; slower but more accurate | Complex coding, math, architecture design |
Legacy note: thinking_budget is still supported for backward compatibility but Google recommends migrating to thinking_level for more predictable performance. Do not use both parameters in the same request.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
