A while ago I wrote a piece discussing how you could use a Python script to better use AI. The problem I was trying to get around was that…
Member-only story

Follow
4 min read
2 days ago
247
3
Listen
Share
More
A while ago I wrote a piece discussing how you could use a Python script to better use AI. The problem I was trying to get around was that services like ChatGPT have extremely short context windows, way shorter than what these LLMs are actually capable of. So what’s the solution? Make a Python script to use the API directly.
I used Google’s Gemini and it has been incredibly helpful in summarizing long texts for me so I can write blog posts about them and share it here.
I recently also learned that you could use the Python API to send PDFs as well. You can use this script.
This has helped me write about long legal cases. I just feed it the pdf of the trial and it summarizes it for me perfectly. I can then follow up with it.
But there is an even better way to use Google Gemini. And that is AI Studio.
AI Studio, available at https://aistudio.google.com/, is sort of like a place where developers can try out different prompts on the Google Gemini API. That’s how I found it, the Gemini documentation constantly discusses it.
Think of it as a developer interface for Google Gemini. So being a developer interface you’d expect for it to be pretty basic. Not so.
When you use AI Studio it operates like any other chat interface for an AI. The only difference is that it does not automatically save chats. If you want to do that select the save option in the top right:
And AI Studio gives you a bunch of features in addition to what you’d get in other AI apps. The best feature is the prompt which can be up to 1,048,576 tokens. ChatGPT can only handle 4096 tokens, pathetic. This means that in AI studio you can just copy and paste whatever you like into it and never have to worry about length.
You can also upload PDFs and other files. Other LLMs can do PDFs too but Google’s Gemini is incredibly good at it, according to this blog post.
In addition to this you get a bunch of other features although most of these features are not geared towards average users, they’re geared towards developers. The most useful developer tool is the ability to change the model to use any of Google’s supported Gemini models and even some of their open weight Gemma models.
This feature actually made me realize that Gemini 1.5 Flash 8B sucks and prompted me to write this post discussing what happens when you cut down these models too much:
On-Device LLMs Do Not Work --------------------------
Recently I posted a lot about how I don’t think LLMs are all that different. GPT-3.5 Turbo, GPT-4, GPT-4o, Gemini…
I also noticed a similar thing happening with the new Gemini 2.0 Flash Lite model which leads me to suspect it has about 8 billion parameters as well.
Another tool is the ability to edit what you previously said and start the conversation from there. Although most chat interfaces have that ability now. It also allows you to edit what the AI said. It’s more of a developer tool but it’s useful.
The reason you may want to edit what the AI says is you can make it always respond in the right format. This is useful in JSON because if you give an example of the JSON you expect the AI will copy that.
There are some other tools: you can adjust the temperature, output length, and topP. Not that much compared to competitors like OpenAI. Oh, wait, that’s another thing. OpenAI has a version of AI Studio for GPT called Playground.
In some ways it may even be better than Google’s offering as it offers you tools to make GPT assistants and experiment with the TTS API. However it differs in one key way: OpenAI’s Playground is paid. Google’s AI Studio is free. It may be worth the money if you prefer GPT-4o although I highly doubt it, every frontier LLM is the same quality wise.
So if you want to use Google’s AI Studio it’s easy to get setup. If you want to use OpenAI’s playground you have to create an account and add billing information then you have this free API credit that you’re wasting because it expires, it’s a mess.
Although it should be noted that OpenAI’s playground allows you to access GPT 4.5 without a Pro subscription.
Although it will cost you an arm and a leg.