Github Link : Smart Inventory Bot
Why I Built the Smart Inventory Bot?
It all started when I got curious about my uncle’s warehouse business.
Walking through the aisles, I noticed the same challenge that plagues so many small-to-mid-sized operations: the data existed, but the insights didn’t.
He had mountains of transaction records—sales, discounts, returns, seasonal demand shifts—but whenever I asked him a simple business question like “What’s the average discount on electronics versus clothing last year?” his answer was always the same:
“I’ll need to check with the accountant.”
That struck me. Why should everyday business owners need a technical degree—or an expensive analyst—just to get insights from their own data?
That was the seed for what became the Smart Inventory Bot.
The Problem I Saw
Databases are great at storing information, but terrible at talking to humans.
On the other hand, humans are great at asking questions, but not everyone speaks SQL.
So, the gap is clear:
Business owners have questions in plain English.
The answers are locked in relational databases.
My goal was to build a bridge.
The Vision
Imagine asking a bot in natural language—
“Show me the average discount by product category for 2023”—
and instantly hearing back:
🗣️ “Electronics: 15%, Clothing: 10%, Home Goods: 5%.”
No code. No dashboards. No “let me get back to you.”
That’s what I wanted to bring to life with Smart Inventory Bot.
Under the Hood
The bot works like a translator between humans and data.
1️⃣ Understanding the Question
At its core is a StateGraph, which decides where each query should go:
SQL path → if the question is data-specific.
LLM path → if the question is more conversational or abstract.
2️⃣ Getting the Answer
Two engines power the response:
SQL Generator: Converts natural language into SQL queries on the fly.
LLM Responder: Handles edge cases, explanations, or questions outside the database.
3️⃣ Resilient by Design
No bot is perfect, but Smart Inventory Bot doesn’t just fail silently.
It has an error-handling path that reroutes failed queries, ensuring the user always gets some response.
What Surprised Me
The first time I asked it,
“What’s the average discount on electronics last year?”
and it not only wrote the SQL, ran it, and gave me the result in plain English…
…I had that spark every engineer knows. The “it actually works” moment.
That’s when I realized this isn’t just a student project. This is a tool small businesses could actually use to make data-driven decisions without hiring a full analytics team.
Why It Matters
Warehouse owners like my uncle shouldn’t need to spend hours poring over spreadsheets.
Data should talk back, in the same language we use every day.
Smart Inventory Bot isn’t perfect yet—it’s a prototype—but it’s a glimpse of how natural language + structured data can empower everyday decision-making.
And that’s why I built it.

