paint-brush
100 Days of AI, Day 9: Can AI Generate a SWOT Analysis for Your Business Idea?by@sindamnataraj
574 reads
574 reads

100 Days of AI, Day 9: Can AI Generate a SWOT Analysis for Your Business Idea?

by NatarajFebruary 3rd, 2024
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Let's use Open AI & Semantic Kernel to generate a SWOT analysis for any given business. Why use Semantic Kernel? Part of the goal of this post is also to explore more functionality of Semantic Kernel. We could also achieve the same end goal using Langchain. If you like Langchain over Semantic Kernel feel free to use that.
featured image - 100 Days of AI, Day 9: Can AI Generate a SWOT Analysis for Your Business Idea?
Nataraj HackerNoon profile picture


Hey everyone! I’m Nataraj, and just like you, I’ve been fascinated with the recent progress of artificial intelligence. Realizing that I needed to stay abreast with all the developments happening, I decided to embark on a personal journey of learning, thus 100 days of AI was born! With this series, I will be learning about LLMs and share ideas, experiments, opinions, trends & learnings through my blog posts. You can follow along the journey on HackerNoon here or my personal website here. In today’s article, we’ll be looking to build a Semantic Kernel with the help of GPT-4.


In this post we will look at how to create a swot analysis for any business. If you are not familiar with SWOT analysis here is a quick intro.

Introduction to SWOT:

SWOT stands for Strengths, Weaknesses, Opportunities & Threats. Its a simple way of evaluating any business and get ideas about how to improve it. Once you have done a SWOT analysis of a business, you can choose to compound on the strengths and create more differentiation from your competitor. You can find the weaknesses and create an action plan to fix them. You can find new areas to expand into using the opportunities as a starting point. It is essentially one of the many mental models used by business owners.


Here is an example of SWOT analysis for a pizza business.

Strengths

Weaknesses

Unique garlic pizza recipe that wins top awards

High staff turnover

Owner trained in Sicily at some of the best pizzerias

Floods in the area damaged the seating areas that are in need of repair

Strong local reputation

Absence of popular calzones from menu

Prime location on university campus

Negative reviews from younger demographic for lack of hip ingredients

Opportunities

Threats

Untapped catering potential

Rising competition from cheaper pizza businesses nearby

Growing local tech startup community

There’s nearby street construction that will impact foot traffic

Unexplored online presence and order capabilities

Rising cost of cheese

Upcoming annual food fair

No immediate local regulatory changes but it’s election season

How to Generate a SWOT?

To generate above SWOT, we are essentially answering questions in the following template.

  1. Strengths
    • What unique recipes or ingredients does the pizza shop use?
    • What are the skills and experience of the staff?
    • Does the pizza shop have a strong reputation in the local area?
    • Are there any unique features of the shop or its location that attract customers?
  2. Weaknesses
    • What are the operational challenges of the pizza shop? (e.g., slow service, high staff turnover)
    • Are there financial constraints that limit growth or improvements?
    • Are there any gaps in the product offering?
    • Are there customer complaints or negative reviews that need to be addressed?
  3. Opportunities
    • Is there potential for new products or services (e.g., catering, delivery)?
    • Are there under-served customer segments or market areas?
    • Can new technologies or systems enhance the business operations?
    • Are there partnerships or local events that can be leveraged for marketing?
  4. Threats
    • Who are the major competitors and what are they offering?
    • Are there potential negative impacts due to changes in the local area (e.g., construction, closure of nearby businesses)?
    • Are there economic or industry trends that could impact the business negatively (e.g., increased ingredient costs)?
    • Is there any risk due to changes in regulations or legislation (e.g., health and safety, employment)?


Our goal is to use Open AI & Semantic Kernel and be able to generate SWOT analysis for any given business. Why use Semantic Kernel? Part of the goal of this post is also to explore more functionality of Semantic Kernel. We could also achieve the same end goal using Langchain. If you like Langchain over Semantic Kernel feel free to use that.

Step 1 – Initialize Semantic Kernel With Open AI Chat Completion:

For this step you will need Open AI secret key. Note that Semantic Kernel can work with other LLMs and their corresponding chat completion APIs. See the documentation to find out what they support.

Get ready the Semantic Kernel


Step 2 – Create a Semantic Function that does SWOT analysis

Semantic functions are a way to leverage custom prompts in the Kernel world. More about it here. We will create a semantic function that takes a custom prompt for SWOT analysis of a Pizza business, give an instruction in the prompt to convert the analysis to the a given domain that is given as an input to the prompt. Here’s how it looks.

Semantic Function for SWOT

Step 3 – Call the Semantic Function to Generate a SWOT analysis:

To call the semantic function that is registered with the Kernel, we need to create a context and pass it. The context also includes the new domain we want the SWOT analysis to be applied to, in this case I am using Newsletter. Since every one is starting a newsletter lets try to get a SWOT analysis template for starting a newsletter. Here’s the code for step 3.

Calling the semantic function

Here’s the output:

Output

Not bad, the out put generated gives a great SWOT template for whether or not you should start a newsletter.


You can expand this experiment further and generate a 2*2 matrix like the pizza example I shared above as well.


AI PRODUCT IDEA ALERT: A website where a user can enter their idea and get an output for all the business mental models that exist including SWOT.


That’s it for Day 9 of 100 Days of AI.


I write a newsletter called Above Average where I talk about the second order insights behind everything that is happening in big tech. If you are in tech and don’t want to be average, subscribe to it.


Follow me on TwitterLinkedIn or **HackerNoon **for latest updates on 100 days of AI. If you are in tech you might be interested in joining my community of tech professionals here.


Previous Day 8: Experimenting With Microsoft's Semantic Kernel Using GPT-4