Outlier detection finds observations that are unusual compared with the prevailing pattern. For text, it can flag requests that differ sharply from the other available texts. It is also called novelty detection. section 4.4 section 8.3.1
A typical embedding-based workflow treats detection as a classic machine-learning task:
- Represent texts as embeddings, numeric vectors whose values change little for similar meanings, even when the wording differs. section 8.3.1
- Compare each vector with the rest of the collection to find texts dissimilar from essentially all other texts. section 8.3.1
- Use algorithms such as Isolation Forests or Local Outlier Factor (LoF) rather than asking an LLM alone to judge novelty. section 8.3.1 section 8.3.2
Novel customer-support problems
A support system can turn a customer's problem into an embedding and compare it with problems linked to known solutions. It may offer relevant guidance while the customer waits, but a failed or uncertain match should allow the customer to contact a person. This uses outlier detection as part of a larger system rather than relying on generated output alone. section 8.3.2
Detection is not a guaranteed safety net. Novel requests are difficult to identify without errors, and false judgments can produce a poor user experience. Restricting users to finite prompts or approved data sources is presented as safer than trying to detect every failure afterward. section 4.4
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 semantically similar texts can occupy nearby positions in an embedding space despite sharing no words. section 8.3.1

