Skip to content

100 Days of AI Day 9: How to create SWOT analysis for your business idea using AI?

About 100 Days of AI:

I am Nataraj, I decided to spend 100 days in starting Jan 1st 2024 to learn about AI. With 100 days of AI is my goal to learn more about AI specifically LLMs and share ideas, experiments, opinions, trends & learnings through my blog posts. You can follow along the journey here.

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.

Unique garlic pizza recipe that wins top awardsHigh staff turnover
Owner trained in Sicily at some of the best pizzeriasFloods in the area damaged the seating areas that are in need of repair
Strong local reputationAbsence of popular calzones from menu
Prime location on university campusNegative reviews from younger demographic for lack of hip ingredients
Untapped catering potentialRising competition from cheaper pizza businesses nearby
Growing local tech startup communityThere’s nearby street construction that will impact foot traffic
Unexplored online presence and order capabilitiesRising cost of cheese
Upcoming annual food fairNo 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 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 Analysis

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 out put:


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 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 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.