An AI-powered system that analyzes order fulfillment operations, detects bottlenecks, provides improvement recommendations, and predicts future performance.
- Efficiency Scoring — Scores each process step (0-100) based on cycle time, wait time, error rate, and rework rate
- Bottleneck Detection — Identifies which steps are slowing down the entire pipeline
- Visualizations — Creates 6 charts showing performance patterns
- AI Recommendations — Uses Google Gemini (free) to suggest process improvements
- Performance Prediction — Forecasts future performance using Machine Learning (Random Forest)
- PDF Report — Generates a professional report with all findings
Order Received → Order Validation → Inventory Check → Picking & Packing
→ Quality Inspection → Shipping Prep → Dispatch & Delivery
git clone https://github.com/Leo-emp/operational-efficiency.git
cd operational-efficiency
pip install -r requirements.txt# Step 1: Generate the synthetic dataset (2,000 orders, 14,000 records)
python generate_data.py
# Step 2: Run the full analysis (without AI recommendations)
python main.py
# Step 3: Run with AI recommendations (needs free Gemini API key)
export GEMINI_API_KEY=your-key-here
python main.py --with-ai
# Custom output path
python main.py -o my_report.pdfGet a free Gemini API key at: aistudio.google.com/apikey
After running, you'll have:
operational-efficiency/
├── data/
│ └── operations_data.csv # Generated dataset
├── charts/
│ ├── 1_efficiency_scores.png # Scores per step
│ ├── 2_cycle_vs_wait.png # Time breakdown
│ ├── 3_error_rework_rates.png # Quality metrics
│ ├── 4_monthly_trend.png # Seasonal patterns
│ ├── 5_department_heatmap.png # Department comparison
│ └── 6_prediction_analysis.png # ML predictions
└── reports/
└── operational_efficiency_report.pdf # Full PDF report
- Python — Core language
- pandas — Data analysis
- matplotlib / seaborn — Visualizations
- scikit-learn — Machine learning predictions
- Google Gemini API — AI-powered recommendations (free tier)
- fpdf2 — PDF report generation
Each process step is scored on 4 dimensions:
| Factor | Weight | Measures |
|---|---|---|
| Cycle Time | 30% | How fast is the step? |
| Wait Time | 30% | How long do orders wait? |
| Error Rate | 25% | How many errors occur? |
| Rework Rate | 15% | How often is rework needed? |
Grades: A (80+), B (65-79), C (50-64), D (35-49), F (below 35)
MIT