feat: formula-based ranking with optional AI, configurable score/pass-rate weights
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m56s

Add scoreWeight and passRateWeight (0-10) to evaluation config for
configurable composite score formula. When ranking criteria text is
empty, triggerAutoRank uses pure formula ranking (no LLM calls).
When criteria text is present, AI-assisted ranking runs as before.

- Add FORMULA to RankingMode enum with migration
- Extract fetchCategoryProjects helper, add formulaRank service
- Update computeCompositeScore to accept configurable weights
- Add score/pass-rate weight sliders to ranking dashboard UI
- Mode-aware button labels (Calculator/formula vs Sparkles/AI)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 20:24:17 +01:00
parent ac86e025e2
commit cb688ba3e6
6 changed files with 226 additions and 42 deletions

View File

@@ -147,6 +147,10 @@ export const EvaluationConfigSchema = z.object({
// Ranking (Phase 2) — per-criterion weights for AI ranking
criteriaWeights: z.record(z.string(), z.number().min(0).max(10)).optional(),
// Ranking (Phase 3) — composite score formula weights
scoreWeight: z.number().min(0).max(10).default(5),
passRateWeight: z.number().min(0).max(10).default(5),
})
export type EvaluationConfig = z.infer<typeof EvaluationConfigSchema>