Lesson 21 · Expert · 15 min
Google AI Studio: temperature, System Instructions, and Function Calling
Master Google AI Studio: tune model temperature, define System Instructions, enforce Structured JSON schemas, and configure tools with Function Calling.
- Goal
- You will navigate Google AI Studio to calibrate hyperparameters, mandate strict JSON output, and configure Function Calling tools to bridge Gemini with enterprise systems.
- Skills
- Frame

Google AI Studio is the rapid prototyping workbench provided by Google to experiment with Gemini models without writing infrastructure code. This distraction-free interface gives direct control over immutable system instructions, sampling temperature, context windows, and enables Function Calling via JSON Schema declarations to bridge Gemini with enterprise systems and live databases.
1The API engine room: governing hyperparameters and declaring functions
The API engine room allows teams to govern hyperparameters and declare functions to orchestrate reliable operational pipelines. Google AI Studio reveals the raw capabilities of Gemini models unencumbered by consumer application guardrails.
On the standard consumer interface, Google applies hidden default system instructions. Inside Google AI Studio, users select the specific model checkpoint (Gemini 2.5 Flash for low latency or Pro for deep reasoning), calibrate temperature (from 0.0 for mathematical fidelity to 1.0 for creative exploration), and leverage two complementary structural engineering mechanisms:
- Structured Outputs: You supply a target JSON Schema. Gemini masks its decoding logits to mathematically guarantee that its final response strictly adopts 100% of the requested schema, eliminating conversational padding.
- Function Calling: You declare a catalog of available tools (function name, description, and parameter JSON Schema). When a user query requires real-time facts, Gemini halts text generation and emits a structured
functionCallJSON payload. Your backend application executes the query and returns afunctionResponse, which Gemini ingests to synthesize its final conclusion.
Technical dimension AI Studio configuration Operational impact Recommended enterprise application Temperature 0.0 to 2.0 Calibrates statistical token sampling randomness 0.0 for tabular extraction ; 0.7 for prose System Instructions Root text container Immutable boundaries applied on every run Roles, organizational policies, and firm bans Structured Output Formal JSON Schema Enforces pure programmatic machine payloads Direct ingestion into databases and ERPs Function Calling JSON Schema tool specs Emits structured tool calls with typed arguments Querying ERP inventories, CRMs, or live metrics 

Diagram 'Google AI Studio Console'Diagram generated by AI and reviewed 2Declaring an inventory lookup function in JSON Schema inside Google AI Studio
Declaring an inventory lookup function in JSON Schema inside Google AI Studio illustrates how to connect Gemini to enterprise databases with zero factual hallucinations.
A logistics manager wants Gemini to answer warehouse stock inquiries using authoritative internal records rather than guessing quantities.
1. Tool declaration (Tools > Function Calling in AI Studio).
In AI Studio's lateral panel, enable Function Calling and specify the following JSON Schema definition:
{ "name": "check_product_inventory", "description": "Queries internal warehouse databases for real-time item availability and scheduled incoming purchase orders.", "parameters": { "type": "OBJECT", "properties": { "sku_code": { "type": "STRING", "description": "Unique product SKU identifier (e.g., SKU-4820 or SKU-9102)" }, "include_incoming": { "type": "BOOLEAN", "description": "Whether to check pending supplier deliveries scheduled for the current week" } }, "required": ["sku_code"] } }2. User prompt.
Hello, do we have remaining inventory for item SKU-4820 and is any replenishment shipment scheduled for this week?3. Automated tool invocation by Gemini (
functionCalloutput).Rather than generating fabricated numbers, Gemini detects the declared tool's relevance and emits this structured payload:
{ "functionCall": { "name": "check_product_inventory", "args": { "sku_code": "SKU-4820", "include_incoming": true } } }4. Backend execution (
functionResponse) and final answer.Your backend application executes the database lookup and injects the ground truth payload:
{"status": "in_stock", "available_units": 18, "next_delivery": "2026-09-21", "replenishment_units": 50}.Gemini then composes the final verified answer: 'Item SKU-4820 currently has 18 available units in the warehouse. An additional replenishment shipment of 50 units is confirmed for September 21, 2026.'
The difference. The model never guessed: it acted as an authoritative dispatcher, parsing natural language entities and grounding its output entirely on verifiable enterprise data.
3Declare a custom business function and evaluate tool invocation inside AI Studio
Declare a custom business function and evaluate tool invocation inside AI Studio to validate agentic workflows before writing integration code, following Model Context Protocol (MCP) tool standards.
To practise without handling internal booking systems, here is the specification of a room reservation tool for fictional company NovaTech Ltd:
[Business Tool Specification - NovaTech Ltd (Sandbox Environment)] Tool: reserve_conference_room Description: Registers a meeting room booking across NovaTech Ltd regional hubs. Expected parameters: - room_name (string, required): name of the room ("London", "Manchester", "Bristol", "Edinburgh") - booking_date (string, required): date formatted as YYYY-MM-DD - headcount (integer, required): expected attendees (must be > 0 and <= 20) - purpose (string, optional): meeting topic or business purposeThe composer's "Load exercise" button prepopulates the objective with the weak starting prompt:
"Configure the room booking function with required arguments and expected format."
Open aistudio.google.com with Gemini 2.5 Flash (temperature 0.1). In the Tools section, activate Function Calling and declare the
reserve_conference_roomtool adhering to the JSON schema above (Toolformer architecture, arXiv:2302.04761).Then submit this user prompt:
"Book the London boardroom for 8 people on September 24, 2026 to conduct our quarterly executive leadership review for NovaTech Ltd."
Self-evaluation rubric: (a) Gemini avoids conversational guessing and emits a structured
functionCallobject; (b) all three mandatory argumentsroom_name,booking_date, andheadcountare extracted accurately; (c) the structure strictly conforms to the MCP Tool Use specification.4Confusing sandbox prototyping environments with enterprise production gates
Confusing sandbox prototyping environments with enterprise production gates creates serious governance blind spots and exposes business workflows to unmonitored operational service disruptions.
Google AI Studio serves as an experimental laboratory for prototyping prompt templates and tool definitions, not an enterprise middleware endpoint. Connecting live production database credentials directly without validation proxies or failing to sanitize arguments returned by
functionCallintroduces critical security vulnerabilities.Fix: utilize AI Studio for laboratory prototyping and JSON schema validation, then deploy verified templates via Vertex AI, Cloud Run, or sovereign on-premise infrastructure with strict authentication layers.
Rule to remember: AI Studio designs and calibrates interface contracts; your application backend authenticates and executes real database calls.
5Quiz
Three questions, instant feedback. Each option comes with an explanation.
6Proof of mastery
Configure a prototype in Google AI Studio: share the System Instructions, chosen temperature calibration (0.2), declare a business tool in JSON Schema, and present the structured functionCall payload generated by Gemini.
This lesson counts towards the Expert badgeSee the four badges
Criteria
Going further
Examine glossary entries for ancrage and output format. The next lesson, Test sets and robustness, shows how to industrialize evaluations across 10 edge cases. For compliance rules and sovereign hosting architecture, explore Usage policy and data sovereignty.
Frequently asked questions
What is Google AI Studio?
It is Google's web prototyping workbench for experimenting, parameterizing, and evaluating Gemini models (Flash, Pro) before pushing prompt pipelines and tools to production APIs.
What is the core difference between Structured Outputs and Function Calling?
Structured Outputs constrain the final text generated by Gemini into a rigid JSON schema. Function Calling equips Gemini with external tools it can decide to invoke with typed parameters before composing its final natural language answer.
How do you declare a custom function in the Gemini API?
Inside the Tools panel or API request, each function is described by its name, a clear functional description, and a JSON Schema defining property names, data types, and required parameters.