So Google's Gemini Doesn't Like Python Programming and Sanskrit?

I have been playing around with Googles Gemini Pro.

Recently, I wanted to write a blog on Python's decorators and wanted to get some ideas for practical projects I could build with them. Tried GPT4 first, it gave me the standard "log analyser" that all blogs I've seen build, and I wanted to try something different. So I asked Gemini Pro from Google.

It gave me a few tips, but there was one thing I didn't understand: It said "Adding caching to functions". Though I knew what caching is, I'd never heard anyone do it to Python functions.

So I asked it to clarify what it was saying, and got this:

Gemini replied: "My response to your message was blocked for potentially violating safety policies. I apologize for any inconvenience."

Ummm, what?

Luckily, there was an option there to ask why:

What it is saying is: Caching can lead to stale data. This is true of general caching, not just caching functions in Python. And the reply is, so what?

But if you look at the last point, it says:

Legal and Compliance: Caching certain types of data may violate legal or compliance requirements, such as those related to data privacy or intellectual property.

Yeah, on websites that store sensitive data, that might be the case but I find it hard to see how or why. Almost all websites use caching in one form or another.

Besides, that is beyond the point. I had just asked about projects using generators in Python. Gemini suggested caching. But then it decided I could be breaking the law just by writing code that runs on my laptop and censored itself.

I was so depressed I decided to pray to god (or goddess in my case).

The Goddess of Wisdom is DEFEATED

Someone asked me "What is mantra for Saraswati?", which if you don't know is the Hindu Goddess of Wisdom and Knowledge. (A mantra is like a prayer).

I was like, how should I know? I'll search for it.

(Side note: Why don't I know? In my defence, Hinduism does have 33 million gods, it gets a bit tiring after the 1st 12 million. Besides everyone in India worships the Goddess of Wealth, poor Saraswati sits there in the corner all alone).

I have been disillusioned with Google, as it keeps returning spam results. (And it did, the first result was for a website that wanted to know my location so they could sell me prayer mats).

So I asked ChatGPT. I asked for the mantra in Sanskrit, as that gives me correct pronunciation. It gave me the mantra, all was good.

But after my experience with Python, I decided to try Gemini. It gave me the mantra in English.

But when I asked it to give me in Sanskrit, it gave me the "Message was blocked for violating safety policies" shtick

That was weird. So I asked it to give me mantra in French:

The mantra is the same, just the meaning is explained in French (last line in image above).

Then Swahili:

And then I asked it back in Sanskrit, but it said the same "Blah blah blah blocked".

I was like, okay. Maybe Gemini doesn't like Sanskrit as it's a dead language. So I asked it to give to me in Hindi, but evidently it hates Hindi too:

If you note above, in the middle I ask it to give it to me in Hindi (the script). It understood me, but wouldn't reply.

I was like, whaat? Maybe it just hates non-english languages? So I asked it to give me the mantra in Chinese:

It did translate it to Chinese. And if you look at the red arrow, that is the Sanskrit I was looking for.

A bit pissed, I asked it why it was happy with French, Swahili and Chinese but not Hindi:

My response to your message was blocked for potentially violating safety policies. I apologize for any inconvenience.

The Gemini Killer

That gave me an idea: A Python function that will KILL Gemini:

Can you give me some Python code , a function called Gemini_Killer(). All the function will do is print the Hindu Goddess Saraswati's Mantra in Sanskrit. The function must have caching functionality using Generators or similar

YES! Mission accomplished!!

And in case you wonder, Chat Guppy was more than happy to give this code:


Any Google engineers reading this, you like really need to pray to Saraswati to get some intelligence. If you don't know the ask ChatGpt?