Skip to content
CodexdebugData & ML2 files · +134 −7

Fix noisy cluster labels in hackathon dashboard clustering

Session from hackathon-advisor-codex-traces on Hugging Face by build-small-hackathon · Apache-2.0 · condensed by Coders Talk

18msession
1interventions
GOAL

The developer asked how the dashboard's project clusters were chosen, then pushed back that the resulting labels (dominated by generic terms like 'US') were unusable and asked for the clustering/labeling logic to be fixed.

  1. Prompt · +0
    How were these clusters selected? (asking about cluster labels shown in a dashboard screenshot)
  2. Agent did · +0m
    Explored the codebase (dashboard.py, data.py, app.js, tests, cached dashboard.json runs) to trace how cluster keywords/labels are generated from project embeddings and TSNE/KMeans clustering.
  3. Prompt · +8m
    為何會有一堆 US?我覺得目前選出來的這些根本不能用啊!這個 hackathon 基本上都是這些東西啊。 (Why are there so many 'US' labels? These cluster labels are useless — the hackathon is basically all these words.)
  4. Agent did · +8m
    Dug into dashboard_storage.py, app.py, and the dashboard/test files to find where cluster keyword labels are computed and why generic/common words were surfacing as cluster labels.
  5. Agent did · +11m
    Patched dashboard.py to add a CLUSTER_LABEL_ALGORITHM constant and new distinctive-keyword based labeling logic (53 lines added).
  6. Fail · +11m
    Running the new code via python3.11 and pytest failed (exit code 1) — likely wrong interpreter/venv mismatch.
  7. Agent did · +11m
    Switched to .venv/bin/python for verification scripts and pytest; tests passed. Reviewed the diff on dashboard.py to confirm the new labeling behavior.
  8. Agent did · +12m
    Expanded the stopword list (added 'before' and others) and extended validate_dashboard_payload, then added tests in test_dashboard.py covering the new distinctive-keyword algorithm and a noisy-cluster scenario.
  9. Break · 1h 43m away, not counted
  10. Intervention · +16m
    Developer said 'continue' after the agent paused mid-fix.
    Why: I just wanted it to keep going with the fix rather than stop and check in.
  11. Outcome · +18m
    Full test suite (tests/test_dashboard.py, tests/test_app.py, and the whole pytest run) passed after the new distinctive-keyword cluster labeling was implemented and verified.
VERDICT

Next time I'd open with the real complaint upfront — that cluster labels were dominated by generic/common words like 'US' and were unusable — instead of first asking how they were chosen, since that led to a lot of exploration before we got to the actual fix. The correction that mattered was switching to distinctive-keyword based labeling with an expanded stopword list, verified by running the tests through the project's actual .venv instead of the system python3.11, which had been silently failing.

I tried this · 0

Discussion · 0

How Builds work