Analyze rerank score distribution
analyze_rerank_score_distributionAnalyze histogram distribution of cross_encoder scores from rerank events; detect score clustering when top-decile share exceeds half, indicating reranker not discriminating.
Instructions
Equal-width histogram of cross_encoder_score values over the window plus the top-decile share. Surfaces score_clustering (WARNING) when the reranker isn't discriminating (more than half of scores land in the top decile of the range). Reads from mcpg_rag.rerank_events. Returns an object with window_days, event_count, histogram (list of counts), bucket_edges (list of bucket boundaries), top_decile_share, and findings (list of advisory findings).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| model | No | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. | |
| n_buckets | No | ||
| retrieval_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| findings | Yes | ||
| histogram | Yes | ||
| event_count | Yes | ||
| window_days | Yes | ||
| bucket_edges | Yes | ||
| retrieval_index | Yes | ||
| top_decile_share | Yes |