DEV Community

Cover image for Bahaana (बहाना): The AI That Predicts Your Excuses
Aniruddh Vijayvargia
Aniruddh Vijayvargia

Posted on

Bahaana (बहाना): The AI That Predicts Your Excuses

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Most of us have a reason for not going outside.

Too hot.

Raining.

Busy.

Bad air.

Too tired.

Bahaana asks a different question: was that actually true for you?

Bahaana reads your own Google Fit step history and combines it with the weather forecast and modelled air quality from those days. It then uses TabPFN v2, an open-weight tabular foundation model, to estimate how likely today is to be an active day.

Then comes the interesting part: Excuse Court.

For each excuse, Bahaana tests two things:

  1. Does the model's prediction change when that excuse is present today?
  2. Does your own history show that you actually became less active under that condition?

Only when the model and your history agree does Bahaana mark an excuse UPHELD. Otherwise it can be OVERRULED or UNCLEAR.

And then it stops talking.

Press I'M GOING and the screen becomes a 30-minute phone-away timer.

Bahaana is for anyone who has ever told themselves:

"I'll go outside later."

Demo

Try Bahaana live

The public demo is precomputed, so it can be explored immediately without waiting for the model server.

You can also bring your own Google Fit Takeout export and run the live prediction pipeline.

Code

GitHub Repository

The repository contains the full prediction pipeline, feature engineering, Excuse Court logic, browser-side Takeout parser, API, tests, backtest results, and deployment configuration.

How I Built It

The core AI is TabPFN v2 by Prior Labs, an open-weight tabular foundation model designed for prediction from structured historical data.

Bahaana is built around it rather than using AI as a decorative layer.

The pipeline is:

Google Fit history → causal features → TabPFN v2 → today's prediction → Excuse Court → phone-away action

A few decisions were important:

  • Today's target is defined from the previous 28 days, so today's activity never leaks into today's prediction.
  • Weather uses the forecast that was available 24 hours before the day being predicted, rather than future observed weather.
  • Air quality uses modelled CAMS PM2.5 from the previous day.
  • Excuse sensitivity is tested on today's feature vector, separately from historical evidence.
  • Historical evidence uses 7-day block bootstrap intervals because neighbouring days are not independent.
  • The browser parses the Google Fit export locally. The raw file and dates/location are not sent to the model server.
  • The deployed frontend runs on Render, while TabPFN inference runs on Modal, because the model's memory requirements exceed Render's free 512 MB instance.

I also included an expanding-window backtest against simpler baselines instead of assuming that the foundation model must win. The results are exposed in the app's Under the hood section.

Why Does Open Innovation Matter?

A closed AI API could have produced a prediction, but that would miss the point of Bahaana.

The most sensitive input here is someone's behavioural history. Using an open-weight model lets me keep the AI pipeline under my control, inspect exactly what is being sent to inference, and run the model independently instead of sending a personal history to a general-purpose closed AI service.

Open tooling also made the architecture possible without a proprietary AI dependency:

TabPFN for prediction, Open-Meteo for weather and air quality, Vite/TypeScript in the browser, FastAPI for the API, and Render + Modal for deployment.

The important part is not just that the model is open.

It is that the openness changes how the product can be designed: the model is replaceable, the inference pipeline is inspectable, and the user's raw activity export does not need to become someone else's AI training input.

Prize Categories

  • Best Use of TabPFN — TabPFN v2 is the core prediction model and powers the personalized active-day prediction and Excuse Court analysis.
  • Best Use of Render — Render hosts Bahaana's public frontend and serves the deployed product experience.

Top comments (0)