~/talk

Beyond KMeans - using LLMs to improve text clustering

Talkat PyCon Israel 2024 · on Monday, 2024-09-16· [large-language-models, python]
slides:none on file

Combines sklearn KMeans and LangChain LLM calls to postprocess embeddings so clusters lose duplicates and “Misc” bins; uses OpenAI 3k+‑dim embeddings, runs KMeans (n_init tuned) then recursive KMeans to split large clusters below a threshold (default ≈ sqrt(N)), summarizes cluster samples with an LLM, merges similar summaries, and outputs final labels; tested on Safaria pages (poverty page had ~800 documents where vanilla KMeans suggested 3 clusters) and works as an offline Python package (llm_cluster_optimizer), not yet production‑optimized.

AI-written summary · about

  1. 0:00Introduction and context
  2. 1:12Text clustering goals
  3. 3:36Embeddings and K-means
  4. 7:19Optimization challenges
  5. 10:05The clustering bottleneck
  6. 11:36Proposed post-processing
  7. 14:03Refining clusters with LLMs
  8. 17:35Implementation and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.