-
-
A deterministic what-if scenario comparing the baseline forecast with an 8% operating-expense reduction.
-
A transparent three-month forecast built from separately modeled revenue, COGS, and operating expenses.
-
An evidence-grounded AI Decision Brief that cites verified financial evidence instead of calculating business metrics itself.
-
DecisionLens separates business signals from statistical anomalies to highlight meaningful financial changes.
Inspiration
Small businesses often already have financial data, but having numbers is not the same as knowing what deserves attention.
A spreadsheet can show revenue, costs, and profit, but it does not automatically explain why profitability changed, whether a movement is unusual, what may happen next, or how a potential decision changes the projected outcome.
I built DecisionLens AI to bridge that gap: turn monthly financial data into a focused, evidence-backed decision view.
The Problem
Many business analytics tools either stop at dashboards or add a chatbot on top of raw data.
That creates two problems:
- dashboards can show what happened without helping prioritize what matters;
- letting an LLM freely reason over financial data can create unsupported numbers or recommendations.
DecisionLens takes a different approach: financial facts are calculated deterministically first, and AI interprets only verified evidence afterward.
What DecisionLens AI Does
A user uploads a monthly CSV containing:
daterevenuecogsoperating_expenses
DecisionLens then:
- validates the dataset and monthly continuity;
- calculates business-health KPIs;
- decomposes the change in operating profit into measured arithmetic contributions;
- detects deterministic business signals;
- flags statistically unusual movements;
- forecasts the next three months;
- produces an evidence-grounded Decision Brief;
- lets the user test explicit what-if scenarios against the baseline forecast.
The result is a workflow that answers:
What changed? → Why does it matter? → What looks unusual? → What may happen next? → What if I change an assumption?
How It Works
The core pipeline is:
CSV → validation → deterministic analytics → profit decomposition → signals and anomalies → forecasting → structured evidence → AI Decision Brief → what-if simulation
The important design principle is that the LLM is not responsible for calculating the financial numbers.
Metrics, changes, forecasts, anomaly scores, and scenario results are produced by application logic first.
The AI receives only a constrained structured evidence context and is asked to prioritize and qualitatively interpret that evidence.
AI / ML Approach
DecisionLens separates deterministic computation from language-model reasoning.
Deterministic layer
The backend calculates:
- revenue and cost movements;
- gross and operating profit;
- margins;
- month-over-month changes;
- arithmetic profit-change decomposition;
- business signals;
- anomaly detection;
- forecasts;
- scenario outcomes.
For anomaly detection, DecisionLens compares the latest movement with the business's own historical behavior using a robust median/MAD-based method.
For forecasting, revenue, COGS, and operating expenses are forecast separately using transparent candidate models:
- naive last value;
- linear trend;
- seasonal naive when enough history is available.
The application evaluates candidate models using time-ordered historical backtesting and selects the lowest-MAE eligible model for each financial driver.
Operating profit and margins are then derived from the component forecasts.
Evidence-grounded AI layer
The production Decision Brief uses Groq-hosted openai/gpt-oss-120b.
The model:
- does not receive raw CSV rows;
- does not calculate the financial metrics;
- can cite only evidence IDs that actually exist;
- can select only application-controlled next-step categories;
- is not allowed to introduce unsupported numeric claims.
Structured output and application-level validation are both used.
If the provider is unavailable or its output fails validation, DecisionLens returns a useful deterministic fallback instead of breaking the rest of the product.
What-if Decision Simulator
The simulator lets the user adjust assumptions for:
- revenue;
- COGS;
- operating expenses.
It compares the resulting scenario with the verified baseline forecast and shows effects on projected profit, margin, and cumulative three-month operating profit.
This is intentionally presented as scenario analysis, not causal inference or a guarantee that a real-world decision will produce the same outcome.
Challenges I Ran Into
One of the hardest parts was deciding where AI should and should not be used.
It would have been much easier to send the uploaded spreadsheet directly to an LLM and ask it for recommendations, but that would make the numerical reasoning harder to trust.
Instead, I built a structured evidence layer and validation pipeline so the LLM can interpret verified facts without becoming the source of those facts.
Another challenge was keeping forecasting explainable with relatively small monthly datasets. Rather than using a complex model purely for technical novelty, I used transparent candidate models and historical backtesting so the selected forecast method can be explained.
I also had to handle edge cases such as zero revenue, negative derived profit, missing months, duplicate months, malformed CSV files, invalid AI responses, provider failures, and production CORS/deployment behavior.
Accomplishments
I am especially proud that DecisionLens works as an end-to-end production system rather than only as a prototype screen.
The deployed version includes:
- real CSV validation and analysis;
- deterministic financial calculations;
- explainable profit decomposition;
- business signals and robust anomaly detection;
- transparent forecasting with historical backtesting;
- a live evidence-grounded LLM Decision Brief;
- safe deterministic AI fallback;
- an interactive What-if Decision Simulator;
- production deployment across Vercel and Render.
The backend currently passes 117 automated tests, and the frontend passes linting and production build checks.
What I Learned
This project reinforced that adding AI is not automatically the same as making a system more intelligent.
For business decision support, the strongest design was to make deterministic analytics responsible for facts and use the language model only where qualitative interpretation adds value.
I also learned how important uncertainty, assumptions, and limitations are when presenting forecasts and scenarios. A useful decision tool should explain what it knows without pretending to know more than the data supports.
What Works
The production deployment currently supports:
- monthly CSV upload and validation;
- business-health analysis;
- operating-profit change decomposition;
- business signals;
- statistical anomalies;
- three-month forecasts;
- evidence-grounded live AI Decision Briefs;
- deterministic fallback when AI is unavailable or invalid;
- interactive what-if scenario analysis.
Current Limitations
DecisionLens currently focuses on monthly financial data and uses only:
- date;
- revenue;
- COGS;
- operating expenses.
Forecasts extrapolate historical patterns and may not capture structural or external business changes.
The What-if Simulator changes forecast assumptions deterministically; it does not model causal relationships.
DecisionLens also does not currently include bank integrations, accounting-platform integrations, authentication, persistent user accounts, or stored user datasets.
The live backend uses Render's free service, so the first request after inactivity may experience a cold-start delay.
What's Next
Future product work could expand the evidence model to additional business data such as expense categories, inventory, or customer-level metrics while preserving the same principle: verified computation first, AI interpretation second.
For ForgeHacks, the current version is intentionally focused on completing the financial decision workflow end to end rather than adding unsupported breadth.
Log in or sign up for Devpost to join the conversation.