Swym Hacks '25 - AI, Caramba!
Reader Advisory
This blog comes to you from the perspective of someone who still Googles “what even is a MCP.”
I was on the team. I witnessed the chaos. I ate the snacks. And I’m here to tell the tale—with extra flavor and maybe a little less technical correctness.
Dear future hackers,
This isn’t just a blog. It’s a battle log. A how-it-started-vs-how-it-crashed-and-rebooted. A behind-the-scenes tale of what happens when you throw AI, natural language queries, tables, and a team named AI, Caramba! into a 48-hour code arena with snacks, bugs, and dreams.
You’re probably here to learn something. Or procrastinate on your hackathon prep. Either way, we respect it. Let us take you on a journey!
So, what exactly do you think is a hackathon?
Our beloved Gemini says, “A hackathon is a collaborative event where people work together to solve a problem or create a new product within a short time frame.”
anonymous202030 from Reddit says, “Hackathon is an event where different teams solves problems and gives practical solutions either by developing software or hardware over a time period.”
That’s the old school way of defining a hackathon, but what if the current me asked the same question to the future me:
“A hackathon is about a bunch of people, cluelessly chatting (aka brainstorming) about what to do in the next 48 hours, sipping a cup of coffee every 2 hours to stay sane, finding the best playlist (and your teammates in the same building) to get into the zone but figuring it out all at the end of 48 hours.”
Sounds chaotic, doesn’t it? Well, why do you think what made us name our team “AI, Caramba! ”?
We’re writing to you from the post-hackathon haze—eyes glazed, keyboards worn down, and caffeine still coursing through our veins. We are AI, Caramba!, a group of slightly overconfident, sleep-deprived people who dared to ask:
“What if Metabase reports could understand plain English?”
(Spoiler: they still don’t. But we got pretty darn close.)
Let us tell you a tale.
But before that, what if this story has a movie touch? It would be fun, right? How about a Marvel sequence? (Someone from our team is already not liking that idea)
Just like in the Marvel Cinematic Universe, there are individual character build-ups, but at the end, they fight one common challenge; our team was no less than that! Ask me how?
Let me introduce y’all to our team!
Avenger 1: Supritha
(The Nick Fury of the team, guiding the team and helping us be in line! )
Avenger 2: Anu Krithika
(Black Widow energy, always ready to kick some a** with some cool designs)
Avenger 3: Ashutosh Singh
(Can do backend all day, our own Captain America!)
Avenger 4: Srihari
(The newest member, just as energetic as Spider-Man)
Avenger 5: Subham
(As much as I’d love to call myself Iron Man, but definitely Loki - silently mischievous)
Now let’s talk business!
What was the challenge we were after?
Hackathon Theme:
“Build AI Agents to Improve Swym Operations.”
And as the First Law of every engineer, we didn’t know what we were going to build until the very end! And as per the Second Law, we know we will figure it out. We had 3 Ideas. 2 Days. 1 Goal!
Day 1 “where it all begins”: Hope, Hype, and Half-Baked Ideas
Laptops charged, suitcases packed, the team arrives in full energy to hack, collaborate, play, chill, and build something meaningful (product and relationships, both!)
And so we did what every great hero team does in Act I:
We sat down and spiraled.
💬 “Should we build a chatbot that schedules meetings?”
💬 “Too boring.”
💬 “What about a Slack bot that judges your SQL?”
💬 “Too real.”
💬 “Wait… what if folks could just ask for Metabase reports?”
💬 “...Caramba.”
Thus, AI, Caramba! was born. A team name. A battle cry. A lifestyle.
What next? Focus on getting a space and start the execution!
And we were successful!
Day 2: Just Vibes and Console Logs
The day when we all got into the “Avengers: Assemble” Mode! Ofcourse, we were not alone in this battle - we collaborated, united, and learnt a lot more than we could ever think of.
Upside down? Nah, that’s just a new perspective to solve problems!
💡 The Big Idea:
Context-Aware NLQ-to-Report Automation
(We know. It sounds like a rejected Marvel origin story.)
In plain English:
We built an AI agent that turns a natural language question into a secure, accurate Metabase report—without the need for anyone to write SQL or summon a data analyst via Slack incantation.
But here's the twist—it doesn't just convert text to SQL. It knows the context of Swym’s data, respects table-level security, and doesn’t accidentally nuke the production DB. (Mostly.)
🧠 Flow of the Context-Aware NLQ-to-Report System
1. Admin Embed Starts the Flow
The process begins when an admin embed triggers the backend to handle a user's natural language query (NLQ).
2. Backend Receives the NLQ
The backend passes the query to the NLQ module, which is responsible for interpreting the user's natural language input.
3. Table Context is Injected
To accurately understand and process the NLQ, a context for tables (i.e., metadata or schema-related information) is provided to the NLQ engine.
4. Filtering for Whitelisted Tables
The NLQ engine, with context in place, identifies suitable (whitelisted) tables that are safe and relevant for the query.
5. Second Pass of NLQ (Now With Tables)
With the list of suitable tables, the system runs a second NLQ pass—this time to interpret the query more precisely within the available context.
💡 Parallel input: the list of required tables needed to create this context is fed into this step.
6. SQL Query Generation
The NLQ engine then generates a SQL query, carefully crafted to:
Use only indexed fields (for performance),
Avoid any unauthorized access.
7. Data is Fetched
The system uses Postgres to execute the SQL and fetch the relevant data.
8. Data is Sent to Google Sheets
Fetched data is passed through the Google Sheets/Drive API to generate a shareable sheet.
9. Sheet + Data = Link
The API returns a link to the data sheet containing the query results.
10. Admin Embed Gets Final Output
The generated data sheet link is finally returned to the admin embed, completing the flow.
⚙️ How We Did It (also read as “How We Didn’t Burn the Place Down”)
Picture this:
Gemini Pro APIs (because that’s what we’re allowed to use)
An NLQ interpreter we trained like a golden retriever—rewarded for good SQL, gently corrected when it tried weird joins.
A whitelist system to make sure we don’t accidentally query things that get us a visit from Legal.
A context layer - the brain of the tool - is created with all the table schemas, tokens, and column details.
🚨 Mistakes Made
Let’s get this out of the way: you will fail. Repeatedly. Here are some of our finest flops :
Gemini once tried to generate a query that included six different LEFT OUTER JOINS for a simple “daily wishlist count.”
Prompting it to “do what feels natural.” It generated a haiku. Not kidding.
Giving it access to all tables. We now knew what data chaos looked like. Never again.
Day 3: The Final Battle: Demo Day
After lots of duct-taped logic and weird late-night hacks, we finally had it: A working prototype - an agent that understood the natural language, a system that respected security rules, and a demo that (barely) survived the final boss: the live presentation.
No SQL. No Slack-pinging our beloved Nishaanth. No “uhhh what’s the name of that table again?”
It just works.*
*ish.
🌟 Meanwhile, Elsewhere in the Multiverse...
Now look—we weren’t the only heroes in this saga. There were insanely cool projects all around us. From AI sidekicks to ops automation, to tools that made us go:
“Wait… can we hire that?”
We saw. We learned. We lost (RIP to our chances at world domination).
But. Our demo? Got the maximum laughs.
Live chuckles. Claps! Someone may have snorted. So yeah, we didn’t take home the top prize, but we walked out with high fives, good vibes, and the proud knowledge that we made tech funny again.
And that? That’s a W in our books.
🧃 Post-Credit Scenes:
Sure, we built some serious tech. But this wasn’t just a code-fest. Somewhere between fine-tuning prompts and fighting rogue SQL joins, we:
🎤 Broke into spontaneous singing
🏏 Played intense rounds of laptop cricket (patent pending)
🍽️ Devoured legendary snacks, amazing meals, and debated passionately about which cookie qualifies as S-tier
😂 Laughed. A lot. Like, “we might be delirious” levels of laughter
Because at the end of the day, a hackathon isn’t just about building AI—it’s about creating stories, moments, and memes we’ll be quoting in Slack for months.
So here’s to the late nights, the buggy breakthroughs, and the pure joy of making stuff with awesome humans.
Roll credits.
❤️ Final Thoughts
If you’re reading this as a future Swym hacker:
Go build something wild. Be ambitious. Be chaotic. Argue over data types. Eat snacks. Laugh when your demo breaks 2 minutes before the deadline. And don’t forget to name your team something that would make your product manager question your life choices.
With love, weird SQL dreams, and infinite SELECT statements,
Team AI, Caramba!
(Yes, we’re still proud of the name.)