How to use AI (GPT-3) to discover new business opportunities

Jon Khaykin
4 min readJan 16, 2023

--

With everyone talking about ChatGPT, I thought: could I use GPT-3 to come up with opportunities for business ideas?

One way I thought would be interesting to explore is using 1 and 2 star reviews of products on Amazon to find opportunities where businesses are dropping the ball.

I picked something simple: dog treats

Step 1

In order to get reviews for the dog treats, I first need product URLs specifically formatted as a bunch of dictionaries (you’ll see why in step 2). Thankfully, Amazon has a nice url structure with their ASINs (https://amazon.com/dp/<asin>). So on the first page of dog treats, using a bit of javascript in the console, I scraped and created a dictionary of URLs like so:

asinURLs = []

// get all items on the page
asinData = document.querySelectorAll("[data-asin]");

// loop through items
asinData.forEach(function (item, index) {
// grab the asin in the data
asin = item.dataset.asin;

// if asin isn't blank, append to array
if (asin) {
asinURLs.push('{"url": "https://amazon.com/dp/' + asin + '"}');
}
});

asinURLs = [...new Set(asinURLs)];

asinURLs.join(", ")

Step 2

Copy the results from step 1 to clipboard. I use Apify’s Amazon Reviews Scraper (ref link) and, in the JSON editor, paste the URLs like so:

I adjust some of the parameters and click Start. The scraping begins!

Step 3

Once all of the reviews have been scraped, within Apify, I export them to CSV and filter it to only include 1 and 2 star reviews (you can do this in your CSV editor or with some code, whichever you prefer).

# imports
import pandas as pd
import openai
from IPython.display import display, HTML

# read in 1 and 2 star dog treat reviews into dataframe
df = pd.read_csv('amzn_dog_treat_1and2.csv')

Step 4

I pass the reviews to GPT-3 with a specific prompt design. The prompt is meant to take in reviews, a goal that I want to accomplish, and a request I want answered. Here is what that looks like:

# Using the latest and greatest but you can use whichever you'd like
COMPLETIONS_MODEL = "text-davinci-003"

# API Key from OpenAI
openai.api_key = <YOUR API KEY>

# Combine all reviews numbered into a single string to
# make it easy to pass into the prompt
reviews =" ".join([str(idx+1) + ". " + review for idx, review in df['reviewDescription'].items()])

# The code that generates the ideas and returns it
def answer_me(goal, request):
gpt_prompt = """
Reviews:
{}

Goal: {}

Request: Based on the above 1 and 2 star reviews and the goal above, {}
""".format(reviews, goal, request)

response = openai.Completion.create(
prompt=gpt_prompt,
temperature=0.5,
max_tokens=250,
top_p=1,
frequency_penalty=0,
presence_penalty=0,
model=COMPLETIONS_MODEL
)["choices"][0]["text"]

return response

Step 5

Now, for the fun part. I gave it the following:

Goal: Start a new dog treat business on Amazon

Request: Give me 5 things I should focus on in order to get ahead of the current competition

And BOOM 🤯 it actually gave me some good ideas!

1. Ensure high-quality ingredients and avoid artificial additives.

2. Ensure the treats are of an appropriate size and density for the type of dog they are intended for.

3. Provide clear and accurate product descriptions and nutritional information.

4. Ensure the product is packaged correctly and securely to prevent spoilage and contamination.

5. Offer a satisfaction guarantee and/or return policy.

I don’t plan on pursuing the dog treat business but this was a fun exercise and got me thinking about other ways I could use reviews/information to find business opportunities. Some ideas:

  1. Use Yelp or Google places reviews to start a differentiated new local business
  2. Use Capterra or G2 reviews to find new software opportunities
  3. Use this framework to offer a SaaS to other businesses (e.g. monitor your competitors and figure out how to beat them with better features) 🤔

Thanks for reading! If you have any thoughts or ideas on how to make this even better or different ways to apply this framework, I’d love to hear them.

Follow me on Twitter for more stuff like this.

--

--

Jon Khaykin

Founder exploring what's next • Previously built new products at Affirm • Running windowventures.com • UC Berkeley alumnus