Skip to content

[text-clustering] add an abstract for each cluster - #477

Open
leogail wants to merge 3 commits into
mainfrom
services/text-clustering/add-cluster-summarize
Open

[text-clustering] add an abstract for each cluster#477
leogail wants to merge 3 commits into
mainfrom
services/text-clustering/add-cluster-summarize

Conversation

@leogail

@leogail leogail commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@leogail leogail self-assigned this Aug 21, 2026
@leogail leogail changed the title [text-clustering] add an abstract of each cluster [text-clustering] add an abstract for each cluster Aug 21, 2026

@parmentf parmentf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les deux problèmes de correction (division par zéro et p=0) doivent être résolus avant merge. Le reste est mélioratif mais ne bloque pas.

Le changement est globalement bien structuré : le nouveau format objet title/abstract est propagé de manière cohérente à tous les points de consommation, et la validation LLM est renforcée. Les bugs identifiés sont des cas limites de taille de cluster.

Comment thread services/text-clustering/v1/clustering.py
parsed_answer = json.loads(answer)

# Vérifie que toutes les clés attendues sont présentes
if set(parsed_answer.keys()) != expected_keys:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 issue: ‏Risque de faux négatifs

Cette comparaison ignore l'ordre (correct) mais rejette toute clé supplémentaire. Or le schéma JSON a additionalProperties=False côté client, mais le LLM peut parfois rajouter des champs. La double validation (schema strict + set check) est redondante et la vérification set() peut rejeter des réponses valides si le LLM ajoute un champ mineur.

FYI : à considérer si on veut une validation "superset" plutôt que stricte.

Comment thread services/text-clustering/v1/clust/name_cluster_functions.py Outdated
Comment thread services/text-clustering/v1/clustering.py
except Exception:
pass

# Add top docs to dictonary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✒️ typo:

Suggested change
# Add top docs to dictonary
# Add top docs to dictionary

Comment thread services/text-clustering/v1/clustering.py Outdated
Comment thread services/text-clustering/v1/clustering.py
Comment thread services/text-clustering/v1/clust/name_cluster_functions.py
Comment thread services/text-clustering/v1/clustering.py
and fixed an error in Noise detect
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.

2 participants