diff --git a/src/features/matching/scoreCalculator.ts b/src/features/matching/scoreCalculator.ts index ee051f5..23e9e29 100644 --- a/src/features/matching/scoreCalculator.ts +++ b/src/features/matching/scoreCalculator.ts @@ -584,17 +584,8 @@ export function calculateScore(need: Need, property: Property): MatchEngineOutpu ] const mustHaveEval = scoreMustHaves(allMustHaveText, property) - // ── Modifiers: data quality and confidence adjust the final score ───────── - // These are intentionally applied after the hard/soft weighted sum so that - // a low-confidence or poor-data property can be penalised without distorting - // the individual criterion breakdown. - const dataQualityModifier = calcDataQualityModifier(property) - const confidenceModifier = calcConfidenceModifier(property) - - // ── Final score: hard/soft weighted sum + must-have penalty + modifiers ─── - const baseScore = hardMatchScore * 0.60 + softFactorScore * 0.40 - const rawFinal = baseScore - hardFilter.severePenalty + mustHaveEval.scoreImpact - + dataQualityModifier + confidenceModifier + // ── Final score: hard/soft weighted sum, clamped 0–100 ─────────────────── + const rawFinal = hardMatchScore * 0.60 + softFactorScore * 0.40 - hardFilter.severePenalty const finalScore = Math.round(Math.min(100, Math.max(0, rawFinal))) // ── Factor classification — only use weighted soft factors for positive/negative ── @@ -622,8 +613,8 @@ export function calculateScore(need: Need, property: Property): MatchEngineOutpu finalScore, hardMatchScore, softFactorScore, - dataQualityModifier, - confidenceModifier, + dataQualityModifier: 0, + confidenceModifier: 0, positiveFactors, negativeFactors, allHardFactors: hardFactors, diff --git a/src/services/ai/mock/needParser.ts b/src/services/ai/mock/needParser.ts index 18c64d6..5c03f75 100644 --- a/src/services/ai/mock/needParser.ts +++ b/src/services/ai/mock/needParser.ts @@ -60,8 +60,7 @@ export function mockParseNeed(input: string): ParseNeedResult { // Contextual Zürich inference: only truly Zürich-specific place/brand names const ZURICH_ONLY_SIGNALS = [ - 'industrie groove', 'industrie-groove', - 'pfingstweidstrasse', 'hardbrücke', 'freilager', 'europaallee', + 'pfingstweidstrasse', 'freilager', 'europaallee', 'zürich-west', 'zürich west', 'zürich nord', 'zürich süd', 'hürlimann', 'viadukt', 'schiffbau', ]