An AI-powered sales intelligence and predictive analytics system designed for pharmaceutical sales data. It connects primary sales, secondary sales, and scheme data to identify missed opportunities, inventory gaps, growth patterns, and product-level trends.
- Doctor-wise missed opportunities and growth potential
- Stockist-wise secondary sales gaps compared with primary billing
- Product-wise slow-moving and fast-moving trends
- Region and HQ-wise growth or decline analysis
- Scheme impact analysis on secondary sales
- Identification of stockists with high closing stock after scheme allocation
- Short-term sales forecasting
- Natural-language sales insights using an LLM-powered assistant
- Semantic retrieval using Pinecone embeddings
- Python
- Pandas and NumPy
- Groq LLM API
- Pinecone Vector Database
- Sentence Transformers
- Plotly
- Excel data processing
Pharma-Sales-Intelligence/
├── sales_chatbot_cw.py
├── requirements.txt
├── .env.example
├── .gitignore
└── data/
└── sales_data.xlsx
The data directory is excluded from Git because it contains confidential business information.
Install the dependencies:
pip install -r requirements.txtCreate a .env file or configure the following environment variables:
GROQ_API_KEY=your_groq_api_key
PINECONE_API_KEY=your_pinecone_api_keyPlace the private Excel workbook at:
data/sales_data.xlsx
The workbook should contain separate sheets for primary sales, secondary sales, and scheme data.
Run the application:
python sales_chatbot_cw.pyThe original pharmaceutical sales data is confidential and is not included in this repository. The .gitignore file prevents Excel files, local datasets, notebooks, environment files, and API credentials from being committed.
This system can support sales managers, regional managers, and commercial teams by converting raw sales data into actionable insights such as stockist gaps, product opportunities, scheme effectiveness, and short-term demand forecasts.
This repository demonstrates a proof of concept. Results should be reviewed and validated before being used for commercial or operational decisions.