---
title: "Unsupervised Topic Discovery with Text Embeddings"
description: "Wealthfront derives a hierarchical taxonomy of support-call topics from free-form representative notes by embedding each note with OpenAI's text-embedding-3-small, reducing dimensions with UMAP (to 25), and clustering with HDBSCAN into 89 top-level clusters, then re-running UMAP+HDBSCAN within each cluster to get sub-topics."
url: "https://swe.quest/articles/unsupervised-topic-discovery-with-text-embeddings-b5e7da4e259352e1"
canonical: "https://eng.wealthfront.com/2026/10/05/unsupervised-topic-discovery-with-text-embeddings/"
source: "Wealthfront Engineering"
published: "2026-10-05"
difficulty: "medium"
kind: "How-to"
reading_minutes: 14
tags: ["machine-learning","llms","python","algorithms"]
---

# Unsupervised Topic Discovery with Text Embeddings

A post on [Wealthfront Engineering](https://swe.quest/sources/wealthfront.md), published 2026-10-05, 14 min read, How-to. Original: [https://eng.wealthfront.com/2026/10/05/unsupervised-topic-discovery-with-text-embeddings/](https://eng.wealthfront.com/2026/10/05/unsupervised-topic-discovery-with-text-embeddings/)

## Summary

Wealthfront derives a hierarchical taxonomy of support-call topics from free-form representative notes by embedding each note with OpenAI's text-embedding-3-small, reducing dimensions with UMAP (to 25), and clustering with HDBSCAN into 89 top-level clusters, then re-running UMAP+HDBSCAN within each cluster to get sub-topics. An LLM names clusters from notes sampled near sub-cluster centroids, which avoids the bias of naming a cluster after a skewed sample (e.g. January 1099 calls). Because HDBSCAN cannot label new data, the resulting labelled dataset, after manual label cleanup and merging, is used to train a KNN classifier for incoming notes. This approach is presented as cheaper and more consistent than asking an LLM to label every note.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)

## Prerequisites

- text embeddings ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))
- clustering basics
- Python data science tooling ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

UMAP, HDBSCAN, text-embedding-3-small, OpenAI, K-Nearest Neighbors, scikit-learn, Wealthfront

## Related posts

- [Finding relationships in your data with embeddings](https://swe.quest/articles/finding-relationships-in-your-data-with-embeddings-269cb25fce48621d.md): incident.io · 2024-01-19 · Medium · 14 min read · Vector search, PostgreSQL, LLMs, Product engineering, Incidents & postmortems
  incident.io built a related-incidents feature by embedding a plain-text representation of each incident with OpenAI's text-embedding-ada-002 and ranking matches by cosine similarity.
- [Introducing the Data Measurements Tool: an Interactive Tool for Looking at Datasets](https://swe.quest/articles/introducing-the-data-measurements-tool-an-interactive-tool-for-looking-at-28723606ed6df7ae.md): Hugging Face · 2021-11-29 · Easy · 7 min read · Machine learning, Model training, Python, Open source
  Hugging Face's Data Measurements Tool is an open-source Python library and no-code Streamlit interface for measuring, exploring and comparing NLP datasets on the Hub.
- [Data-Centric Machine Learning: Building Shopify Inbox’s Message Classification Model](https://swe.quest/articles/data-centric-machine-learning-building-shopify-inbox-s-message-classification-89547c88c3590e73.md): Shopify Engineering · 2022-07-21 · Medium · 12 min read · Machine learning, Model training, Privacy, Communications
  Shopify Inbox's message classifier improved from ~70% to ~90% accuracy, and from ~35% to ~80% high-confidence coverage, by investing in better training data rather than model tweaks.
- [How we think about text classification in the LLM era](https://swe.quest/articles/how-we-think-about-text-classification-in-the-llm-era-a6b9a6bf775ffc1a.md): Medium Engineering · 2026-08-19 · Medium · 13 min read · LLMs, Machine learning, Evaluation, Cost optimization
  Medium replaced its aging NSFW story classifier with a prompt-based LLM classifier that runs inside Snowflake Cortex SQL queries.
- [Getting Started With Embeddings](https://swe.quest/articles/getting-started-with-embeddings-f83c278b13779a68.md): Hugging Face · 2022-06-23 · Medium · 11 min read · Search, Machine learning, Python, Vector search
  Embeddings turn text or images into fixed-length vectors that capture meaning, so semantic similarity becomes a distance calculation.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
