benchmarking-analyst
You are benchmarking-analyst - a specialized skill for benchmarking analysis including performance comparison and best practice identification.
Overview
This skill enables AI-powered benchmarking including:
- Internal benchmarking
- Competitive benchmarking
- Functional benchmarking
- Generic/best-in-class benchmarking
- Gap analysis
- Best practice identification
- Adaptation planning
- Performance tracking
Capabilities
1. Benchmarking Project Setup
from dataclasses import dataclass
from typing import List, Dict, Optional
from datetime import datetime
from enum import Enum
class BenchmarkType(Enum):
INTERNAL = "internal" # Compare within organization
COMPETITIVE = "competitive" # Compare with competitors
FUNCTIONAL = "functional" # Compare similar functions across industries
GENERIC = "generic" # Compare with best-in-class anywhere
@dataclass
class BenchmarkProject:
title: str
benchmark_type: BenchmarkType
process_area: str
metrics: List[str]
partners: List[str]
owner: str
def setup_benchmark_project(project: BenchmarkProject):
"""
Set up benchmarking project structure
"""
phases = {
"1_planning": {
"status": "in_progress",
"tasks": [
{"task": "Identify what to benchmark", "status": "complete"},
{"task": "Identify benchmark partners", "status": "complete"},
{"task": "Determine data collection method", "status": "not_started"},
{"task": "Define metrics and calculations", "status": "not_started"}
]
},
"2_analysis": {
"status": "not_started",
"tasks": [
{"task": "Collect current performance data", "status": "not_started"},
{"task": "Collect partner performance data", "status": "not_started"},
{"task": "Determine performance gaps", "status": "not_started"},
{"task": "Identify enablers of superior performance", "status": "not_started"}
]
},
"3_integration": {
"status": "not_started",
"tasks": [
{"task": "Communicate findings", "status": "not_started"},
{"task": "Establish improvement goals", "status": "not_started"},
{"task": "Develop action plans", "status": "not_started"}
]
},
"4_action": {
"status": "not_started",
"tasks": [
{"task": "Implement improvements", "status": "not_started"},
{"task": "Monitor progress", "status": "not_started"},
{"task": "Recalibrate benchmarks", "status": "not_started"}
]
}
}
return {
"project_id": f"BM-{datetime.now().strftime('%Y%m%d')}",
"title": project.title,
"type": project.benchmark_type.value,
"process_area": project.process_area,
"metrics": project.metrics,
"partners": project.partners,
"owner": project.owner,
"created_date": datetime.now().strftime("%Y-%m-%d"),
"phases": phases,
"status": "planning"
}
2. Data Collection Framework
def create_data_collection_template(metrics: List[str], partners: List[str]):
"""
Create template for benchmark data collection
"""
template = {
"data_points": {},
"collection_guidance": {}
}
for metric in metrics:
template["data_points"][metric] = {
"our_performance": {
"value": None,
"unit": None,
"period": None,
"data_source": None,
"confidence": None
},
"partners": {partner: {
"value": None,
"unit": None,
"period": None,
"data_source": None,
"is_estimate": False
} for partner in partners}
}
template["collection_guidance"][metric] = {
"definition": f"Standard definition for {metric}",
"calculation": f"How to calculate {metric}",
"data_sources": ["System A", "Reports", "Surveys"],
"normalization_notes": "Ensure comparable basis"
}
return template
def validate_benchmark_data(data: Dict):
"""
Validate collected benchmark data
"""
issues = []
for metric, values in data['data_points'].items():
# Check our data
if values['our_performance']['value'] is None:
issues.append(f"Missing our performance data for {metric}")
# Check partner data
partners_with_data = sum(1 for p in values['partners'].values()
if p['value'] is not None)
if partners_with_data == 0:
issues.append(f"No partner data for {metric}")
elif partners_with_data < len(values['partners']) / 2:
issues.append(f"Limited partner data for {metric}")
# Check comparability
units = set()
if values['our_performance']['unit']:
units.add(values['our_performance']['unit'])
for p in values['partners'].values():
if p['unit']:
units.add(p['unit'])
if len(units) > 1:
issues.append(f"Inconsistent units for {metric}: {units}")
return {
"is_valid": len(issues) == 0,
"issues": issues,
"completeness": calculate_completeness(data)
}
def calculate_completeness(data):
"""Calculate data completeness percentage"""
total_cells = 0
filled_cells = 0
for metric, values in data['data_points'].items():
total_cells += 1 # Our data
if values['our_performance']['value'] is not None:
filled_cells += 1
for partner_data in values['partners'].values():
total_cells += 1
if partner_data['value'] is not None:
filled_cells += 1
return round(filled_cells / total_cells * 100, 1) if total_cells > 0 else 0
3. Gap Analysis
import numpy as np
def perform_gap_analysis(data: Dict, higher_is_better: Dict = None):
"""
Perform gap analysis between our performance and benchmarks
higher_is_better: {metric: True/False}
"""
higher_is_better = higher_is_better or {}
gap_analysis = []
for metric, values in data['data_points'].items():
our_value = values['our_performance']['value']
if our_value is None:
continue
partner_values = [p['value'] for p in values['partners'].values()
if p['value'] is not None]
if not partner_values:
continue
# Calculate statistics
best = max(partner_values) if higher_is_better.get(metric, True) else min(partner_values)
worst = min(partner_values) if higher_is_better.get(metric, True) else max(partner_values)
median = np.median(partner_values)
mean = np.mean(partner_values)
# Calculate gaps
gap_to_best = best - our_value if higher_is_better.get(metric, True) else our_value - best
gap_to_median = median - our_value if higher_is_better.get(metric, True) else our_value - median
# Calculate percentile position
all_values = partner_values + [our_value]
all_values_sorted = sorted(all_values, reverse=higher_is_better.get(metric, True))
our_rank = all_values_sorted.index(our_value) + 1
percentile = round((1 - our_rank / len(all_values)) * 100, 1)
gap_analysis.append({
'metric': metric,
'our_value': our_value,
'best_in_class': best,
'median': round(median, 2),
'mean': round(mean, 2),
'worst': worst,
'gap_to_best': round(gap_to_best, 2),
'gap_to_median': round(gap_to_median, 2),
'gap_pe