The Secret to Unlocking Deeper SWOT Analysis with AI (The Code That Started It All — and How I Took It to the Next Level)
I thought I had cracked the code for automated SWOT analysis… until Neuro-symbolic AI revealed an entirely new layer of depth.
I recently published this post on Medium but if you aren’t a paid Medium member you can read it here:

Want to start your own podcast — without the tech headaches?
I run my show on RSS.com, and it’s the easiest way I’ve found to get a podcast live on Spotify, Apple, Amazon, YouTube, iHeartRadio, Deezer, and more — all in one step.
The built-in analytics show me exactly where my listeners are tuning in from — country, device, and platform — so I can grow smarter, not guess.
Start your podcast for free today at RSS.com.
(This is an affiliate link — I may earn a commission if you join, at no extra cost to you.)
You know that feeling when you think you’ve figured something out, only to discover you’ve only scratched the surface? That’s exactly what happened to me with SWOT analysis and AI. Not too long ago, I published a blog post comparing my original GPT-3.5-based SWOT analysis tool with a new, more advanced approach — Neuro-symbolic AI.
How Neurosymbolic AI Transformed My Favorite SWOT Analysis Tool: A Game-Changer for Strategic…
From surface-level summaries to actionable intelligence — discover how this AI upgrade breathed new life into my…pub.towardsai.net
In that post, I dove into how neurosymbolic AI’s blend of neural networks and symbolic reasoning brought a whole new level of insight to SWOT analysis. It wasn’t just faster; it was smarter. It didn’t just spit out lists of strengths and weaknesses; it wove them into a strategic narrative, highlighting connections and implications that GPT-3.5 simply couldn’t reach.
If you are wondering who I am and why I am talking about this, feel free to check out my “About Me” Blog below:
https://medium.com/about-me-stories/about-me-mukundan-sankar-2c66b289bfcc
That comparison post was well-received, but something didn’t sit right. I kept thinking: What if I shared the whole journey? The story of how I discovered neurosymbolic AI, why I upgraded my code and the deeper insights I uncovered along the way. After all, the code that got me here is close to my heart — it’s where this whole journey started.
So here I am, pulling back the curtain and sharing the mystery behind the code. Join me as I reveal the evolution of my SWOT analysis tool and why neurosymbolic AI was the missing piece I didn’t know I needed.
The Code That Started It All
Let’s rewind to where it all began. Here’s the original code I wrote to generate SWOT analyses using GPT-3.5. It was simple, effective, and served its purpose. Here’s how it looked:
import openai
openai.api_key = "your-api-key"
def generate_swot_gpt(company_name):
prompt = f"Provide a SWOT analysis for {company_name}."
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a business analyst."},
{"role": "user", "content": prompt}
],
max_tokens=500
)
return response['choices'][0]['message']['content'].strip()
# Example
company_name = "Meta Platforms"
swot_analysis = generate_swot_gpt(company_name)
print(swot_analysis)
With a couple of lines and a quick API call, GPT-3.5 would generate a SWOT analysis on demand. No more digging through financial reports or assembling data — it was all right there. And for a while, I thought that was it. I even wrote a blog post about it, celebrating the efficiency and convenience of automating SWOT analysis. Check out that blog here:
How I Used AI to Analyze Any Public Company Instantly!
Discover how I leveraged AI to automate SWOT analysis and explored key insights without lifting a finger.pub.towardsai.net
But the more I looked at the results, the more I felt something was missing. The insights were useful but often felt… generic. The strengths, weaknesses, opportunities, and threats were all there, but they didn’t tell me why they mattered or how they connected. That’s when the real mystery began.
The Discovery of Neurosymbolic AI
Fast forward a bit, and I found myself deep in a rabbit hole of AI research, scrolling through article after article late at night. That’s when I stumbled upon neurosymbolic AI. At first, it sounded like something out of a sci-fi novel — an AI that combined the pattern recognition of neural networks with the structured reasoning of symbolic AI.
Curiosity got the best of me. Could this new approach be the key to unlocking the depth I felt was missing? Neurosymbolic AI didn’t just find patterns; it could interpret and categorize those patterns, providing reasoning and context. Instead of a list of strengths and weaknesses, it promised a strategic map.
I had to find out what it could do. And that meant writing a new piece of code, one that would push beyond the limitations of GPT-3.5.
Writing the New Code (And Hoping for the Best)
This wasn’t just an upgrade; it was a transformation. I wanted neurosymbolic AI to go beyond identifying strengths, weaknesses, opportunities, and threats. I wanted it to explain why each factor was significant, to weave a story from the data. This was no small task, and I wasn’t sure what to expect.
Here’s the code I ended up with:
def generate_swot_neurosymbolic(company_name):
prompt = (
f"Using neurosymbolic AI principles, provide a detailed SWOT analysis for {company_name}. "
"Include structured reasoning and connect each strength, weakness, opportunity, and threat "
"to broader strategic implications. Highlight why each factor is significant."
)
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are an expert business analyst using neurosymbolic AI principles."},
{"role": "user", "content": prompt}
],
max_tokens=700
)
return response['choices'][0]['message']['content'].strip()
# Example
company_name = "Meta Platforms"
swot_analysis = generate_swot_neurosymbolic(company_name)
print(swot_analysis)
This time, I wasn’t just asking for a SWOT analysis. I was asking for depth, for context, for connections. I wanted the AI to act like a strategist, not just a list-maker.
When I hit “Run,” I had no idea what would come out.
The Revelation — Deeper Insights I Didn’t Expect
The output was nothing like the standard SWOT analysis. Neurosymbolic AI wasn’t just listing strengths and weaknesses — it was building a narrative. Each factor was explained with reasoning, and the connections between them were undeniable.
For instance, instead of just saying “privacy concerns” was a weakness, neurosymbolic AI framed it as a reputational risk that could erode user trust, ultimately affecting long-term stability. The dependency on advertising revenue wasn’t just a flaw; it was a structural vulnerability that could make the company more susceptible to economic shifts.
It was as if neurosymbolic AI had lifted a curtain, revealing hidden layers that GPT-3.5 had glossed over. This was no ordinary SWOT analysis; it was a strategic roadmap.
The Depth of Opportunities and Threats
What really blew me away was how neurosymbolic AI handled opportunities and threats.
In my original GPT-3.5-based analysis, I’d see generic opportunities like “cloud computing growth” or “expansion into e-commerce.” Useful? Sure. But neurosymbolic AI didn’t stop there. It identified specific market trends and explained why these opportunities were particularly relevant given the company’s unique strengths.
Threats weren’t just broad risks like “competition” or “regulation.” Neurosymbolic AI dove into how data privacy laws could impact revenue streams or how the shift toward decentralized tech could disrupt the company’s core business model. Each insight had context, and each threat felt like a puzzle piece that fit perfectly into the larger picture.
The Final Verdict — The Missing Piece All Along
After I published my comparison post, I realized that this wasn’t just a minor improvement. Neurosymbolic AI fundamentally transformed my approach to SWOT analysis. The original GPT-3.5-based code, as much as I loved it, now felt like only half the story. I’d started with a tool that listed factors, but now I had a strategic engine that could anticipate, prioritize, and explain.
For those of you who want to try it, here’s the final code that brought everything together. Run it, and you’ll see what I mean — there’s something thrilling about watching neurosymbolic AI reveal the hidden layers within a company’s strategy.
Final Neuro-symbolic AI-based SWOT code
def generate_swot_neurosymbolic(company_name):
prompt = (
f"Using neurosymbolic AI principles, provide a detailed SWOT analysis for {company_name}. "
"Include structured reasoning and connect each strength, weakness, opportunity, and threat "
"to broader strategic implications. Highlight why each factor is significant."
)
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are an expert business analyst using neurosymbolic AI principles."},
{"role": "user", "content": prompt}
],
max_tokens=700
)
return response['choices'][0]['message']['content'].strip()
# Example usage
company_name = "Alphabet Inc."
swot_analysis = generate_swot_neurosymbolic(company_name)
print(swot_analysis)
This is more than just code. It’s a tool for anyone who’s tired of surface-level analysis and ready to dig into the real story behind the data. For me, it was a journey from curiosity to discovery, and neurosymbolic AI was the missing piece I didn’t know I was looking for.
So if you’re ready to explore the depths, give it a try. Who knows? You might just uncover something unexpected.