WhoIsLuwah commited on
Commit
3647e83
·
1 Parent(s): 9d9e576

feat(ui): tabular insights view, cluster/tool/date filters, recompute

Browse files

Tasks 6-9: load /clusters, in-memory filteredReels, cards|table toggle,
InsightsTable, filter bar, Recompute clusters button. Also nudge the
clustering prompt to merge near-duplicate themes (verified live: 7->4
clusters on the same data).

Files changed (1) hide show
  1. main.py +4 -1
main.py CHANGED
@@ -145,7 +145,10 @@ def cluster_topics_with_llm(items: List[dict]) -> List[dict]:
145
  "You are a content librarian. Group the given items into a small number of "
146
  "emergent topic clusters (aim for 4 to 12, fewer if there are few items). "
147
  "Invent a short, human-readable name for each cluster (e.g. 'AI Tools', "
148
- "'Cooking', 'Personal Finance'). Every item id must appear exactly once. "
 
 
 
149
  "Respond ONLY with valid JSON in exactly this shape, no markdown or prose:\n"
150
  '{"assignments": [{"id": "<id>", "cluster": "<cluster name>"}]}'
151
  )
 
145
  "You are a content librarian. Group the given items into a small number of "
146
  "emergent topic clusters (aim for 4 to 12, fewer if there are few items). "
147
  "Invent a short, human-readable name for each cluster (e.g. 'AI Tools', "
148
+ "'Cooking', 'Personal Finance'). Merge near-identical or overlapping themes "
149
+ "into one cluster (e.g. 'Website Security' and 'Website Security Testing' are "
150
+ "the same cluster); prefer fewer, broader groups over many tiny ones. "
151
+ "Every item id must appear exactly once. "
152
  "Respond ONLY with valid JSON in exactly this shape, no markdown or prose:\n"
153
  '{"assignments": [{"id": "<id>", "cluster": "<cluster name>"}]}'
154
  )