Analyze reranker lift
analyze_reranker_liftMeasure correlation between bi-encoder and cross-encoder ranks to determine if your reranker is actively reordering. Low correlation indicates real reordering; high correlation means it confirms the bi-encoder order.
Instructions
Per-query Spearman + Kendall correlation between bi-encoder and cross-encoder ranks, aggregated across queries in the window. Low correlation = the reranker is actively reordering (doing real work); high correlation = the reranker mostly confirms the bi-encoder order. Optional model / retrieval_index filters. Surfaces reranker_idle (WARNING) when the reranker rarely changes ordering. Reads from mcpg_rag.rerank_events; returns a report with zero counts when the table doesn't exist or the window is empty.
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. | |
| retrieval_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| findings | Yes | ||
| query_count | Yes | ||
| window_days | Yes | ||
| mean_kendall | Yes | ||
| p25_spearman | Yes | ||
| p75_spearman | Yes | ||
| mean_spearman | Yes | ||
| interpretation | Yes | ||
| retrieval_index | Yes |