Skip to content

fix(engine/v2): strengthen diversifier + product re-use penalty#56

Open
lucavandee wants to merge 1 commit into
mainfrom
claude/charming-dijkstra-91a134
Open

fix(engine/v2): strengthen diversifier + product re-use penalty#56
lucavandee wants to merge 1 commit into
mainfrom
claude/charming-dijkstra-91a134

Conversation

@lucavandee

Copy link
Copy Markdown
Owner

Summary

  • Caps product appearances across the returned set: 1× when the pool has ≥ count×3 unique products, else 2×.
  • Tightens overlap threshold from 0.34 → 0.25 and adds per-slot collision penalties (-0.20) for footwear / bottom / outerwear reuse.
  • Adds a -0.15 re-use penalty per product already in a selected outfit, so the ranker prefers fresh candidates as the set grows.
  • Enforces strict footwear uniqueness when the pool has ≥ 3 unique footwear items.
  • Tracks usedProductIds across the whole set, with dynamic re-ranking per selection step.

Addresses the R7 diversity regression (avg 5/10) where the same products appeared in multiple outfits per persona — e.g. Clarks desert boot 2× (Thomas, Pieter), Levi's 568 2× and Nike Dunk 2× (Jayden), Adidas Stan Smith 2× (Pieter).

Test plan

  • npx vitest run — 55 passing; the 1 failing test (productClassifier) is pre-existing on main and unrelated to this change.
  • Regenerate R8 persona reports and confirm no product appears in 2 outfits within a persona when pool allows.
  • Spot-check footwear/bottom/outerwear variety across outfits per persona.

🤖 Generated with Claude Code

- Product appearance cap: 1× when pool has >= count*3 unique products, else 2×
- Strict overlap threshold lowered from 0.34 to 0.25
- Per-slot collision penalty (-0.20) for footwear/bottom/outerwear reuse
- Reuse penalty (-0.15) per product already in a selected outfit
- Strict footwear uniqueness when pool has >= 3 unique footwear items
- Track usedProductIds across the set so ranking prefers fresh candidates

Addresses R7 regression where same products (e.g. Clarks desert boot,
Levi's 568, Nike Dunk) appeared in multiple outfits per persona.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@netlify

netlify Bot commented Apr 18, 2026

Copy link
Copy Markdown

Deploy Preview for fitfiai ready!

Name Link
🔨 Latest commit 932a681
🔍 Latest deploy log https://app.netlify.com/projects/fitfiai/deploys/69e3920098702f00086f8f70
😎 Deploy Preview https://deploy-preview-56--fitfiai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@supabase

supabase Bot commented Apr 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project wojexzgjyhijuxzperhq because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant