How to Test System Instructions and Temperature in Google AI Studio

Kuldeep Rathee

Last Checked: September 2026 | Read Time: 6 Min Read

Most people type a one-line prompt into an AI chatbot and accept whatever comes back. That works for casual questions, but if you use AI for content drafts, product descriptions, or automated workflows, you need output that is consistent and predictable. Google AI Studio is a browser-based playground where you can test prompts, set system instructions, and adjust generation settings before writing any code.


Google AI Studio prompt engineering workspace and playground setup on a laptop screen


This guide walks through the Playground as I set it up: the model list, system instructions, temperature, thinking level, grounding, and the Get code export. It also gives you a simple, fair test you can run yourself to see what each setting changes.

My setup: gemini-pro-latest, Temperature 1, Thinking level High, Grounding with Google Search on. Structured outputs, code execution, and function calling were off.

Step 1: The Playground

Go to aistudio.google.com and sign in with your Google account. The Playground has a sidebar on the left (Playground, History, Build, and Manage sections), a prompt box at the bottom, and the Run settings panel on the right. Everything you need for testing is on this one screen.


Google AI Studio dashboard workspace showing playground sidebar, prompt box, and run settings panel

Choosing a Model

The model list includes Gemini Pro Latest (gemini-pro-latest) and Gemini 3 Flash Preview. When I selected Gemini 3 Flash Preview, AI Studio showed an "Upgrade to unlock" screen saying that model needs a Google AI Plan or an API key. So not every model is available on every account, and your screen may differ from mine.

One detail matters for real projects: gemini-pro-latest is an alias. It points to Google's newest Pro model and changes over time. That is fine for experiments, but if your website or app depends on consistent output, a silent model change can alter your results. For production code, pin a specific model ID instead of an alias.

Step 2: System Instructions

A system instruction is a set of standing rules the model follows for the whole conversation. Instead of repeating "write in a professional tone, for beginners, in under 150 words" in every prompt, you write it once and it applies everywhere. Good system instructions usually cover four things: the role (who the model is), the audience, the tone, and hard limits such as length, format, or topics to avoid.

To set one up, open the System instructions box in the right panel. I saved this one under the title AI Studio Prompt Engineering Guide - Tyechylouvre:

Active System Instruction Example:

You are an expert AI content writer for tyechylouvre.com. Write clear, engaging, and professional responses.


Note: Instructions are saved in local storage inside your browser. If you clear browser data or switch devices, you may need to re-enter them.

A Fair Test You Can Run

To see what a system instruction really does, change only one thing at a time:

Testing Steps:

  • Clear the system instruction box and run the prompt "Write about AI content creation." Save the output.
  • Add the instruction above, keep the prompt exactly the same, and run it again.
  • Compare the two outputs for tone, length, structure, and whether the brand or role shows up.

If you change the prompt and the instruction together, you cannot tell which one caused the difference. Also note that this prompt is very vague. A system instruction helps, but it does not replace a good prompt. Compare it with a specific one: "Write a 150-word introduction to AI content creation for beginners, in a friendly tone." The more you specify audience, length, and format, the less the model has to guess.

Step 3: Temperature

Temperature controls how predictable the model's word choices are. At low values, the model picks the most likely next word almost every time, so answers are focused and repeatable. At higher values, it is more willing to pick less likely words, which gives more variety but also a higher risk of odd phrasing. Google's documentation gives the range as 0 to 2, and my slider was set to 1 by default.


To test it, run the same prompt at temperature 0, 1, and 2, and run each one two or three times. Ask yourself:

  • Do repeated runs at 0 look almost the same?
  • Does the wording get more varied at 1?
  • At 2, does the text stay readable, or does the phrasing get strange?

As a general rule, use low temperature for factual or repeatable tasks such as summaries, data extraction, and code, and higher values for brainstorming, headlines, and creative writing.

Step 4: Thinking Level and Grounding

Two other settings sit in the same panel. Thinking level (High in my setup) controls how much reasoning effort the model spends before answering. Higher levels are meant for harder problems and can make responses take longer. For a simple writing prompt you may not notice a big difference, so try a more complex task as well and compare the response time.

Grounding with Google Search lets the model use Google Search results when answering, which helps with questions about recent events. It was switched on in my setup, so for topics where search results are relevant it can influence the output. If you want a clean comparison of system instructions or temperature alone, turn it off first.

Step 5: Get Code

Once you are happy with the results, click <> Get code at the top right of the Run settings panel. Pick a language, and AI Studio generates code from your current setup. The start of the Python version looked like this:


Google AI Studio Get Code export window showing Python SDK client configuration snippet

import os
from google import genai

client = genai.Client(
    api_key=os.environ.get("GEMINI_API_KEY"),
)

tools = [
    {
        'type': 'google_search',
    },
]

generation_config = {
    'temperature': 1,
}

This is only the beginning of the generated code; scroll down in the window to see the rest. The code reads your API key from an environment variable called GEMINI_API_KEY, so you need to create a key and set that variable before running it. Never paste your API key directly into code you publish.

Key Takeaways

  • Test one change at a time: Same prompt, one setting changed.
  • System instructions are best for role, tone, and rules that should apply every time.
  • Specific prompts beat vague ones, with or without a system instruction.
  • Use low temperature for accuracy and higher temperature for creativity.
  • Pin a fixed model ID in production instead of a -latest alias.

Conclusion

Google AI Studio lets you check how a prompt behaves before you build anything around it. Start with a system instruction, change one setting at a time, and only export code once the output is consistent.

Categories: ai-tools, prompt-engineering, google-ai-studio