Clustering groups texts or other data items by similarity. With embeddings, each item becomes a numeric vector, so similar meanings land near one another even when the texts use different words. section 8.3.1
A clustering workflow typically does the following:
- Represent each text as an embedding produced by an embedding model. section 8.3.1
- Group nearby or otherwise similar embeddings into useful categories, using algorithms such as k-means or HDBSCAN. section 8.3.1
- Use the groups to inspect patterns, route related cases, or support decisions rather than assuming the LLM must solve the whole problem. section 8.3.1
Support requests while customers wait
A customer describes a problem, an embedding model represents it, and clustering groups the request with similar problems in the queue. Analysts can route those customers together, share a vetted solution for common cases, and let customers talk to a person when automation fails. section 8.3.2
Figure 8.4 LLMs produce numeric vectors known as embeddings as an intrinsic part of their function-ing. The utility of these embeddings is dependent on the fact that these numbers only change a little bit when given similar text. The two example tests here will have similar embeddings, and thus, their plots look similar, even though they don’t share any of the same words. This is a powerful feature that was present in older machine learning techniques.
Use the figure to see why clustering can group texts that share meaning without sharing exact words: similar texts produce similar vectors and nearby plotted positions. section 8.3.1

















