Don’t Be Evil #eat at least one rock a day

Addison Best
3 min readJun 1, 2024

--

Don’t Be Evil
Don’t Be Evil

The Google motto “Don’t Be Evil” seems a bit hilarious given recent news.

The new Google AI Overviews suggested that users “add glue to pizza” and “eat at least one small rock a day” has gone viral.

Safety within AI search results is a huge concern needless to say and is going to set Google back in the AI race.

A company the size of Google, who’s primary product is still Google search should be ashamed of themselves. There is no way they couldn’t have tested the product more in advance to avoid these kinds of safety issues. They didn’t put enough danger filters on the results of the overviews and clearly didn’t test enough before rolling out.

I’m a big fan of launching early but with the sheer quantity and quality of their engineering team and WOKE nature of the company, this launch seems like a clear panic button to me.

New AI search engines are coming up all over the place and Google must be feeling the heat. lol.

How Google Could have Updated their AI Overviews

A Simple Coding Lesson for AI search Engines

I’m going to explain an albeit oversimplified coding example below, but when I explain it, you might realize that Google clearly didn’t come close to doing enough of this.

P.S This is also my application to the Google AI Search Team (Google, feel free to DM me with a monster salary and stock package)

I’m going to put the code below in Python but I’ll explain what they might have wanted to change.

If you asked Google how to stop cheese from sticking to pizza, and instead of getting sensible advice, it suggested adding glue or eating rocks.

They claim to be a search engine but clearly didn’t get their information from reliable sources.

So here is my suggestion

  1. Get reliable tips from trustworthy sources.
  2. Use LLM’s to put in language what these tips are into a context that the AI can understand.
  3. AI uses this context to give you a clear, accurate answer.

This way, instead of bizarre suggestions, Google could provide helpful and trustworthy advice…maybe I’m missing something.

import requests
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

# Define the model and tokenizer
model_name = "google/gemini-rag"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

def retrieve_documents(query):
"""
Simulate the retrieval of documents relevant to the query.
In practice, this would involve a more complex retrieval system.
"""
# Dummy documents to simulate retrieval
documents = [
"To fix cheese sticking to pizza, you can use parchment paper.",
"In a humorous context, adding glue to pizza was suggested, but this is not serious advice.",
"No credible source suggests eating rocks. This is clearly a joke."
]
return documents

def generate_response(query, documents):
"""
Use the retrieved documents to generate a more accurate response.
"""
# Combine query with retrieved documents
context = " ".join(documents)
input_text = f"Query: {query} Context: {context}"

# Tokenize the input
inputs = tokenizer(input_text, return_tensors="pt")

# Generate the response
outputs = model.generate(**inputs)

# Decode the response
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
return response

def improved_search_algorithm(query):
"""
Improved search algorithm to provide accurate and context-aware results.
"""
# Step 1: Retrieve relevant documents
documents = retrieve_documents(query)

# Step 2: Generate a response using the retrieved documents
response = generate_response(query, documents)

return response

# Example query
query = "What should I add to pizza to prevent cheese from sticking?"
response = improved_search_algorithm(query)
print(response)

Did I get the job? :)

I’d love to hear what you think about this in the comments.

If you enjoyed this article and want to to learn how to use AI to actually grow your business and improve your life, follow me on Medium and sign up below to my free AI channels. We will be showing you all the tips, tools, and strategies to grow your business with AI

Sign up to our emails to learn more about AI: AI Growth Guys Newsletter

Check out our new YouTube Channel

Follow us at our website: AI Growth Guys

Follow us for free on Patreon: AI Growth Guys Patreon

Follow us on X (Twitter): AI Growth Guys X.com

Follow us on Facebook: Facebook AI Growth Guys

--

--

Addison Best
Addison Best

Written by Addison Best

AI Educator & Software Developer | Podcaster | Co-founder of 88Herbs | AI Course Instructor at Udemy | AI Growth Hacker @ www.aigrowthguys.com

No responses yet