Inspiration
For a beverage marketing company, losing a commercial customer isn't just losing a sale, it's losing recurring revenue and the equipment (coolers, display units) already installed at that point of sale. The challenge gave us a dataset of transactions, customers, and equipment with the task of predicting churn, we wanted to go a step further: turn that prediction into something a commercial team could open every morning, understand in seconds, and use to decide who to call first.
What it does
Queenbit: Nexos is a complete pipeline that goes from raw data to a daily-use tool: A churn prediction model (LightGBM) that calculates, per customer, their probability of churning and classifies them into a risk level (Low / Medium / High). An interactive commercial dashboard that translates those results into executive KPIs (how many customers are at risk, how much money they represent), charts that explain what drives churn (equipment usage and reduction, transactional behavior, segments), an actionable list of at-risk customers with a direct contact button, and a "what-if" simulator to explore scenarios. A retention agent: a Gemini-powered chatbot, trained exclusively to interpret the dashboard's KPIs and suggest retention strategies, designed so anyone on the commercial team can "ask the data" questions in natural language.
How we built it
Exploration (EDA.ipynb): we joined the sales, customer, and equipment datasets and explored, with pandas/seaborn/matplotlib, the distribution of churn, sales volume, and cooler usage patterns. Modeling (QueenBits.ipynb): we engineered the features, trained an LGBMClassifier, interpreted its decisions with SHAP, and generated the churn probability and risk level for the test set, exporting submission_QueenBits.csv (the deliverable) and testing_completo_con_predicciones.csv (the enriched dataset for analysis). Dashboard: we built a React + Vite app, with Recharts for the charts, motion for animations, organized into sections that tell a story: from the big picture down to the individual customer. AI assistant: we stood up an Express 5 backend (server.ts, run with tsx) that intercepts calls to the Gemini API (@google/genai), and built the chat interface with lucide-react and motion/react.
Challenges we ran into
Designing a backend that serves both the frontend and the AI endpoint without the Gemini key being exposed, and getting Express 5, Vite (in middleware mode), and tsx to coexist in both development and production. Keeping the assistant focused and reliable, we tuned the system prompt several times so the chatbot would stay strictly on the topic of churn, respond with the authority of a consultant, and reason from the portfolio's real patterns even when it didn't have a specific customer's exact record.
Accomplishments that we're proud of
We built the full flow: data, model, predictions, dashboard, AI assistant, and it all runs as a single application. We got the AI assistant to feel like a trustworthy consultant, that is able to read our website and answer questions for further analysis.
What we learned
How to combine a Python data-science stack (pandas, LightGBM, SHAP) with a modern web stack (React, Express) and a production LLM API, while keeping credential security a priority from the design stage. To translate data into business decisions.
What's next for Queenbit: Nexos
Connect the dashboard to live data, so risk levels update automatically as new transactions come in. Track the retention actions taken (calls, promotions) to measure, with data, which strategies actually reduce churn over time. Enrich the model with more behavioral and seasonal signals, and bring explainability (SHAP) directly into the dashboard so anyone can see, customer by customer, what's weighing most heavily on their risk.
Built With
- javascript
- jsx
- pandas
- python
- react
- scikit-learn
- shap
- vite
Log in or sign up for Devpost to join the conversation.