Business Sherlock AI

Inspiration

Modern businesses generate massive amounts of operational data every day: sales transactions, website analytics, customer support tickets, customer reviews, and product release events. While organizations collect this data, identifying the true root cause of business problems often requires analysts to manually search across multiple systems and connect the dots.

The inspiration behind Business Sherlock AI was to build an AI-powered business investigator that can automatically analyze operational signals, correlate evidence from multiple data sources, and explain why a business issue occurred. Instead of simply showing dashboards, the system acts like a business analyst that investigates problems and produces actionable recommendations.


What It Does

Business Sherlock AI investigates business incidents using natural language.

A user can ask questions such as:

  • "Investigate revenue decline in March"
  • "Why are customers complaining about the mobile app?"
  • "Investigate delivery delays"

The system then:

  1. Determines the investigation type.
  2. Retrieves evidence from Elasticsearch.
  3. Collects customer complaints, reviews, sales signals, and business events.
  4. Uses Gemini to reason over the evidence.
  5. Produces a structured investigation report containing:
  • Root Cause
  • Confidence Level
  • Business Impact
  • Recommended Actions

The final result is a business investigation assistant capable of transforming raw operational data into executive-level insights.


How We Built It

The project was built using:

Data Layer

Synthetic business datasets were generated to simulate a realistic e-commerce environment:

  • Sales Data
  • Web Analytics
  • Support Tickets
  • Customer Reviews
  • Product Events

Several intentional business incidents were introduced:

  • Payment Gateway Upgrade causing checkout failures
  • Mobile App Release causing app performance issues
  • Shipping Provider Migration causing delivery delays

Search & Retrieval

Elasticsearch was used as the operational intelligence layer.

Custom indices were created for:

  • sales_data
  • web_analytics
  • support_tickets
  • customer_reviews
  • product_events

Evidence retrieval functions were built to query relevant operational signals and retrieve supporting evidence for investigations.

AI Reasoning

Google Gemini was integrated to act as the reasoning engine.

The model receives:

  • Customer complaints
  • Negative reviews
  • Operational events
  • Business metrics

and generates:

  • Root cause analysis
  • Confidence assessment
  • Business impact evaluation
  • Recommended actions

User Interface

A Streamlit application provides a simple interface where users can enter investigation requests and receive AI-generated investigation reports.


Challenges We Faced

Multi-Source Correlation

One of the biggest challenges was connecting multiple independent datasets and ensuring they all pointed to the same business event.

For example:

  • Support tickets reported checkout failures.
  • Customer reviews mentioned failed payments.
  • Product events showed a payment gateway upgrade.

The challenge was designing datasets that allowed the AI to correlate these signals and identify a common root cause.

Elasticsearch Schema Design

Creating meaningful Elasticsearch mappings required careful planning. Different datasets contained different structures, and retrieval quality depended heavily on index design and search queries.

AI Prompt Engineering

Getting Gemini to behave like a business analyst rather than a chatbot required multiple iterations. Prompts had to guide the model to produce structured investigations with evidence-based conclusions and actionable recommendations.

Deployment

Deploying the application introduced dependency and environment management challenges, particularly around package compatibility, API credentials, and cloud deployment configuration.


What We Learned

This project provided hands-on experience with:

  • Elasticsearch indexing and retrieval
  • Retrieval-Augmented Generation (RAG) patterns
  • AI-powered business analytics
  • Prompt engineering
  • Streamlit application development
  • Cloud deployment workflows
  • End-to-end AI agent architecture

Most importantly, we learned how AI can move beyond simple chat interfaces and act as a practical decision-support system for business operations.


Future Improvements

Future versions of Business Sherlock AI could include:

  • Real-time incident monitoring
  • Automated anomaly detection
  • Elastic MCP integration
  • Multi-agent investigation workflows
  • Interactive evidence visualization
  • Executive dashboards
  • Slack and Microsoft Teams integrations

The long-term vision is to create an AI Business Operations Analyst capable of continuously monitoring organizational health and proactively identifying issues before they impact customers or revenue.

Built With

Share this project:

Updates