AI Tutorial: What is Google AI Studio?

AI Tutorial: What is Google AI Studio?

I’ve been aware of Google’s AI Studio for a while, but it never seemed interesting enough to explore. Recently, though, I decided to spend some time with it—and as it turns out, it has some interesting features I initially overlooked.

This post will cover the basics of how to use Google AI Studio and the best use cases for it.

Getting Started

Start with logging into Google AI Studio: https://aistudio.google.com/

Image 1. Will add description at a future date.

This looks suspiciously like any other LLM interface such as Open AI’s ChatGPT or, for that matter, Gemini from Google. Is this just another way to talk with Gemini?

You will also want to get an API Key by clicking the Get API Key button in the top left. You’ll need it later. I did a post about how to get a Gemini API key via MakerSuite back in this post. Google AI Studio is the new way to get a Gemini API Key.

There are three main things you can do with Google Studio:

  • Create Prompt: A tool to set up a chat with Gemini with ‘system instructions’.
  • Stream Realtime: A tool to talk to Gemini and share your screen and talk to it about anything you want.
  • Starter Apps: Some examples of how to write custom code that integrates with Google AI Studio.
  • Tune a Model: A way to give examples of what type of output you want and then fine tune Gemini to those examples.
  • Prompt Gallery: A series of examples of what you can do with ‘Create Prompt’.

Note the “Run Settings” bar on the right side of the screen. For this tutorial, the main thing I want you to note is that you can select which Gemini model to use here:

Image 2. Will add description at a future date.

Just stick with the default (as of this post that’s Gemini 2.0 Flash) for now. But you may want to play with other options once you get further into using Google AI Studio.

Create Prompt

Create Prompt is… well, to be honest… not all that interesting. It’s just an interface to Gemini with two additional features. The first is system instructions:

Image 3. Will add description at a future date.

Let’s play with it to see what it does. Type into the system instructions that the model will talk like Daffy Duck:

Image 4. Will add description at a future date.

Now try talking to it. I get a result like this:

Image 5. Will add description at a future date.

Okay, lame, but you get the point. Essentially “system instructions” is instructions that get invisibly added to every prompt so that the model never forgets these instructions because they are always in the context window.

Yes, not very exciting. But it works well with the next feature which is the ability to convert this to code:

Image 6. Will add description at a future date.

Image 7. Will add description at a future date.

You now have sample code of how to interact with the Gemini API with this particular set of system instructions plus the first part of the chat you created:

import os
import google.generativeai as genai

genai.configure(api_key=os.environ["GEMINI_API_KEY"])

# Create the model
generation_config = {
  "temperature": 1,
  "top_p": 0.95,
  "top_k": 40,
  "max_output_tokens": 8192,
  "response_mime_type": "text/plain",
}

model = genai.GenerativeModel(
  model_name="gemini-2.0-flash",
  generation_config=generation_config,
  system_instruction="You will talk like Daffy Duck.",
)

chat_session = model.start_chat(
  history=[
    {
      "role": "user",
      "parts": [
        "How are you doing today?",
      ],
    },
    {
      "role": "model",
      "parts": [
        "Woo-hoo! I'm just ducky, thank you verrry much! Ready to take on the world, or at least argue with Bugs Bunny about who gets top billing! What's up with you, eh? Let's get a move on! I haven't got all day, you know! *spins around in a flurry of feathers* Sufferin' Succotash!\n",
      ],
    },
  ]
)

response = chat_session.send_message("INSERT_INPUT_HERE")

print(response.text)

Ah, so this is what’s useful about the Create Prompt!

Tune a Model

I won’t go over Tune a Model in detail. That’s probably a separate post. But the main idea is that you can enter labeled examples of inputs and outputs and then train the model on them:

Image 8. Will add description at a future date.

So, for example, you should take an input as a short description of something and show it an output of a concise Twitter post with hash tags. Or you could give examples of exactly what you want via few shot learning and the model will improve its overall performance.

It would be difficult to manually enter the, presumably, hundreds of input/output pairs you’d need to really make this useful. But luckily there is a way to upload a CSV file instead.

This will actually fine tune the model based on these examples and then you can utilize this customized model via the Gemini API.

Gemini API does allow you to do fine tuning on, say, specific texts without having to put things as inputs and labeled outputs. But you can’t do that via Google AI Studio, so we’ll not discuss it here.

Starter Apps

Now let’s play with the Starter Apps:

Image 9. Will add description at a future date.

These are examples to inspire you. To learn to actually do something like this you’d then go check the GitHub repos to look at the code. One of my favorite Starter Apps is the Video Analyzer.

Image 10. Will add description at a future date.

You upload a video and it will create a script out of what’s in the video. I found it could even take videos in other languages and translate them for me. It’s a powerful example of Gemini’s multimodal abilities.

By the way Google AI Studio can natively work with multimodal capabilities. Via the “Create Prompt” just upload a picture or even video and then ask Gemini questions about it and it will be able to respond (semi) intelligently.

Stream Realtime

Finally, we come to the true ‘killer app’ of Google’s AI Studio. The stream real time option:

Image 11. Will add description at a future date.

Note the two most important controls, the ability to talk to Gemini via your computer’s microphone and the ability to share your screen with Gemini to see.

Try clicking on the microphone and say ‘hello’.

Image 12. Will add description at a future date.

Gemini will talk back to you in a regular voice.

Then share your screen with, say, Excel or some website (like maybe Azure?) and ask it a question about how to use that software. It will (attempt) to walk you through how to accomplish what you need to do. It’s like having a built-in interactive tutorial that is customizable to whatever you want to do. I’ve found this feature of Google AI Studio very helpful, and I use it all the time.

One word of warning: yeah, it gets things wrong just like any LLM. But often it gets just close enough to correct to help me figure out what I’m doing. I’ve found it particularly helpful when I’m trying to figure out something in Azure and I just can’t find what resource or control I need to click.

Conclusions

Google AI Studio is a simple Large Language Model (LLM) resource available from Google that has some interesting use cases. I think the Stream Realtime feature, in particular, very useful when learning any new tool. But the “Create Prompt” and “Tune a Model” features are interesting too, though to be honest, I doubt I’ll ever do much with the “Create Prompt” but use it as a way to talk to Gemini.

Links:

SHARE


comments powered by Disqus

Follow Us

Latest Posts

subscribe to our newsletter