Skip to main content
Internal Service β€” This is not an HTTP endpoint. It’s called by the analyze-visibility orchestrator.

Purpose

Calculates visibility scores from raw platform results. Converts boolean arrays into percentages and overall scores.

Functions

calculate_platform_scores

Converts summary counts to percentage scores per platform:

calculate_overall_score

Returns (overall_score, total_visible):
  • overall_score: 0-100, weighted average across platforms
  • total_visible: Total number of (prompt, platform) pairs where visible

calculate_summary_stats

Aggregates results into counts per platform:

Score Formula

Where 8 is the number of AI platforms tracked.

Code Location