fix(engine/v2): unique outfit titles and diverse explanations per set#59
Open
lucavandee wants to merge 1 commit into
Open
fix(engine/v2): unique outfit titles and diverse explanations per set#59lucavandee wants to merge 1 commit into
lucavandee wants to merge 1 commit into
Conversation
Titles now vary per set by cycling through archetype/hero-item/color/material variants and rejecting options that exceed 0.6 word overlap with prior titles. Explanations no longer repeat "Afgestemd op je X stijl" — that line appears at most once per set, with later outfits using occasion framing, hero-piece callouts, and brand mentions instead. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
✅ Deploy Preview for fitfiai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildOutfitTitlenow tracks titles used earlier in the same set and picks the first variant (archetype · name / rond hero-item / · color / · material) whose word overlap with any prior title stays below 0.6 — eliminating back-to-back "Werk-ready · classic" style duplicates.buildExplanationcaps "Afgestemd op je X stijl" to at most one outfit per set; subsequent outfits lead with occasion framing plus a hero-piece callout and, where available, a brand mention (preferred brand highlighted or mono-/dual-brand note).wordOverlapSimilarityhelper (threshold 0.6) so title diversity is driven by tokenised Jaccard-style overlap rather than exact-string equality.Test plan
npx vitest run— 55 pass, 1 pre-existing failure inproductClassifier.test.ts(unrelated to this change; exists on the branch base)🤖 Generated with Claude Code